summaryrefslogtreecommitdiff
path: root/lib/bundler/fetcher.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-08-23 12:21:58 -0700
committerSamuel Giddins <segiddins@segiddins.me>2016-01-25 10:45:41 -0600
commit2a000a4678013343ceaabe73c05d6230766123bb (patch)
tree3e05eb1421b43e4870e519621852524c67769ca8 /lib/bundler/fetcher.rb
parent80d7d02cc7ed5af620ae89ad62cfd08349b4bf20 (diff)
downloadbundler-2a000a4678013343ceaabe73c05d6230766123bb.tar.gz
make --full-index fall back to specs.4.8.gz
Diffstat (limited to 'lib/bundler/fetcher.rb')
-rw-r--r--lib/bundler/fetcher.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 9f8b046e65..f6aadf8b4f 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -111,12 +111,17 @@ module Bundler
old = Bundler.rubygems.sources
index = Bundler::Index.new
- specs = []
- fetchers.dup.each do |f|
- break unless f.api_fetcher? && !gem_names || !specs = f.specs(gem_names)
- fetchers.delete(f)
+ if Bundler::Fetcher.disable_endpoint
+ @use_api = false
+ specs = fetchers.last.specs(gem_names)
+ else
+ specs = []
+ fetchers.dup.each do |f|
+ break unless f.api_fetcher? && !gem_names || !specs = f.specs(gem_names)
+ fetchers.delete(f)
+ end
+ @use_api = false if fetchers.none?(&:api_fetcher?)
end
- @use_api = false if fetchers.none?(&:api_fetcher?)
specs.each do |spec|
next if spec.name == "bundler"