summaryrefslogtreecommitdiff
path: root/lib/bundler/rubygems_integration.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-12-14 19:49:16 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-12-15 16:41:10 +0900
commit38002a8adbd98266426940d829429a30af0622a4 (patch)
treedb01bcc2653ba0230a07345c4a3c877246dfe473 /lib/bundler/rubygems_integration.rb
parente2b192f7d5b4f0e2133bb6cf03cfc609258826be (diff)
Prepare to release bundler-2.1.0
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2753
Diffstat (limited to 'lib/bundler/rubygems_integration.rb')
-rw-r--r--lib/bundler/rubygems_integration.rb18
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index c4950d14e8..bb63209632 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -247,12 +247,6 @@ module Bundler
EXT_LOCK
end
- def fetch_prerelease_specs
- fetch_specs(false, true)
- rescue Gem::RemoteFetcher::FetchError
- {} # if we can't download them, there aren't any
- end
-
def with_build_args(args)
ext_lock.synchronize do
old_args = build_args
@@ -531,8 +525,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)
@@ -543,10 +537,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
@@ -564,7 +556,7 @@ module Bundler
require "resolv"
proxy = configuration[:http_proxy]
dns = Resolv::DNS.new
- Bundler::GemRemoteFetcher.new(proxy, dns)
+ Gem::RemoteFetcher.new(proxy, dns)
end
def gem_from_path(path, policy = nil)