diff options
author | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-01 09:41:32 +0000 |
---|---|---|
committer | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-01 09:41:32 +0000 |
commit | 25a9b62d45ddd60a231272567c7dda9337da9b62 (patch) | |
tree | e72ba4c9c01cba5fb510eb1eafaba76d998baf4c /lib/rubygems/test_utilities.rb | |
parent | 86bb0af7ea3b50f72e6845a6f5f64cb1b23fd279 (diff) | |
download | ruby-25a9b62d45ddd60a231272567c7dda9337da9b62.tar.gz |
Import rubygems 1.6.0 (released version @ 58d8a0b9)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/test_utilities.rb')
-rw-r--r-- | lib/rubygems/test_utilities.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/rubygems/test_utilities.rb b/lib/rubygems/test_utilities.rb index 892e4dd9e5..43f905f017 100644 --- a/lib/rubygems/test_utilities.rb +++ b/lib/rubygems/test_utilities.rb @@ -104,7 +104,7 @@ class Gem::FakeFetcher def download spec, source_uri, install_dir = Gem.dir name = spec.file_name - path = File.join(install_dir, 'cache', name) + path = Gem.cache_gem(name, install_dir) Gem.ensure_gem_subdirectories install_dir @@ -119,6 +119,16 @@ class Gem::FakeFetcher path end + def download_to_cache dependency + found = Gem::SpecFetcher.fetcher.fetch dependency + + return if found.empty? + + spec, source_uri = found.first + + download spec, source_uri + end + end # :stopdoc: |