change how dotfiles are handled

This commit is contained in:
John Bintz 2011-08-31 21:39:50 -04:00
parent f8e5c9fcf7
commit 3801299847
3 changed files with 3 additions and 5 deletions

View File

@ -28,7 +28,7 @@ class PenchantCLI < Thor
def gemfile(env = get_current_env) def gemfile(env = get_current_env)
if env if env
puts "[penchant] Rebunding for #{env} environment..." puts "[penchant] Rebunding for #{env} environment..."
!Penchant::Gemfile.do_full_env_switch!(env) Penchant::Gemfile.do_full_env_switch!(env)
end end
gemfile = Penchant::Gemfile.new gemfile = Penchant::Gemfile.new

View File

@ -7,6 +7,8 @@ module Penchant
class << self class << self
def do_full_env_switch!(env) def do_full_env_switch!(env)
gemfile = Penchant::Gemfile.new gemfile = Penchant::Gemfile.new
run_dot_penchant!(gemfile_env) if has_dot_penchant?
if !gemfile.has_gemfile_erb? if !gemfile.has_gemfile_erb?
return false return false
end end
@ -52,8 +54,6 @@ module Penchant
fh.print ERB.new(template).result(binding) fh.print ERB.new(template).result(binding)
end end
run_dot_penchant!(gemfile_env) if has_dot_penchant?
end end
private private

View File

@ -114,8 +114,6 @@ ERB
it { should have_dot_penchant } it { should have_dot_penchant }
it 'should process the file' do it 'should process the file' do
subject.expects(:run_dot_penchant!).with(:not)
subject.switch_to!(:not) subject.switch_to!(:not)
end end
end end