diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-06-11 12:48:34 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:30:00 +0900 |
commit | 97f3ceeaa5c66ad6a6a5f3f37339c4b1cbe71677 (patch) | |
tree | 74cac7d79d12333589a7e4220c69da3ff403ef29 /lib/bundler/vendored_persistent.rb | |
parent | 2b7e39f364d76c74af6e04aa3d96888a6aeef1cd (diff) | |
download | ruby-97f3ceeaa5c66ad6a6a5f3f37339c4b1cbe71677.tar.gz |
[bundler/bundler] 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.
https://github.com/bundler/bundler/commit/0575baa6bb
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) |