lib/playmo/recipes/markup_recipe.rb in playmo-0.0.18 vs lib/playmo/recipes/markup_recipe.rb in playmo-0.1.0

- old
+ new

@@ -1,34 +1,21 @@ -module Playmo - module Recipes - class MarkupRecipe < Playmo::Recipe - def setup - question "Please choose markup language you prefer to use" do - answer "Erb (by default)" => :install_erb - answer "Haml" => :install_haml - answer "Slim" => :install_slim - end - end +recipe :markup do + description 'This will add markup engine into your app' + after :locale - protected + question "Please choose markup language you prefer to use" do + answer "Erb", :default => true do + # Do nothing + store(:markup, :erb) + end - def install_erb - # Do nothing - store(:markup, :erb) - end + answer "Haml" do + gem "haml-rails" + store(:markup, :haml) + end - def install_haml - gem "haml-rails" - store(:markup, :haml) - end - - def install_slim - gem "slim-rails" - store(:markup, :slim) - end - + answer "Slim" do + gem "slim-rails" + store(:markup, :slim) end end end - -# Write down this recipe to our Cookbook if it's available -Playmo::Cookbook.instance.use(Playmo::Recipes::MarkupRecipe) if defined?(Playmo::Cookbook) \ No newline at end of file