60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# File 'lib/berkshelf/cookbook_generator.rb', line 60
def generate
case options[:pattern]
when "library"
empty_directory target.join("libraries")
empty_directory target.join("providers")
empty_directory target.join("resources")
when "wrapper"
empty_directory target.join("attributes")
empty_directory target.join("recipes")
template "default_recipe.erb", target.join("recipes/default.rb")
when "environment", "application"
empty_directory target.join("files/default")
empty_directory target.join("templates/default")
empty_directory target.join("attributes")
empty_directory target.join("libraries")
empty_directory target.join("providers")
empty_directory target.join("recipes")
empty_directory target.join("resources")
template "default_recipe.erb", target.join("recipes/default.rb")
end
template 'metadata.rb.erb', target.join('metadata.rb')
template license_file, target.join('LICENSE')
template 'README.md.erb', target.join('README.md')
template 'CHANGELOG.md.erb', target.join('CHANGELOG.md')
Berkshelf::InitGenerator.new([target], options.merge(default_options)).invoke_all
end
|