support for local bundling only
This commit is contained in:
parent
635e07a112
commit
832ec8f30c
@ -135,6 +135,8 @@ end
|
|||||||
Run `penchant gemfile ENV --deployment` to get this behavior. This is run by default when the
|
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.
|
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?!
|
#### 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
|
Probably not. You probably have the "main" gems in your project locked to a version of Rails or
|
||||||
|
11
bin/penchant
11
bin/penchant
@ -52,6 +52,7 @@ source :rubygems
|
|||||||
method_options :deployment => false
|
method_options :deployment => false
|
||||||
method_options :switch_back => false
|
method_options :switch_back => false
|
||||||
method_options :no_auto_update => 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"
|
desc "gemfile ENV", "Switch the gemfile environment, or rebuild the current environment if not given"
|
||||||
def gemfile(env = get_current_env)
|
def gemfile(env = get_current_env)
|
||||||
check_git_hooks!
|
check_git_hooks!
|
||||||
@ -74,11 +75,17 @@ source :rubygems
|
|||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
system %{bundle}
|
command = %{bundle}
|
||||||
|
command << " --local" if options[:local]
|
||||||
|
|
||||||
|
system command
|
||||||
|
|
||||||
# it's asking for bundle update, we know what we're doing
|
# it's asking for bundle update, we know what we're doing
|
||||||
if $?.exitstatus == 6 and !options[:no_auto_update]
|
if $?.exitstatus == 6 and !options[:no_auto_update]
|
||||||
system %{bundle update}
|
command = %{bundle update}
|
||||||
|
command << " --local" if options[:local]
|
||||||
|
|
||||||
|
system command
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module Penchant
|
module Penchant
|
||||||
VERSION = "0.2.21"
|
VERSION = "0.2.22"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user