diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-05-06 18:06:21 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:29:55 +0900 |
commit | c3ddd47ce7b546530e2241b0ea6a96817977886a (patch) | |
tree | 46515c479773d7add25773b536009e096ee9fa78 /spec/bundler/install/gemfile/platform_spec.rb | |
parent | d8d5e16305ee071f7cf16980788cabcc44799c2e (diff) |
[bundler/bundler] Normalize file:// handling in specs
https://github.com/bundler/bundler/commit/5946d62ad0
Diffstat (limited to 'spec/bundler/install/gemfile/platform_spec.rb')
-rw-r--r-- | spec/bundler/install/gemfile/platform_spec.rb | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb index 891f766cc0..c389c71032 100644 --- a/spec/bundler/install/gemfile/platform_spec.rb +++ b/spec/bundler/install/gemfile/platform_spec.rb @@ -4,7 +4,7 @@ RSpec.describe "bundle install across platforms" do it "maintains the same lockfile if all gems are compatible across platforms" do lockfile <<-G GEM - remote: file:#{gem_repo1}/ + remote: #{file_uri_for(gem_repo1)}/ specs: rack (0.9.1) @@ -16,7 +16,7 @@ RSpec.describe "bundle install across platforms" do G install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -27,7 +27,7 @@ RSpec.describe "bundle install across platforms" do it "pulls in the correct platform specific gem" do lockfile <<-G GEM - remote: file:#{gem_repo1} + remote: #{file_uri_for(gem_repo1)} specs: platform_specific (1.0) platform_specific (1.0-java) @@ -42,7 +42,7 @@ RSpec.describe "bundle install across platforms" do simulate_platform "java" install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "platform_specific" G @@ -53,7 +53,7 @@ RSpec.describe "bundle install across platforms" do it "works with gems that have different dependencies" do simulate_platform "java" install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "nokogiri" G @@ -64,7 +64,7 @@ RSpec.describe "bundle install across platforms" do simulate_platform "ruby" install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "nokogiri" G @@ -96,15 +96,15 @@ RSpec.describe "bundle install across platforms" do simulate_platform java install_gemfile! <<-G - source "file://localhost/#{gem_repo4}" + source "#{file_uri_for(gem_repo4)}" gem "empyrean", "0.1.0" gem "pry" G - expect(the_bundle.lockfile).to read_as normalize_uri_file(strip_whitespace(<<-L)) + expect(the_bundle.lockfile).to read_as strip_whitespace(<<-L) GEM - remote: file://localhost/#{gem_repo4}/ + remote: #{file_uri_for(gem_repo4)}/ specs: coderay (1.1.2) empyrean (0.1.0) @@ -132,7 +132,7 @@ RSpec.describe "bundle install across platforms" do good_lockfile = strip_whitespace(<<-L) GEM - remote: file://localhost/#{gem_repo4}/ + remote: #{file_uri_for(gem_repo4)}/ specs: coderay (1.1.2) empyrean (0.1.0) @@ -160,11 +160,11 @@ RSpec.describe "bundle install across platforms" do #{Bundler::VERSION} L - expect(the_bundle.lockfile).to read_as normalize_uri_file(good_lockfile) + expect(the_bundle.lockfile).to read_as good_lockfile bad_lockfile = strip_whitespace <<-L GEM - remote: file://localhost/#{gem_repo4}/ + remote: #{file_uri_for(gem_repo4)}/ specs: coderay (1.1.2) empyrean (0.1.0) @@ -196,30 +196,30 @@ RSpec.describe "bundle install across platforms" do aggregate_failures do lockfile bad_lockfile bundle! :install - expect(the_bundle.lockfile).to read_as normalize_uri_file(good_lockfile) + expect(the_bundle.lockfile).to read_as good_lockfile lockfile bad_lockfile bundle! :update, :all => true - expect(the_bundle.lockfile).to read_as normalize_uri_file(good_lockfile) + expect(the_bundle.lockfile).to read_as good_lockfile lockfile bad_lockfile bundle! "update ffi" - expect(the_bundle.lockfile).to read_as normalize_uri_file(good_lockfile) + expect(the_bundle.lockfile).to read_as good_lockfile lockfile bad_lockfile bundle! "update empyrean" - expect(the_bundle.lockfile).to read_as normalize_uri_file(good_lockfile) + expect(the_bundle.lockfile).to read_as good_lockfile lockfile bad_lockfile bundle! :lock - expect(the_bundle.lockfile).to read_as normalize_uri_file(good_lockfile) + expect(the_bundle.lockfile).to read_as good_lockfile end end it "works the other way with gems that have different dependencies" do simulate_platform "ruby" install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "nokogiri" G @@ -243,7 +243,7 @@ RSpec.describe "bundle install across platforms" do end install_gemfile! <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "facter" G @@ -258,7 +258,7 @@ RSpec.describe "bundle install across platforms" do it "fetches gems again after changing the version of Ruby" do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack", "1.0.0" G @@ -275,7 +275,7 @@ end RSpec.describe "bundle install with platform conditionals" do it "installs gems tagged w/ the current platforms" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" platforms :#{local_tag} do gem "nokogiri" @@ -287,7 +287,7 @@ RSpec.describe "bundle install with platform conditionals" do it "does not install gems tagged w/ another platforms" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" platforms :#{not_local_tag} do gem "nokogiri" @@ -300,7 +300,7 @@ RSpec.describe "bundle install with platform conditionals" do it "installs gems tagged w/ the current platforms inline" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "nokogiri", :platforms => :#{local_tag} G expect(the_bundle).to include_gems "nokogiri 1.4.2" @@ -308,7 +308,7 @@ RSpec.describe "bundle install with platform conditionals" do it "does not install gems tagged w/ another platforms inline" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" gem "nokogiri", :platforms => :#{not_local_tag} G @@ -318,7 +318,7 @@ RSpec.describe "bundle install with platform conditionals" do it "installs gems tagged w/ the current platform inline" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "nokogiri", :platform => :#{local_tag} G expect(the_bundle).to include_gems "nokogiri 1.4.2" @@ -326,7 +326,7 @@ RSpec.describe "bundle install with platform conditionals" do it "doesn't install gems tagged w/ another platform inline" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "nokogiri", :platform => :#{not_local_tag} G expect(the_bundle).not_to include_gems "nokogiri 1.4.2" @@ -350,7 +350,7 @@ RSpec.describe "bundle install with platform conditionals" do simulate_ruby_engine "ruby" gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "some_gem", :platform => :rbx G @@ -364,7 +364,7 @@ RSpec.describe "bundle install with platform conditionals" do other_ruby_version_tag = RUBY_VERSION =~ /^1\.8/ ? :ruby_19 : :ruby_18 gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "some_gem", platform: :#{other_ruby_version_tag} G @@ -377,7 +377,7 @@ RSpec.describe "bundle install with platform conditionals" do simulate_ruby_engine "ruby" gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack", :platform => [:mingw, :mswin, :x64_mingw, :jruby] G @@ -397,7 +397,7 @@ The dependency #{Gem::Dependency.new("rack", ">= 0")} will be unused by any of t simulate_ruby_engine "ruby" gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack", :platform => [:mingw, :mswin, :x64_mingw, :jruby] G |