Sha256: c344c4dc40f04582e072539125beba2d9334a4243474c947d9b7e6c12569a5c8

Contents?: true

Size: 645 Bytes

Versions: 1

Compression:

Stored size: 645 Bytes

Contents

require 'thor/group'

module Engineyard::Recipes
  module Generators
    class InitSmGenerator < BaseGenerator
      include Thor::Actions
      
      def self.source_root
        File.join(File.dirname(__FILE__), "init_sm_generator", "templates")
      end
      
      def install_cookbooks
        directory "cookbooks"
      end
      
      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
      
      private      
      def recipe_name
        'sm'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
engineyard-recipes-0.3.0 lib/engineyard-recipes/generators/init_sm_generator.rb