diff options
author | Bundlerbot <bot@bundler.io> | 2019-12-15 13:25:17 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-12-15 13:25:17 +0000 |
commit | 683fe9799e37bff81e53f1a7e97d3a19896b8fc9 (patch) | |
tree | 94b2370a0b229af606696ba900254e28cf95f0ed /lib/bundler/rubygems_integration.rb | |
parent | 9e06edc33f7f1e8eeec370ff33a279b4d9bd1b9b (diff) | |
parent | c40d5e15898ae5679f89969ec22a2efb9b4f68c4 (diff) | |
download | bundler-683fe9799e37bff81e53f1a7e97d3a19896b8fc9.tar.gz |
Merge #7479v2.1.0
7479: Get ready for 2.1.0 release r=deivid-rodriguez a=deivid-rodriguez
### What was the end-user problem that led to this PR?
The problem was we want to release bundler 2.1.0 before ruby 2.7.0 ships, so that bundler 2.1.0 can be included with ruby 2.7.0.
### What is your fix for the problem, implemented in this PR?
My fix is to get ready for the release.
Co-authored-by: Bundlerbot <bot@bundler.io>
Co-authored-by: David RodrÃguez <deivid.rodriguez@riseup.net>
Diffstat (limited to 'lib/bundler/rubygems_integration.rb')
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 18 |
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) |