diff options
author | Andre Arko <andre@arko.net> | 2014-04-13 13:44:09 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2014-04-13 14:06:46 -0700 |
commit | a95791a50ddecbc7705be75b9ab6a99f9fcff05f (patch) | |
tree | 6c72831797964f846403ff5e72845cdd313287e3 | |
parent | 731303445364cdfb705908f3b5952c9764930258 (diff) | |
download | bundler-a95791a50ddecbc7705be75b9ab6a99f9fcff05f.tar.gz |
move the cache path building code into rubygems
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 4 | ||||
-rw-r--r-- | lib/bundler/source/rubygems.rb | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index bd8d86c4bd..b994f2bf68 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -93,6 +93,10 @@ module Bundler Gem.path end + def gem_cache + gem_path.map{|p| File.expand_path("cache", p) } + end + def spec_cache_dirs @spec_cache_dirs ||= begin dirs = gem_path.map {|dir| File.join(dir, 'specifications')} diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 5dd7506604..59cea2261b 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -17,9 +17,7 @@ module Bundler @dependency_names = [] @allow_remote = false @allow_cached = false - - @caches = [ Bundler.app_cache ] + - Bundler.rubygems.gem_path.map{|p| File.expand_path("#{p}/cache") } + @caches = [Bundler.app_cache, *Bundler.rubygems.gem_cache] end def remote! |