summaryrefslogtreecommitdiff
path: root/lib/rubygems/remote_fetcher.rb
diff options
context:
space:
mode:
authorbronzdoc <[email protected]>2019-07-16 18:39:40 -0600
committerHiroshi SHIBATA <[email protected]>2019-07-31 07:47:02 +0800
commit41dd9f7e67c1d767a7d040cd79f26985e3996821 ()
treec67c1a48c16e031db9811630b53701d38bf7102e /lib/rubygems/remote_fetcher.rb
parenta34168f2ac674b2660fa895271faea258389a614 (diff)
[rubygems/rubygems] Deprecate Gem::RemoteFetcher#fetch_size
https://.com/rubygems/rubygems/commit/c2049c3276
-rw-r--r--lib/rubygems/remote_fetcher.rb6
1 files changed, 5 insertions, 1 deletions
@@ -6,6 +6,7 @@ require 'rubygems/s3_uri_signer'
require 'rubygems/uri_formatter'
require 'rubygems/user_interaction'
require 'resolv'
##
# RemoteFetcher handles the details of fetching gems and gem information from
@@ -14,6 +15,7 @@ require 'resolv'
class Gem::RemoteFetcher
include Gem::UserInteraction
##
# A FetchError exception wraps up the various possible IO and HTTP failures
@@ -321,12 +323,14 @@ class Gem::RemoteFetcher
##
# Returns the size of +uri+ in bytes.
- def fetch_size(uri) # TODO: phase this out
response = fetch_path(uri, nil, true)
response['content-length'].to_i
end
##
# Performs a Net::HTTP request of type +request_class+ on +uri+ returning
# a Net::HTTP response object. request maintains a table of persistent