diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-09-23 21:02:56 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-09-23 21:02:56 +0900 |
commit | 31a6eaabc165d8a222e176f2c809d90622d88ec2 (patch) | |
tree | b5333db2c13888ede5062ccd8ecca649ea261b4c /lib/rubygems/request | |
parent | f56fc720ee8cd4b79824a1c3843058b662a302bd (diff) |
Manually merged from https://github.com/rubygems/rubygems/pull/2636
Enable Style/EmptyLinesAroundClassBody rubocop cop.
Diffstat (limited to 'lib/rubygems/request')
-rw-r--r-- | lib/rubygems/request/connection_pools.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/request/http_pool.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/request/https_pool.rb | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/lib/rubygems/request/connection_pools.rb b/lib/rubygems/request/connection_pools.rb index 7f3988952c..1bd823a3c1 100644 --- a/lib/rubygems/request/connection_pools.rb +++ b/lib/rubygems/request/connection_pools.rb @@ -1,10 +1,13 @@ # frozen_string_literal: true class Gem::Request::ConnectionPools # :nodoc: + @client = Net::HTTP class << self + attr_accessor :client + end def initialize(proxy_uri, cert_files) @@ -92,4 +95,5 @@ class Gem::Request::ConnectionPools # :nodoc: net_http_args end end + end diff --git a/lib/rubygems/request/http_pool.rb b/lib/rubygems/request/http_pool.rb index 9985bbafa6..058094a209 100644 --- a/lib/rubygems/request/http_pool.rb +++ b/lib/rubygems/request/http_pool.rb @@ -6,6 +6,7 @@ # use it. class Gem::Request::HTTPPool # :nodoc: + attr_reader :cert_files, :proxy_uri def initialize(http_args, cert_files, proxy_uri) @@ -43,4 +44,5 @@ class Gem::Request::HTTPPool # :nodoc: connection.start connection end + end diff --git a/lib/rubygems/request/https_pool.rb b/lib/rubygems/request/https_pool.rb index 50f42d9e0d..1236079b7d 100644 --- a/lib/rubygems/request/https_pool.rb +++ b/lib/rubygems/request/https_pool.rb @@ -1,9 +1,11 @@ # frozen_string_literal: true class Gem::Request::HTTPSPool < Gem::Request::HTTPPool # :nodoc: + private def setup_connection(connection) Gem::Request.configure_connection_for_https(connection, @cert_files) super end + end |