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)
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

View File

@ -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

View File

@ -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