Class: Jackchop::Cookbook

Inherits:
Thor
  • Object
show all
Defined in:
lib/jackchop/cli/cookbook.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details



15
16
17
# File 'lib/jackchop/cli/cookbook.rb', line 15

def self.banner(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
# File 'lib/jackchop/cli/cookbook.rb', line 10

def create(name)
	Berkshelf::CookbookGenerator.new([File.join(Dir.pwd, name), name], default_berkshelf_options.merge(options)).invoke_all
    Jackchop::InitGenerator.new([File.join(Dir.pwd, name)], options).invoke_all
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], default_berkshelf_options.merge(options)).invoke_all
	Jackchop::InitGenerator.new([path], options).invoke_all
end