summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-04-16 15:34:58 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-06-04 23:53:37 -0500
commita2b5419a08edcc98c53d79960b91f383583dab0b (patch)
treefba5142862fa37c3c9eccc50e8d98e560cf8ac0a
parent17df6d6003d5f9df3bbe3bb811d5329687808049 (diff)
downloadbundler-a2b5419a08edcc98c53d79960b91f383583dab0b.tar.gz
fix gemspec caching
-rw-r--r--lib/bundler/runtime.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index b0ff6f5ae2..3a86fe9226 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -117,16 +117,9 @@ module Bundler
Bundler.ui.info "Updating files in #{Bundler.settings.app_cache_path}"
- # Do not try to cache specification for the gem described any of the gemspecs
- root_gem_names = nil
- if gemspec_cache_hash = Bundler.instance_variable_get(:@gemspec_cache)
- gemspecs = gemspec_cache_hash.values
- root_gem_names = gemspecs.map(&:name)
- end
-
specs.each do |spec|
next if spec.name == "bundler"
- next if !Dir.glob("*.gemspec").empty? && spec.source.class == Bundler::Source::Path && root_gem_names.include?(spec.name)
+ next if spec.source.is_a?(Source::Gemspec)
spec.source.send(:fetch_gem, spec) if Bundler.settings[:cache_all_platforms] && spec.source.respond_to?(:fetch_gem, true)
spec.source.cache(spec, custom_path) if spec.source.respond_to?(:cache)
end