diff options
author | The Bundler Bot <bot@bundler.io> | 2018-06-20 04:17:46 +0000 |
---|---|---|
committer | The Bundler Bot <bot@bundler.io> | 2018-06-20 04:17:46 +0000 |
commit | c3e00619a5ce34ef14b57b33278f13969ac276e7 (patch) | |
tree | b6cf45b4ddaa1f821c0c071f1f32c66d3af8b64a /spec/install | |
parent | f9edd94ed088395ab4ea67d8a6a89a840384214b (diff) | |
parent | 033ed33b204ca01215c6191196be16ef9dd57682 (diff) | |
download | bundler-c3e00619a5ce34ef14b57b33278f13969ac276e7.tar.gz |
Auto merge of #6583 - bundler:skip-remove-auth-with-file-protocol, r=segiddins
Support URI::File of Ruby 2.6
### What was the end-user problem that led to this PR?
When users use file protocol with bundler, URI of Ruby 2.6 will raise auth info assignment and normalize host parameter given localhost variable with its case.
### Why did you choose this fix out of the possible options?
URI behavior of Ruby 2.6 is reasonable for me. Because I will fix this problem on bundler side.
Diffstat (limited to 'spec/install')
-rw-r--r-- | spec/install/failure_spec.rb | 4 | ||||
-rw-r--r-- | spec/install/gemfile/gemspec_spec.rb | 12 | ||||
-rw-r--r-- | spec/install/gemfile/sources_spec.rb | 8 | ||||
-rw-r--r-- | spec/install/gems/mirror_spec.rb | 6 | ||||
-rw-r--r-- | spec/install/post_bundle_message_spec.rb | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/spec/install/failure_spec.rb b/spec/install/failure_spec.rb index 588bd96ee2..49e2771dca 100644 --- a/spec/install/failure_spec.rb +++ b/spec/install/failure_spec.rb @@ -18,7 +18,7 @@ RSpec.describe "bundle install" do source "file:\/\/localhost#{gem_repo2}" gem "rails" G - expect(last_command.bundler_err).to end_with(<<-M.strip) + expect(last_command.bundler_err).to end_with(normalize_uri_file(<<-M.strip)) An error occurred while installing activesupport (2.3.2), and Bundler cannot continue. Make sure that `gem install activesupport -v '2.3.2' --source 'file://localhost#{gem_repo2}/'` succeeds before bundling. @@ -111,7 +111,7 @@ In Gemfile: gem "rails" end G - expect(last_command.bundler_err).to end_with(<<-M.strip) + expect(last_command.bundler_err).to end_with(normalize_uri_file(<<-M.strip)) An error occurred while installing activesupport (2.3.2), and Bundler cannot continue. Make sure that `gem install activesupport -v '2.3.2' --source 'file://localhost#{gem_repo2}/'` succeeds before bundling. diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb index 86cd2d8f3f..7ce037730e 100644 --- a/spec/install/gemfile/gemspec_spec.rb +++ b/spec/install/gemfile/gemspec_spec.rb @@ -442,7 +442,7 @@ RSpec.describe "bundle install from an existing gemspec" do context "as a runtime dependency" do it "keeps java dependencies in the lockfile" do expect(the_bundle).to include_gems "foo 1.0", "platform_specific 1.0 RUBY" - expect(lockfile).to eq strip_whitespace(<<-L) + expect(lockfile).to eq normalize_uri_file(strip_whitespace(<<-L)) PATH remote: . specs: @@ -473,7 +473,7 @@ RSpec.describe "bundle install from an existing gemspec" do it "keeps java dependencies in the lockfile" do expect(the_bundle).to include_gems "foo 1.0", "platform_specific 1.0 RUBY" - expect(lockfile).to eq strip_whitespace(<<-L) + expect(lockfile).to eq normalize_uri_file(strip_whitespace(<<-L)) PATH remote: . specs: @@ -505,7 +505,7 @@ RSpec.describe "bundle install from an existing gemspec" do it "keeps java dependencies in the lockfile" do expect(the_bundle).to include_gems "foo 1.0", "indirect_platform_specific 1.0", "platform_specific 1.0 RUBY" - expect(lockfile).to eq strip_whitespace(<<-L) + expect(lockfile).to eq normalize_uri_file(strip_whitespace(<<-L)) PATH remote: . specs: @@ -543,7 +543,7 @@ RSpec.describe "bundle install from an existing gemspec" do context "as a runtime dependency" do it "keeps java dependencies in the lockfile" do expect(the_bundle).to include_gems "foo 1.0", "platform_specific 1.0 RUBY" - expect(lockfile).to eq strip_whitespace(<<-L) + expect(lockfile).to eq normalize_uri_file(strip_whitespace(<<-L)) GEM remote: file://localhost#{gem_repo2}/ specs: @@ -574,7 +574,7 @@ RSpec.describe "bundle install from an existing gemspec" do it "keeps java dependencies in the lockfile" do expect(the_bundle).to include_gems "foo 1.0", "platform_specific 1.0 RUBY" - expect(lockfile).to eq strip_whitespace(<<-L) + expect(lockfile).to eq normalize_uri_file(strip_whitespace(<<-L)) GEM remote: file://localhost#{gem_repo2}/ specs: @@ -606,7 +606,7 @@ RSpec.describe "bundle install from an existing gemspec" do it "keeps java dependencies in the lockfile" do expect(the_bundle).to include_gems "foo 1.0", "indirect_platform_specific 1.0", "platform_specific 1.0 RUBY" - expect(lockfile).to eq strip_whitespace(<<-L) + expect(lockfile).to eq normalize_uri_file(strip_whitespace(<<-L)) GEM remote: file://localhost#{gem_repo2}/ specs: diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index 2cadc61161..384deca7c2 100644 --- a/spec/install/gemfile/sources_spec.rb +++ b/spec/install/gemfile/sources_spec.rb @@ -33,7 +33,7 @@ RSpec.describe "bundle install with gems on multiple sources" do expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") - expect(out).to include("Installed from: file://localhost#{gem_repo1}") + expect(out).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo1}")) expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0", :source => "remote1") end @@ -63,7 +63,7 @@ RSpec.describe "bundle install with gems on multiple sources" do expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") - expect(out).to include("Installed from: file://localhost#{gem_repo1}") + expect(out).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo1}")) expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0", :source => "remote1") end end @@ -253,7 +253,7 @@ RSpec.describe "bundle install with gems on multiple sources" do bundle :install expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") - expect(out).to include("Installed from: file://localhost#{gem_repo2}") + expect(out).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo2}")) expect(the_bundle).to include_gems("depends_on_rack 1.0.1", "rack 1.0.0") end end @@ -634,7 +634,7 @@ RSpec.describe "bundle install with gems on multiple sources" do gem "depends_on_rack" G expect(last_command).to be_failure - expect(last_command.stderr).to eq strip_whitespace(<<-EOS).strip + expect(last_command.stderr).to eq normalize_uri_file(strip_whitespace(<<-EOS).strip) The gem 'rack' was found in multiple relevant sources. * rubygems repository file://localhost#{gem_repo1}/ or installed locally * rubygems repository file://localhost#{gem_repo4}/ or installed locally diff --git a/spec/install/gems/mirror_spec.rb b/spec/install/gems/mirror_spec.rb index 89302615f1..4c35b8f206 100644 --- a/spec/install/gems/mirror_spec.rb +++ b/spec/install/gems/mirror_spec.rb @@ -13,7 +13,7 @@ RSpec.describe "bundle install with a mirror configured" do it "installs from the normal location" do bundle :install - expect(out).to include("Fetching source index from file://localhost#{gem_repo1}") + expect(out).to include(normalize_uri_file("Fetching source index from file://localhost#{gem_repo1}")) expect(the_bundle).to include_gems "rack 1.0" end end @@ -31,8 +31,8 @@ RSpec.describe "bundle install with a mirror configured" do it "installs the gem from the mirror" do bundle :install - expect(out).to include("Fetching source index from file://localhost#{gem_repo1}") - expect(out).not_to include("Fetching source index from file://localhost#{gem_repo2}") + expect(out).to include(normalize_uri_file("Fetching source index from file://localhost#{gem_repo1}")) + expect(out).not_to include(normalize_uri_file("Fetching source index from file://localhost#{gem_repo2}")) expect(the_bundle).to include_gems "rack 1.0" end end diff --git a/spec/install/post_bundle_message_spec.rb b/spec/install/post_bundle_message_spec.rb index 53a93845c2..eadc8a4d85 100644 --- a/spec/install/post_bundle_message_spec.rb +++ b/spec/install/post_bundle_message_spec.rb @@ -116,7 +116,7 @@ RSpec.describe "post bundle message" do gem "rack" gem "not-a-gem", :group => :development G - expect(out).to include <<-EOS.strip + expect(out).to include normalize_uri_file(<<-EOS.strip) Could not find gem 'not-a-gem' in rubygems repository file://localhost#{gem_repo1}/ or installed locally. The source does not contain any versions of 'not-a-gem' EOS |