diff options
author | bronzdoc <lsagastume1990@gmail.com> | 2019-07-16 18:39:40 -0600 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-07-31 07:47:02 +0800 |
commit | 41dd9f7e67c1d767a7d040cd79f26985e3996821 (patch) | |
tree | c67c1a48c16e031db9811630b53701d38bf7102e /lib | |
parent | a34168f2ac674b2660fa895271faea258389a614 (diff) | |
download | ruby-41dd9f7e67c1d767a7d040cd79f26985e3996821.tar.gz |
[rubygems/rubygems] Deprecate Gem::RemoteFetcher#fetch_size
https://github.com/rubygems/rubygems/commit/c2049c3276
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/remote_fetcher.rb | 6 |
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 |