summaryrefslogtreecommitdiff
path: root/lib/bundler/rubygems_integration.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-06 13:25:31 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-06 23:52:10 +0100
commit34d7fa5462c50701cdae896d9cf004c050f5bfe2 (patch)
tree5f2eab9a716c6e1366d49e3857199fff8e123909 /lib/bundler/rubygems_integration.rb
parent25595896eb0f8dfd004d941093bf1d8f4a39aeeb (diff)
downloadbundler-34d7fa5462c50701cdae896d9cf004c050f5bfe2.tar.gz
Remove unnecessary parameter to `fetch_specs`
Diffstat (limited to 'lib/bundler/rubygems_integration.rb')
-rw-r--r--lib/bundler/rubygems_integration.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 9b23a5c4c8..0d4dc75dbd 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -502,8 +502,8 @@ module Bundler
end
end
- def fetch_specs(source, remote, name)
- path = source + "#{name}.#{Gem.marshal_version}.gz"
+ def fetch_specs(remote, name)
+ path = remote.uri.to_s + "#{name}.#{Gem.marshal_version}.gz"
fetcher = gem_remote_fetcher
fetcher.headers = { "X-Gemfile-Source" => remote.original_uri.to_s } if remote.original_uri
string = fetcher.fetch_path(path)
@@ -514,10 +514,8 @@ module Bundler
end
def fetch_all_remote_specs(remote)
- source = remote.uri.is_a?(URI) ? remote.uri : URI.parse(source.to_s)
-
- specs = fetch_specs(source, remote, "specs")
- pres = fetch_specs(source, remote, "prerelease_specs") || []
+ specs = fetch_specs(remote, "specs")
+ pres = fetch_specs(remote, "prerelease_specs") || []
specs.concat(pres)
end