diff --git a/README.md b/README.md index ca885a0..037f447 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,8 @@ end Run `penchant gemfile ENV --deployment` to get this behavior. This is run by default when the pre-commit git hook runs, but only after the default Rake task passes. +If you just want any locally installed gems, add the `--local` switch. Great if rubygems.org is down! + #### Won't this change the project dependencies?! Probably not. You probably have the "main" gems in your project locked to a version of Rails or diff --git a/bin/penchant b/bin/penchant index d6708d4..3c6280c 100755 --- a/bin/penchant +++ b/bin/penchant @@ -52,6 +52,7 @@ source :rubygems method_options :deployment => false method_options :switch_back => false method_options :no_auto_update => false + method_options :local => 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! @@ -74,11 +75,17 @@ source :rubygems exit 1 end - system %{bundle} + command = %{bundle} + command << " --local" if options[:local] + + system command # it's asking for bundle update, we know what we're doing if $?.exitstatus == 6 and !options[:no_auto_update] - system %{bundle update} + command = %{bundle update} + command << " --local" if options[:local] + + system command end end diff --git a/lib/penchant/version.rb b/lib/penchant/version.rb index 945bfb6..fe387bd 100644 --- a/lib/penchant/version.rb +++ b/lib/penchant/version.rb @@ -1,3 +1,3 @@ module Penchant - VERSION = "0.2.21" + VERSION = "0.2.22" end