Class: Engineyard::Recipes::Generators::InitSmGenerator

Inherits:
BaseGenerator
  • Object
show all
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_rootObject



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_packageObject



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_cookbooksObject



12
13
14
# File 'lib/engineyard-recipes/generators/init_sm_generator.rb', line 12

def install_cookbooks
  directory "cookbooks", cookbooks_destination
end