Class: Cupper::Cli

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

Instance Method Summary collapse

Instance Method Details

#create(project_name) ⇒ Object



14
15
16
17
# File 'lib/cupper/cli.rb', line 14

def create(project_name)
  project = Project.new(project_name)
  project.create
end

#generateObject



32
33
34
35
36
37
38
39
40
41
# File 'lib/cupper/cli.rb', line 32

def generate
  puts "Generating the Cookbook"
  cookbook = Cookbook.new
  if options.verbose?
    puts "Verbose mode enabled"
    cookbook.generate
  else
    Cupper.suppress_output{ cookbook.generate }
  end
end

#ohai_pluginsObject



20
21
22
23
24
25
26
27
28
# File 'lib/cupper/cli.rb', line 20

def ohai_plugins
  ohai_plugins = OhaiPlugin.new
  plugins = ohai_plugins.list
  puts "Ohai Plugins"
  puts "------------"
  plugins.each do |plugin|
    puts plugin
  end
end