diff options
author | Bundlerbot <bot@bundler.io> | 2020-01-05 01:17:33 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2020-01-05 01:17:33 +0000 |
commit | 4bf7ea614c9c3f0d4c39f22b80ea0622cd3598c7 (patch) | |
tree | a64123f16c0b0155ed6545c8dabbc8fc08fa90da /spec/runtime | |
parent | c0b90706c8c417c374ea0f9283def0117d0c7549 (diff) | |
parent | 92bdbeddfc6bcd11b9d7e9c6ebc2568875c7a4ce (diff) | |
download | bundler-4bf7ea614c9c3f0d4c39f22b80ea0622cd3598c7.tar.gz |
Merge #7529
7529: Remove optional require net-http-pipeline from vendored net-http-persistent. r=deivid-rodriguez a=marciotoshio
### What was the end-user problem that led to this PR?
See issue https://github.com/bundler/bundler/issues/7521.
### What was your diagnosis of the problem?
My diagnosis was If you have net-http-pipeline gem installed bundler loads it and you can't vendor it.
### What is your fix for the problem, implemented in this PR?
My fix is remove the optional require of net-http-pipeline.
### Why did you choose this fix out of the possible options?
I chose this fix because was a recommendation in the issue by @deivid-rodriguez
Fixes #7521.
Co-authored-by: David RodrÃguez <deivid.rodriguez@riseup.net>
Co-authored-by: Marcio Toshio <marcio@tosh.io>
Diffstat (limited to 'spec/runtime')
-rw-r--r-- | spec/runtime/require_spec.rb | 2 | ||||
-rw-r--r-- | spec/runtime/setup_spec.rb | 29 |
2 files changed, 25 insertions, 6 deletions
diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb index 490b8c7631..a8d7826123 100644 --- a/spec/runtime/require_spec.rb +++ b/spec/runtime/require_spec.rb @@ -168,7 +168,6 @@ RSpec.describe "Bundler.require" do build_lib "jquery-rails", "1.0.0" do |s| s.write "lib/jquery/rails.rb", "puts 'jquery/rails'" end - lib_path("jquery-rails-1.0.0/lib/jquery-rails.rb").rmtree end it "requires gem names that are namespaced" do @@ -241,7 +240,6 @@ RSpec.describe "Bundler.require" do build_lib "load-fuuu", "1.0.0" do |s| s.write "lib/load/fuuu.rb", "raise LoadError.new(\"cannot load such file -- load-bar\")" end - lib_path("load-fuuu-1.0.0/lib/load-fuuu.rb").rmtree gemfile <<-G path "#{lib_path}" do diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index 39240b7404..7f00a63078 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/runtime/setup_spec.rb @@ -899,17 +899,17 @@ end describe "with git gems that don't have gemspecs" do before :each do - build_git "no-gemspec", :gemspec => false + build_git "no_gemspec", :gemspec => false install_gemfile <<-G - gem "no-gemspec", "1.0", :git => "#{lib_path("no-gemspec-1.0")}" + gem "no_gemspec", "1.0", :git => "#{lib_path("no_gemspec-1.0")}" G end it "loads the library via a virtual spec" do run <<-R - require 'no-gemspec' - puts NOGEMSPEC + require 'no_gemspec' + puts NO_GEMSPEC R expect(out).to eq("1.0") @@ -1263,6 +1263,27 @@ end expect(out).to eq("{}") end + it "does not load net-http-pipeline too early" do + build_repo4 do + build_gem "net-http-pipeline", "1.0.1" + end + + system_gems "net-http-pipeline-1.0.1", :gem_repo => gem_repo4 do + gemfile <<-G + source "#{file_uri_for(gem_repo4)}" + gem "net-http-pipeline", "1.0.1" + G + + bundle "config set --local path vendor/bundle" + + bundle! :install + + bundle! :check + + expect(out).to eq("The Gemfile's dependencies are satisfied") + end + end + Gem::Specification.select(&:default_gem?).map(&:name).each do |g| it "activates newer versions of #{g}" do skip if exemptions.include?(g) |