lib/engineyard-recipes/generators/sm_generator.rb in engineyard-recipes-0.3.2.pre vs lib/engineyard-recipes/generators/sm_generator.rb in engineyard-recipes-0.3.2
- old
+ new
@@ -7,11 +7,10 @@
attr_accessor :command
argument :recipe_name
argument :sm_ext_uri
argument :sm_ext_commands, :type => :array
- argument :sm_vendor_path, :required => false
def self.source_root
File.join(File.dirname(__FILE__), "sm_generator", "templates")
end
@@ -32,13 +31,20 @@
file = cookbooks_dir "main/recipes/default.rb"
require_recipe = "\nrequire_recipe '#{recipe_name}'\n"
append_to_file file, require_recipe
end
- private
- def say(msg, color = nil)
- color ? shell.say(msg, color) : shell.say(msg)
+ def vendor
+ FetchUri.vendor_recipe_into_recipe(sm_ext_uri, recipe_vendor_path)
end
+ protected
+ def recipe_vendor_path_name
+ "repo"
+ end
+
+ def recipe_vendor_path
+ cookbooks_dir File.join(recipe_name, "repo")
+ end
end
end
end