summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Lapointe <hunter_spawn@hotmail.com>2018-08-21 00:05:40 -0400
committerMaxime Lapointe <hunter_spawn@hotmail.com>2018-08-27 10:14:20 -0400
commit7667639716d7fecd822265d49c98b459fbecbf87 (patch)
treed75b663af1ae72e9100ca77f691c48f93a195c1b
parent8e685af1c78e4e77827eb9b718f5eddb09a89aaa (diff)
downloadbundler-7667639716d7fecd822265d49c98b459fbecbf87.tar.gz
Clarify variable options => headers
-rw-r--r--lib/bundler/fetcher/downloader.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/fetcher/downloader.rb b/lib/bundler/fetcher/downloader.rb
index cbc5e220bd..e77fbba33c 100644
--- a/lib/bundler/fetcher/downloader.rb
+++ b/lib/bundler/fetcher/downloader.rb
@@ -11,10 +11,10 @@ module Bundler
@redirect_limit = redirect_limit
end
- def fetch(uri, options = {}, counter = 0)
+ def fetch(uri, headers = {}, counter = 0)
raise HTTPError, "Too many redirects" if counter >= redirect_limit
- response = request(uri, options)
+ response = request(uri, headers)
Bundler.ui.debug("HTTP #{response.code} #{response.message} #{uri}")
case response
@@ -26,7 +26,7 @@ module Bundler
new_uri.user = uri.user
new_uri.password = uri.password
end
- fetch(new_uri, options, counter + 1)
+ fetch(new_uri, headers, counter + 1)
when Net::HTTPRequestEntityTooLarge
raise FallbackError, response.body
when Net::HTTPUnauthorized
@@ -38,11 +38,11 @@ module Bundler
end
end
- def request(uri, options)
+ def request(uri, headers)
validate_uri_scheme!(uri)
Bundler.ui.debug "HTTP GET #{uri}"
- req = Net::HTTP::Get.new uri.request_uri, options
+ req = Net::HTTP::Get.new uri.request_uri, headers
if uri.user
user = CGI.unescape(uri.user)
password = uri.password ? CGI.unescape(uri.password) : nil