remove last vestiges of erb support

This commit is contained in:
John Bintz 2012-10-09 11:29:17 -04:00
parent a3fa16b6a7
commit 0ba33a008d
3 changed files with 6 additions and 46 deletions

View File

@ -49,28 +49,20 @@ module Penchant
File.file?('.penchant') File.file?('.penchant')
end end
def gemfile_erb_path
file_in_path('Gemfile.erb')
end
def gemfile_penchant_path def gemfile_penchant_path
file_in_path('Gemfile.penchant') file_in_path('Gemfile.penchant')
end end
def has_gemfile_erb?
File.file?(gemfile_erb_path)
end
def has_gemfile_penchant? def has_gemfile_penchant?
File.file?(gemfile_penchant_path) File.file?(gemfile_penchant_path)
end end
def has_processable_gemfile? def has_processable_gemfile?
has_gemfile_erb? || has_gemfile_penchant? has_gemfile_penchant?
end end
def processable_gemfile_path def processable_gemfile_path
has_gemfile_erb? ? gemfile_erb_path : gemfile_penchant_path gemfile_penchant_path
end end
def environment def environment

View File

@ -1,23 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
if File.file?('Gemfile.erb') puts "Bundling..."
pwd = Dir.pwd system %{bundle}
Dir.chdir '..' do
File.readlines(File.join(pwd, 'Gemfile.erb')).find_all { |line| line[':git'] }.each do |line|
repo = line[%r{:git => (['"])([^'"]+)\1}, 2]
puts "Installing #{repo}"
system %{git clone #{repo}}
end
end
puts "Bundling for local environment"
system %{script/gemfile local}
else
puts "Bundling..."
system %{bundle}
end
puts "Installing git hooks" puts "Installing git hooks"
system %{script/install-git-hooks} system %{script/install-git-hooks}

View File

@ -1,23 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
if File.file?('Gemfile.erb') puts "Bundling..."
pwd = Dir.pwd system %{bundle}
Dir.chdir '..' do
File.readlines(File.join(pwd, 'Gemfile.erb')).find_all { |line| line[':git'] }.each do |line|
repo = line[%r{:git => (['"])([^'"]+)\1}, 2]
puts "Installing #{repo}"
system %{git clone #{repo}}
end
end
puts "Bundling for local environment"
system %{script/gemfile local}
else
puts "Bundling..."
system %{bundle}
end
puts "Installing git hooks" puts "Installing git hooks"
system %{script/install-git-hooks} system %{script/install-git-hooks}