Permalink
Browse files

Closes #707. bundle package removes .gem when source is changed to git

  • Loading branch information...
1 parent ae24ce9 commit d001d4971f84edc89efe21413a8b52e7eb875474 @hone hone committed Nov 10, 2010
Showing with 15 additions and 1 deletion.
  1. +1 −1 lib/bundler/runtime.rb
  2. +14 −0 spec/cache/gems_spec.rb
@@ -101,7 +101,7 @@ def prune_cache
spec = Gem::Format.from_file_by_path(path).spec
resolve.any? do |s|
- s.name == spec.name && s.version == spec.version
+ s.name == spec.name && s.version == spec.version && !s.source.is_a?(Bundler::Source::Git)
end
end
@@ -153,6 +153,20 @@
cached_gem("activesupport-2.3.2").should_not exist
end
+ it "removes .gems when gem changes to git source" do
+ build_git "rack"
+
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rack", :git => "#{lib_path("rack-1.0")}"
+ gem "actionpack"
+ G
+ cached_gem("rack-1.0.0").should_not exist
+ cached_gem("actionpack-2.3.2").should exist
+ cached_gem("activesupport-2.3.2").should exist
+ end
+
+
it "doesn't remove gems that are for another platform" do
simulate_platform "java" do
install_gemfile <<-G

0 comments on commit d001d49

Please sign in to comment.