diff options
author | Carl Lerche <carllerche@mac.com> | 2010-06-05 19:55:54 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-06-05 19:55:54 -0700 |
commit | 19ad4e1b9a1cfcc5a9ccfd806f7a7a0069d1e9d9 (patch) | |
tree | 4378d863e38b89852b41ae477c4e77eef20d69b7 | |
parent | d2fc45a054337663f2154dd065ea95dfab051579 (diff) | |
download | bundler-19ad4e1b9a1cfcc5a9ccfd806f7a7a0069d1e9d9.tar.gz |
Don't generate a stub for bundler in ~/.bundler/bin
-rw-r--r-- | lib/bundler/installer.rb | 1 | ||||
-rw-r--r-- | spec/runtime/executable_spec.rb | 9 | ||||
-rw-r--r-- | spec/support/builders.rb | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index 4a54b1f7..b55c7556 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -44,6 +44,7 @@ module Bundler def generate_bundler_executable_stubs(spec) spec.executables.each do |executable| + next if executable == "bundle" File.open "#{Bundler.bin_path}/#{executable}", 'w', 0755 do |f| f.puts File.read(File.expand_path('../templates/Executable', __FILE__)) end diff --git a/spec/runtime/executable_spec.rb b/spec/runtime/executable_spec.rb index c0874529..0b28f093 100644 --- a/spec/runtime/executable_spec.rb +++ b/spec/runtime/executable_spec.rb @@ -66,4 +66,13 @@ describe "Running commands" do out.should == '2.0' end end + + it "don't bundle da bundla" do + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "bundler" + G + + home(".bundler/bin/bundle").should_not exist + end end
\ No newline at end of file diff --git a/spec/support/builders.rb b/spec/support/builders.rb index 8f3968a7..bedda0c8 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -144,6 +144,11 @@ module Spec s.add_c_extension end + build_gem "bundler", "0.9" do |s| + s.executables = "bundle" + s.write "bin/bundle", "puts 'FAIL'" + end + # The bundler 0.8 gem has a rubygems plugin that always loads :( build_gem "bundler", "0.8.1" do |s| s.write "lib/bundler/omg.rb", "" |