Sha256: 81d8a3ff896130fefdf5b7a466da20c4128148827ded288259f768711d918459

Contents?: true

Size: 1.15 KB

Versions: 6

Compression:

Stored size: 1.15 KB

Contents

# encoding: utf-8
# author: Adam Leff

require 'thor'

module Habitat
  class HabitatProfileCLI < Thor
    namespace 'habitat profile'

    desc 'create PATH', 'Create a one-time Habitat artifact for the profile found at PATH'
    option :output_dir, type: :string, required: false,
      desc: 'Directory in which to save the generated Habitat artifact. Default: current directory'
    def create(path)
      Habitat::Profile.create(path, options)
    end

    desc 'setup PATH', 'Configure the profile at PATH for Habitat, including a plan and hooks'
    def setup(path)
      Habitat::Profile.setup(path)
    end

    desc 'upload PATH', 'Create a one-time Habitat artifact for the profile found at PATH, and upload it to a Habitat Depot'
    def upload(path)
      Habitat::Profile.upload(path, options)
    end
  end

  class HabitatCLI < Inspec::BaseCLI
    namespace 'habitat'

    desc 'profile', 'Manage InSpec profiles as Habitat artifacts'
    subcommand 'profile', HabitatProfileCLI
  end

  Inspec::Plugins::CLI.add_subcommand(HabitatCLI, 'habitat', 'habitat SUBCOMMAND ...', 'Commands for InSpec + Habitat Integration', {})
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inspec-2.1.81 lib/bundles/inspec-habitat/cli.rb
inspec-2.1.21 lib/bundles/inspec-habitat/cli.rb
inspec-2.1.10 lib/bundles/inspec-habitat/cli.rb
inspec-2.0.32 lib/bundles/inspec-habitat/cli.rb
inspec-2.0.17 lib/bundles/inspec-habitat/cli.rb
inspec-1.51.15 lib/bundles/inspec-habitat/cli.rb