nicer behavior
This commit is contained in:
parent
6ec550ead7
commit
7f97c10cd3
15
bin/penchant
15
bin/penchant
|
@ -24,15 +24,22 @@ class PenchantCLI < Thor
|
||||||
gemfile(:remote)
|
gemfile(:remote)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "gemfile ENV", "Switch the gemfile environment"
|
desc "gemfile ENV", "Switch the gemfile environment, or rebuild the current environment if not given"
|
||||||
def gemfile(env)
|
def gemfile(env = get_current_env)
|
||||||
|
puts "[penchant] Rebunding for #{env} environment..."
|
||||||
Penchant::Gemfile.do_full_env_switch!(env)
|
Penchant::Gemfile.do_full_env_switch!(env)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "gemfile-env", "Get the gemfile environment"
|
desc "gemfile-env", "Get the gemfile environment"
|
||||||
def gemfile_env
|
def gemfile_env
|
||||||
gemfile = Penchant::Gemfile.new
|
puts get_current_end
|
||||||
puts gemfile.environment
|
end
|
||||||
|
|
||||||
|
no_tasks do
|
||||||
|
def get_current_env
|
||||||
|
gemfile = Penchant::Gemfile.new
|
||||||
|
gemfile.environment
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue