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



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

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

#generateObject



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/cupper/cli.rb', line 33

def generate
  puts "Generating the Cookbook..."

  puts "Setting up the environment"
  Cupper::ENVIRONMENT.check_env(Errors::NoEnvironmentError, Cupper::ENVIRONMENT.root_path)
  Cupper::ENVIRONMENT.cupperfile

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

#ohai_pluginsObject



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

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