diff options
author | Marcio Toshio <marcio@tosh.io> | 2019-12-31 10:02:12 -0300 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-03 10:27:47 +0100 |
commit | 92bdbeddfc6bcd11b9d7e9c6ebc2568875c7a4ce (patch) | |
tree | 643ea2abd27434f4a7943dbfaa896095a3aa6cb8 | |
parent | 2e70a1934e65fff0b1eed36ebf2f9d83e9fbe81b (diff) | |
download | bundler-92bdbeddfc6bcd11b9d7e9c6ebc2568875c7a4ce.tar.gz |
Remove require net-http-pipeline from vendored net-http-persistent.
-rw-r--r-- | lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb | 22 | ||||
-rw-r--r-- | spec/runtime/setup_spec.rb | 21 |
2 files changed, 21 insertions, 22 deletions
diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb index e9c4c3e89e..f9d1401062 100644 --- a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +++ b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb @@ -3,11 +3,6 @@ require_relative '../../../../uri/lib/uri' require 'cgi' # for escaping require_relative '../../../../connection_pool/lib/connection_pool' -begin - require 'net/http/pipeline' -rescue LoadError -end - autoload :OpenSSL, 'openssl' ## @@ -774,23 +769,6 @@ class Bundler::Persistent::Net::HTTP::Persistent end ## - # Pipelines +requests+ to the HTTP server at +uri+ yielding responses if a - # block is given. Returns all responses received. - # - # See - # Net::HTTP::Pipeline[http://docs.seattlerb.org/net-http-pipeline/Net/HTTP/Pipeline.html] - # for further details. - # - # Only if <tt>net-http-pipeline</tt> was required before - # <tt>net-http-persistent</tt> #pipeline will be present. - - def pipeline uri, requests, &block # :yields: responses - connection_for uri do |connection| - connection.http.pipeline requests, &block - end - end - - ## # Sets this client's SSL private key def private_key= key diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index 0401de6fca..7f00a63078 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/runtime/setup_spec.rb @@ -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) |