Skip to content

Commit

Permalink
GemDirectorySource index is name => [specs], not name => spec. Closes r…
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar authored and Yehuda Katz committed Nov 5, 2009
1 parent 3c70ded commit f58508d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/bundler/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f58508d

Please sign in to comment.