lib/berkshelf/cookbook_generator.rb in berkshelf-1.1.6 vs lib/berkshelf/cookbook_generator.rb in berkshelf-1.2.0.rc1
- old
+ new
@@ -1,16 +1,12 @@
module Berkshelf
- # @author Jamie Winsor <jamie@vialstudios.com>
+ # @author Jamie Winsor <reset@riotgames.com>
class CookbookGenerator < BaseGenerator
argument :name,
type: :string,
required: true
- argument :path,
- type: :string,
- required: true
-
class_option :skip_vagrant,
type: :boolean,
default: false
class_option :skip_git,
@@ -29,19 +25,19 @@
type: :boolean,
default: false
class_option :license,
type: :string,
- default: "reserved"
+ default: Berkshelf::Config.instance.cookbook.license
class_option :maintainer,
type: :string,
- default: "YOUR_NAME"
+ default: Berkshelf::Config.instance.cookbook.copyright
class_option :maintainer_email,
type: :string,
- default: "YOUR_EMAIL"
+ default: Berkshelf::Config.instance.cookbook.email
def generate
empty_directory target.join("files/default")
empty_directory target.join("templates/default")
empty_directory target.join("attributes")
@@ -54,10 +50,10 @@
template "default_recipe.erb", target.join("recipes/default.rb")
template "metadata.rb.erb", target.join("metadata.rb")
template license_file, target.join("LICENSE")
template "README.md.erb", target.join("README.md")
- ::Berkshelf::InitGenerator.new([target], options.merge(default_options)).invoke_all
+ Berkshelf::InitGenerator.new([target], options.merge(default_options)).invoke_all
end
private
def commented(content)