Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix bug where bundle update foo wasn't working in many git cases

  • Loading branch information...
commit c26b2c309432bdcc5397ac0d3bac3831c2a30929 1 parent acf0d93
Carlhuda authored
Showing with 18 additions and 3 deletions.
  1. +2 −1  bin/bundle
  2. +1 −1  lib/bundler/source.rb
  3. +15 −1 spec/update/git_spec.rb
3  bin/bundle
View
@@ -13,8 +13,9 @@ begin
Bundler::CLI.start
rescue Bundler::BundlerError => e
Bundler.ui.error e.message
+ Bundler.ui.error e.backtrace.join("\n") if ENV["BUNDLE_DEBUG"]
exit e.status_code
rescue Interrupt
Bundler.ui.error "\nQuitting..."
exit 1
-end
+end
2  lib/bundler/source.rb
View
@@ -623,7 +623,7 @@ def checkout
def has_revision_cached?
return unless @revision
- git %|cat-file -t #{@revision}|
+ in_cache { git %|cat-file -t #{@revision}| }
$? == 0
end
16 spec/update/git_spec.rb
View
@@ -21,6 +21,20 @@
should_be_installed "foo 1.1"
end
+ it "updates correctly when you have like craziness" do
+ build_lib "activesupport", "3.0", :path => lib_path("rails/activesupport")
+ build_git "rails", "3.0", :path => lib_path("rails") do |s|
+ s.add_dependency "activesupport", "= 3.0"
+ end
+
+ install_gemfile <<-G
+ gem "rails", :git => "#{lib_path('rails')}"
+ G
+
+ bundle "update rails"
+ out.should include("Using activesupport (3.0) from #{lib_path('rails')} (at master)")
+ should_be_installed "rails 3.0", "activesupport 3.0"
+ end
it "floats on a branch when :branch is used and the source is specified in the update" do
build_git "foo", "1.0", :path => lib_path("foo")
update_git "foo", :branch => "omg", :path => lib_path("foo")
@@ -59,4 +73,4 @@
out.should include("Your bundle is complete!")
end
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.