Class: Engineyard::Recipes::Generators::InitSmGenerator
- Inherits:
-
BaseGenerator
- Object
- Thor::Group
- BaseGenerator
- Engineyard::Recipes::Generators::InitSmGenerator
- Includes:
- Thor::Actions
- Defined in:
- lib/engineyard-recipes/generators/init_sm_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
8 9 10 |
# File 'lib/engineyard-recipes/generators/init_sm_generator.rb', line 8 def self.source_root File.join(File.dirname(__FILE__), "init_sm_generator", "templates") end |
Instance Method Details
#auto_require_package ⇒ Object
16 17 18 19 20 |
# File 'lib/engineyard-recipes/generators/init_sm_generator.rb', line 16 def auto_require_package file = cookbooks_dir("main/recipes/default.rb") require_recipe = "\nrequire_recipe '#{recipe_name}'\n" append_to_file file, require_recipe end |
#install_cookbooks ⇒ Object
12 13 14 |
# File 'lib/engineyard-recipes/generators/init_sm_generator.rb', line 12 def install_cookbooks directory "cookbooks", cookbooks_destination end |