Class: Bundler::PersistentHTTP
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Class Chain: | |
| Instance Chain: | |
| Inherits: | Bundler::Persistent::Net::HTTP::Persistent 
 | 
| Defined in: | lib/bundler/vendored_persistent.rb | 
Constant Summary
Persistent::Net::HTTP::Persistent - Inherited
  
Class Method Summary
Persistent::Net::HTTP::Persistent - Inherited
| .detect_idle_timeout | Use this method to detect the idle timeout of the host at  | 
| .new | Creates a new  | 
Instance Attribute Summary
Persistent::Net::HTTP::Persistent - Inherited
| #ca_file | An SSL certificate authority. | 
| #ca_file= | Sets the SSL certificate authority file. | 
| #ca_path | A directory of SSL certificates to be used as certificate authorities. | 
| #ca_path= | Sets the SSL certificate authority path. | 
| #cert | For  | 
| #cert_store | An SSL certificate store. | 
| #cert_store= | Overrides the default SSL certificate store used for verifying connections. | 
| #certificate | This client’s  | 
| #certificate= | Sets this client’s  | 
| #ciphers | The ciphers allowed for SSL connections. | 
| #ciphers= | The ciphers allowed for SSL connections. | 
| #debug_output | Sends debug_output to this IO via  | 
| #headers | Headers that are added to every request using  | 
| #http_versions | Maps host:port to an HTTP version. | 
| #idle_timeout | Maximum time an unused connection can remain idle before being automatically closed. | 
| #keep_alive | The value sent in the Keep-Alive header. | 
| #key | For  | 
| #max_requests | Maximum number of requests on a connection before it is considered expired and automatically closed. | 
| #max_retries | Number of retries to perform if a request fails. | 
| #max_retries= | Set the maximum number of retries for a request. | 
| #max_version | Maximum SSL version to use, e.g.  | 
| #max_version= | maximum SSL version to use. | 
| #min_version | Minimum SSL version to use, e.g.  | 
| #min_version= | Minimum SSL version to use. | 
| #name | The name for this collection of persistent connections. | 
| #no_proxy | List of host suffixes which will not be proxied. | 
| #open_timeout | Seconds to wait until a connection is opened. | 
| #override_headers | Headers that are added to every request using  | 
| #private_key | This client’s SSL private key. | 
| #private_key= | Sets this client’s SSL private key. | 
| #proxy= | Sets the proxy server. | 
| #proxy_uri | The URL through which requests will be proxied. | 
| #read_timeout | Seconds to wait until reading one block. | 
| #reuse_ssl_sessions | By default SSL sessions are reused to avoid extra SSL handshakes. | 
| #socket_options | An array of options for  | 
| #ssl_timeout | SSL session lifetime. | 
| #ssl_timeout= | SSL session lifetime. | 
| #ssl_version | SSL version to use. | 
| #ssl_version= | SSL version to use. | 
| #verify_callback | SSL verification callback. | 
| #verify_callback= | SSL verification callback. | 
| #verify_depth | Sets the depth of SSL certificate verification. | 
| #verify_depth= | Sets the depth of SSL certificate verification. | 
| #verify_mode | HTTPS verify mode. | 
| #verify_mode= | Sets the HTTPS verify mode. | 
| #write_timeout | Seconds to wait until writing one block. | 
| #generation | Current connection generation. | 
| #pool | Test-only accessor for the connection pool. | 
| #ssl_generation | Current SSL connection generation. | 
| #timeout_key | Where this instance’s last-use times live in the thread local variables. | 
Instance Method Summary
Persistent::Net::HTTP::Persistent - Inherited
| #connection_for | Creates a new connection for  | 
| #escape | 
 | 
| #expired? | Returns true if the connection should be reset due to an idle timeout, or maximum request count, false otherwise. | 
| #finish | Finishes the  | 
| #http_version | Returns the HTTP protocol version for  | 
| #normalize_uri | Adds “http://” to the String  | 
| #proxy_bypass? | Returns true when proxy should by bypassed for host. | 
| #proxy_from_env | Creates a  | 
| #reconnect | Forces reconnection of all HTTP connections, including TLS/SSL connections. | 
| #reconnect_ssl | Forces reconnection of only TLS/SSL connections. | 
| #request | Makes a request on  | 
| #reset | Finishes then restarts the  | 
| #shutdown | Shuts down all connections. | 
| #ssl | Enables SSL on  | 
| #start | Starts the  | 
| #unescape | 
 | 
| #request_setup | Creates a GET request if  | 
Constructor Details
This class inherits a constructor from Bundler::Persistent::Net::HTTP::Persistent
Instance Method Details
#connection_for(uri)
[ GitHub ]# File 'lib/bundler/vendored_persistent.rb', line 15
def connection_for(uri) super(uri) do |connection| result = yield connection warn_old_tls_version_rubygems_connection(uri, connection) result end end
#warn_old_tls_version_rubygems_connection(uri, connection)
[ GitHub ]# File 'lib/bundler/vendored_persistent.rb', line 23
def warn_old_tls_version_rubygems_connection(uri, connection) return unless connection.http.use_ssl? return unless (uri.host || "").end_with?("rubygems.org") socket = connection.instance_variable_get(:@socket) return unless socket socket_io = socket.io return unless socket_io.respond_to?(:ssl_version) ssl_version = socket_io.ssl_version case ssl_version when /TLSv([\d\.]+)/ version = Gem::Version.new($1) if version < Gem::Version.new("1.2") Bundler.ui.warn \ "Warning: Your Ruby version is compiled against a copy of OpenSSL that is very old. " \ "Starting in January 2018, RubyGems.org will refuse connection requests from these " \ "very old versions of OpenSSL. If you will need to continue installing gems after " \ "January 2018, please follow this guide to upgrade: http://ruby.to/tls-outdated.", :wrap => true end end end