From df0154a2252019eef7844a61bb7d3ee2eaba7e3f Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 7 Aug 2012 10:55:55 -0400 Subject: [PATCH] run bundle update if it's needed, with the option to turn that off --- bin/penchant | 7 +++++++ lib/penchant/version.rb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/penchant b/bin/penchant index 6310ab3..9269fe7 100755 --- a/bin/penchant +++ b/bin/penchant @@ -41,6 +41,7 @@ class PenchantCLI < Thor method_options :deployment => false method_options :switch_back => false + method_options :no_auto_update => false desc "gemfile ENV", "Switch the gemfile environment, or rebuild the current environment if not given" def gemfile(env = get_current_env) check_git_hooks! @@ -62,7 +63,13 @@ class PenchantCLI < Thor puts "No Gemfile or Gemfile.penchant, exiting." exit 1 end + system %{bundle} + + # it's asking for bundle update, we know what we're doing + if $?.exitstatus == 6 and !options[:no_auto_update] + system %{bundle update} + end end desc "gemfile-env", "Get the gemfile environment" diff --git a/lib/penchant/version.rb b/lib/penchant/version.rb index 706add5..b062dc1 100644 --- a/lib/penchant/version.rb +++ b/lib/penchant/version.rb @@ -1,3 +1,3 @@ module Penchant - VERSION = "0.2.15" + VERSION = "0.2.16" end