diff options
author | Andre Arko <andre@arko.net> | 2014-08-15 21:43:50 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2014-08-16 11:26:48 -0700 |
commit | af3bd954af94a0e9b89bc61558113de45ed43efc (patch) | |
tree | e9dcd22be3da14ee145a5fe89709b963f3c73671 | |
parent | dbc24d0b53065aa13fbf51ab891916911a40b1a4 (diff) | |
download | bundler-af3bd954af94a0e9b89bc61558113de45ed43efc.tar.gz |
extract Rubygems#fetcher
-rw-r--r-- | lib/bundler/source/rubygems.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index cbc1d7cd16..add4979519 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 |