Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Closes #707. bundle package removes .gem when source is changed to git
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed Nov 10, 2010
1 parent ae24ce9 commit d001d49
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundler/runtime.rb
Expand Up @@ -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

Expand Down
14 changes: 14 additions & 0 deletions spec/cache/gems_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit d001d49

Please sign in to comment.