diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-06-11 12:48:34 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-24 21:43:07 +0200 |
commit | 0575baa6bb50264964c6c1896218e83ef7ed5025 (patch) | |
tree | 179418cb4559ddc971cf4f57bddf98b379e58239 /lib/bundler/vendored_persistent.rb | |
parent | a8874423f347efa52d69b332cc855def812e9b5b (diff) | |
download | bundler-0575baa6bb50264964c6c1896218e83ef7ed5025.tar.gz |
Bump net-http-persistent to 3.0.1
* Adds an extra artifice task to vendorize new `connection_pool`
dependency.
* Cherry-pick's needed Windows fix not yet merged into master branch of
`net-http-persistent`.
* Update bundler usages to be compatible with the new version, and fix
unit specs.
Diffstat (limited to 'lib/bundler/vendored_persistent.rb')
-rw-r--r-- | lib/bundler/vendored_persistent.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/bundler/vendored_persistent.rb b/lib/bundler/vendored_persistent.rb index 7670b83992..045a761dac 100644 --- a/lib/bundler/vendored_persistent.rb +++ b/lib/bundler/vendored_persistent.rb @@ -20,13 +20,15 @@ require_relative "vendor/net-http-persistent/lib/net/http/persistent" module Bundler class PersistentHTTP < Persistent::Net::HTTP::Persistent def connection_for(uri) - connection = super - warn_old_tls_version_rubygems_connection(uri, connection) - connection + super(uri) do |connection| + result = yield connection + warn_old_tls_version_rubygems_connection(uri, connection) + result + end end def warn_old_tls_version_rubygems_connection(uri, connection) - return unless connection.use_ssl? + return unless connection.http.use_ssl? return unless (uri.host || "").end_with?("rubygems.org") socket = connection.instance_variable_get(:@socket) |