aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2014-08-15 21:43:50 -0700
committerAndre Arko <andre@arko.net>2014-08-16 11:26:48 -0700
commitaf3bd954af94a0e9b89bc61558113de45ed43efc (patch)
treee9dcd22be3da14ee145a5fe89709b963f3c73671 /lib/bundler
parentdbc24d0b53065aa13fbf51ab891916911a40b1a4 (diff)
downloadbundler-af3bd954af94a0e9b89bc61558113de45ed43efc.tar.gz
extract Rubygems#fetcher
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/source/rubygems.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index cbc1d7cd..add49795 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -13,7 +13,6 @@ module Bundler
def initialize(options = {})
@options = options
@remotes = []
- @fetchers = {}
@dependency_names = []
@allow_remote = false
@allow_cached = false
@@ -270,9 +269,14 @@ module Bundler
idx
end
+ def fetchers
+ @fetchers ||= remotes.map do |url|
+ Bundler::Fetcher.new(url)
+ end
+ end
+
def remote_specs
@remote_specs ||= Index.build do |idx|
- fetchers = remotes.map { |uri| Bundler::Fetcher.new(uri) }
api_fetchers = fetchers.select { |f| f.use_api }
index_fetchers = fetchers - api_fetchers