Class: Jackchop::Cookbook
- Inherits:
-
Thor
- Object
- Thor
- Jackchop::Cookbook
- Defined in:
- lib/jackchop/cli/cookbook.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.banner(task, namespace = false, subcommand = true) ⇒ Object
20 21 22 |
# File 'lib/jackchop/cli/cookbook.rb', line 20 def self.(task, namespace = false, subcommand = true) "#{basename} #{task.formatted_usage(self, namespace, subcommand).split(':').join(' ')}" end |
Instance Method Details
#create(name) ⇒ Object
10 11 12 13 14 |
# File 'lib/jackchop/cli/cookbook.rb', line 10 def create(name) Berkshelf::CookbookGenerator.new([File.join(Dir.pwd, name), name], .merge()).invoke_all Jackchop::InitGenerator.new([File.join(Dir.pwd, name)], ).invoke_all end |
#default_berkshelf_options ⇒ Object
16 17 18 |
# File 'lib/jackchop/cli/cookbook.rb', line 16 def { :chef_minitest => true } end |
#init(path = Dir.pwd) ⇒ Object
4 5 6 7 |
# File 'lib/jackchop/cli/cookbook.rb', line 4 def init(path = Dir.pwd) Berkshelf::InitGenerator.new([path], .merge()).invoke_all Jackchop::InitGenerator.new([path], ).invoke_all end |