Skip to content

Commit

Permalink
Remove generated .gem files after installing a gem from a :path
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Apr 18, 2010
1 parent 3e796f8 commit a6994c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/bundler/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ def generate_bin(spec)
end

Bundler.ui.warn "The validation message from Rubygems was:\n #{e.message}"
ensure
Dir.chdir(gem_dir){ FileUtils.rm_rf(File.join(gem_dir, gem_file)) }
end

end
Expand Down
12 changes: 11 additions & 1 deletion spec/install/path_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
should_be_installed "foo 1.0"
end

it "setups up executables" do
it "sets up executables" do
pending_jruby_shebang_fix

build_lib "foo" do |s|
Expand All @@ -100,6 +100,16 @@
out.should == "1.0"
end

it "removes the .gem file after installing" do
build_lib "foo"

install_gemfile <<-G
gem 'foo', :path => "#{lib_path('foo-1.0')}"
G

lib_path('foo-1.0').join('foo-1.0.gem').should_not exist
end

describe "block syntax" do
it "pulls all gems from a path block" do
build_lib "omg"
Expand Down

0 comments on commit a6994c7

Please sign in to comment.