change how dotfiles are handled
This commit is contained in:
parent
f8e5c9fcf7
commit
3801299847
@ -28,7 +28,7 @@ class PenchantCLI < Thor
|
||||
def gemfile(env = get_current_env)
|
||||
if env
|
||||
puts "[penchant] Rebunding for #{env} environment..."
|
||||
!Penchant::Gemfile.do_full_env_switch!(env)
|
||||
Penchant::Gemfile.do_full_env_switch!(env)
|
||||
end
|
||||
|
||||
gemfile = Penchant::Gemfile.new
|
||||
|
@ -7,6 +7,8 @@ module Penchant
|
||||
class << self
|
||||
def do_full_env_switch!(env)
|
||||
gemfile = Penchant::Gemfile.new
|
||||
run_dot_penchant!(gemfile_env) if has_dot_penchant?
|
||||
|
||||
if !gemfile.has_gemfile_erb?
|
||||
return false
|
||||
end
|
||||
@ -52,8 +54,6 @@ module Penchant
|
||||
|
||||
fh.print ERB.new(template).result(binding)
|
||||
end
|
||||
|
||||
run_dot_penchant!(gemfile_env) if has_dot_penchant?
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -114,8 +114,6 @@ ERB
|
||||
it { should have_dot_penchant }
|
||||
|
||||
it 'should process the file' do
|
||||
subject.expects(:run_dot_penchant!).with(:not)
|
||||
|
||||
subject.switch_to!(:not)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user