Permalink
Browse files

GemDirectorySource index is name => [specs], not name => spec. Closes #…

  • Loading branch information...
1 parent 3c70ded commit f58508dffc3d532297b873388de7438f48a3ac06 @ddollar ddollar committed with Yehuda Katz Oct 26, 2009
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/bundler/repository.rb
View
10 lib/bundler/repository.rb
@@ -64,10 +64,12 @@ def prune(dependencies, sources)
sources = only_local(sources)
bundle = Resolver.resolve(dependencies, [@cache] + sources)
- @cache.gems.each do |name, spec|
- unless bundle.any? { |s| s.name == spec.name && s.version == spec.version }
- Bundler.logger.info "Pruning #{spec.name} (#{spec.version}) from the cache"
- FileUtils.rm @path.join("cache", "#{spec.full_name}.gem")
+ @cache.gems.each do |name, specs|
+ specs.each do |spec|
+ unless bundle.any? { |s| s.name == spec.name && s.version == spec.version }
+ Bundler.logger.info "Pruning #{spec.name} (#{spec.version}) from the cache"
+ FileUtils.rm @path.join("cache", "#{spec.full_name}.gem")
+ end
end
end
end

0 comments on commit f58508d

Please sign in to comment.