summaryrefslogtreecommitdiff
path: root/lib/rubygems/remote_fetcher.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/remote_fetcher.rb')
-rw-r--r--lib/rubygems/remote_fetcher.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb
index 1e0c23dc33..b8cb9f9294 100644
--- a/lib/rubygems/remote_fetcher.rb
+++ b/lib/rubygems/remote_fetcher.rb
@@ -6,6 +6,7 @@ require 'rubygems/s3_uri_signer'
require 'rubygems/uri_formatter'
require 'rubygems/user_interaction'
require 'resolv'
+require 'rubygems/deprecate'
##
# RemoteFetcher handles the details of fetching gems and gem information from
@@ -14,6 +15,7 @@ require 'resolv'
class Gem::RemoteFetcher
include Gem::UserInteraction
+ extend Gem::Deprecate
##
# 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
+ def fetch_size(uri)
response = fetch_path(uri, nil, true)
response['content-length'].to_i
end
+ deprecate :fetch_size, :none, 2019, 12
+
##
# Performs a Net::HTTP request of type +request_class+ on +uri+ returning
# a Net::HTTP response object. request maintains a table of persistent