Class: InspecPlugins::Habitat::ProfileCLI

Inherits:
Object
  • Object
show all
Defined in:
lib/plugins/inspec-habitat/lib/inspec-habitat/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

Override banner method to correct missing subcommand.



10
11
12
# File 'lib/plugins/inspec-habitat/lib/inspec-habitat/cli.rb', line 10

def self.banner(command, _namespace = nil, _subcommand = false)
  "#{basename} habitat profile #{command.usage}"
end

Instance Method Details

#create(path = ".") ⇒ Object



17
18
19
20
21
# File 'lib/plugins/inspec-habitat/lib/inspec-habitat/cli.rb', line 17

def create(path = ".")
  Inspec.with_feature("inspec-cli-habitat-profile-create") {
    InspecPlugins::Habitat::Profile.new(path, options).create
  }
end

#setup(path = ".") ⇒ Object



24
25
26
27
28
# File 'lib/plugins/inspec-habitat/lib/inspec-habitat/cli.rb', line 24

def setup(path = ".")
  Inspec.with_feature("inspec-cli-habitat-profile-setup") {
    InspecPlugins::Habitat::Profile.new(path, options).setup
  }
end

#upload(path = ".") ⇒ Object



31
32
33
34
35
# File 'lib/plugins/inspec-habitat/lib/inspec-habitat/cli.rb', line 31

def upload(path = ".")
  Inspec.with_feature("inspec-cli-habitat-profile-upload") {
    InspecPlugins::Habitat::Profile.new(path, options).upload
  }
end