diff options
author | Andre Arko <andre@arko.net> | 2010-11-12 00:35:57 -0600 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2010-11-12 10:52:26 -0600 |
commit | 9eeebb3229694abe530571cf4c4f867d915a2840 (patch) | |
tree | aa47a8da8c9ca5de06036fc057e4f5df503307fc /lib/bundler/remote_specification.rb | |
parent | 80f56e13d1275d288552af80d5a2bff4b80c9388 (diff) | |
download | bundler-9eeebb3229694abe530571cf4c4f867d915a2840.tar.gz |
Extract index and gemspec fetching into Bundler::Fetcher
Diffstat (limited to 'lib/bundler/remote_specification.rb')
-rw-r--r-- | lib/bundler/remote_specification.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/bundler/remote_specification.rb b/lib/bundler/remote_specification.rb index 3851014cf4..5fe95053f6 100644 --- a/lib/bundler/remote_specification.rb +++ b/lib/bundler/remote_specification.rb @@ -12,11 +12,11 @@ module Bundler attr_reader :name, :version, :platform attr_accessor :source - def initialize(name, version, platform, source_uri) - @name = name - @version = version - @platform = platform - @source_uri = source_uri + def initialize(name, version, platform, spec_fetcher) + @name = name + @version = version + @platform = platform + @spec_fetcher = spec_fetcher end # Needed before installs, since the arch matters then and quick @@ -43,9 +43,7 @@ module Bundler private def _remote_specification - @specification ||= begin - Gem::SpecFetcher.new.fetch_spec([@name, @version, @platform], URI(@source_uri.to_s)) - end + @specification ||= @spec_fetcher.fetch_spec([@name, @version, @platform]) end def method_missing(method, *args, &blk) |