summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/rubygems_integration.rb4
-rw-r--r--lib/bundler/source/rubygems.rb4
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!