Class: Iggy::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/inspec-iggy/cli.rb

Instance Method Summary collapse

Instance Method Details

#extractObject



44
45
46
47
48
49
# File 'lib/inspec-iggy/cli.rb', line 44

def extract
  Inspec::Log.level = :debug if options[:debug]
  extracted_profiles = Iggy::Terraform.parse_extract(options[:tfstate])
  Iggy::InspecHelper.print_commands(extracted_profiles)
  exit 0
end

#generateObject



35
36
37
38
39
40
41
# File 'lib/inspec-iggy/cli.rb', line 35

def generate
  Inspec::Log.level = :debug if options[:debug]
  generated_controls = Iggy::Terraform.parse_generate(options[:tfstate])
  # let's just generate a control file with a set of controls for now
  Iggy::InspecHelper.print_controls(options[:tfstate], generated_controls)
  exit 0
end

#versionObject



20
21
22
# File 'lib/inspec-iggy/cli.rb', line 20

def version
  say("Iggy v#{Iggy::VERSION}")
end