From ef131c0a886b1ea3d9665c59de5dbcd3c51defec Mon Sep 17 00:00:00 2001 From: Kevin Faustino Date: Sat, 29 Jan 2011 15:57:46 -0500 Subject: [PATCH] Update all recipes to use templater.post_bundler --- lib/template_framework/recipes/cucumber.rb | 2 +- lib/template_framework/recipes/design.rb | 2 +- lib/template_framework/recipes/factory_girl.rb | 2 +- lib/template_framework/recipes/jquery.rb | 2 +- lib/template_framework/recipes/mongoid.rb | 2 +- lib/template_framework/recipes/remarkable.rb | 2 +- lib/template_framework/recipes/rspec.rb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/template_framework/recipes/cucumber.rb b/lib/template_framework/recipes/cucumber.rb index 2c3939d..bfabf52 100644 --- a/lib/template_framework/recipes/cucumber.rb +++ b/lib/template_framework/recipes/cucumber.rb @@ -7,7 +7,7 @@ cucumber_generate_command << ' --rspec' if templater.testing_framework.rspec? cucumber_generate_command << ' --testunit' if templater.testing_framework.test_unit? -templater.post_bundler_strategies << lambda do +templater.post_bundler do generate cucumber_generate_command gsub_file 'features/support/env.rb', diff --git a/lib/template_framework/recipes/design.rb b/lib/template_framework/recipes/design.rb index 25e6aaa..fd2f302 100644 --- a/lib/template_framework/recipes/design.rb +++ b/lib/template_framework/recipes/design.rb @@ -17,7 +17,7 @@ compass_command = "compass init rails . --using blueprint/semantic --css-dir=#{compass_css_dir} --sass-dir=#{compass_sass_dir} " - templater.post_bundler_strategies << lambda do + templater.post_bundler do puts "Beginning Compass setup" run compass_command puts "Compass has been setup" diff --git a/lib/template_framework/recipes/factory_girl.rb b/lib/template_framework/recipes/factory_girl.rb index 9229f7b..89e90ea 100644 --- a/lib/template_framework/recipes/factory_girl.rb +++ b/lib/template_framework/recipes/factory_girl.rb @@ -2,7 +2,7 @@ say("\nReplacing Fixtures with FactoryGirl\n", Thor::Shell::Color::YELLOW) gem 'factory_girl_rails', '1.1.beta1', :group => :test - templater.post_bundler_strategies << lambda do + templater.post_bundler do inject_into_file 'spec/spec_helper.rb', "\nrequire 'factory_girl'", :after => "require 'rspec/rails'" environment templater.load_snippet('generator', 'factory_girl') diff --git a/lib/template_framework/recipes/jquery.rb b/lib/template_framework/recipes/jquery.rb index 8eadce4..f539c50 100644 --- a/lib/template_framework/recipes/jquery.rb +++ b/lib/template_framework/recipes/jquery.rb @@ -2,6 +2,6 @@ gsub_file 'config/application.rb', /(config.action_view.javascript_expansions\[:defaults\] = %w\(\))/, '# \1' -templater.post_bundler_strategies << lambda do +templater.post_bundler do generate 'jquery:install' end \ No newline at end of file diff --git a/lib/template_framework/recipes/mongoid.rb b/lib/template_framework/recipes/mongoid.rb index 17867bc..c234015 100644 --- a/lib/template_framework/recipes/mongoid.rb +++ b/lib/template_framework/recipes/mongoid.rb @@ -3,7 +3,7 @@ gsub_file 'config/application.rb', 'require "active_record/railtie"', '# require "active_record/railtie"' -templater.post_bundler_strategies << lambda do +templater.post_bundler do generate 'mongoid:config' run 'cp config/mongoid.yml config/mongoid.yml.example' end diff --git a/lib/template_framework/recipes/remarkable.rb b/lib/template_framework/recipes/remarkable.rb index bdeb5d5..6a4a6ab 100644 --- a/lib/template_framework/recipes/remarkable.rb +++ b/lib/template_framework/recipes/remarkable.rb @@ -7,6 +7,6 @@ require_remarkable = "\nrequire 'remarkable/active_record'" end -templater.post_bundler_strategies << lambda do +templater.post_bundler do inject_into_file 'spec/spec_helper.rb', require_remarkable, :after => "require 'rspec/rails'" end diff --git a/lib/template_framework/recipes/rspec.rb b/lib/template_framework/recipes/rspec.rb index 5c7f11c..208ea25 100644 --- a/lib/template_framework/recipes/rspec.rb +++ b/lib/template_framework/recipes/rspec.rb @@ -3,7 +3,7 @@ remove_dir 'test' gsub_file 'config/application.rb', 'require "rails/test_unit/railtie"', '# require "rails/test_unit/railtie"' -templater.post_bundler_strategies << lambda do +templater.post_bundler do generate 'rspec:install' spec_helper_path = 'spec/spec_helper.rb'