mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
implement workaround for thor
This commit is contained in:
parent
b98c3e243e
commit
af04a0f5ba
3 changed files with 28 additions and 1 deletions
|
@ -9,7 +9,16 @@ module Compliance
|
|||
class ComplianceCLI < Inspec::BaseCLI # rubocop:disable Metrics/ClassLength
|
||||
namespace 'compliance'
|
||||
|
||||
desc "compliance login SERVER --insecure --user='USER' --token='TOKEN'", 'Log in to a Chef Compliance SERVER'
|
||||
# TODO: find another solution, once https://github.com/erikhuda/thor/issues/261 is fixed
|
||||
def self.banner(command, _namespace = nil, _subcommand = false)
|
||||
"#{basename} #{subcommand_prefix} #{command.usage}"
|
||||
end
|
||||
|
||||
def self.subcommand_prefix
|
||||
namespace
|
||||
end
|
||||
|
||||
desc "login SERVER --insecure --user='USER' --token='TOKEN'", 'Log in to a Chef Compliance SERVER'
|
||||
option :insecure, aliases: :k, type: :boolean,
|
||||
desc: 'Explicitly allows InSpec to perform "insecure" SSL connections and transfers'
|
||||
option :user, type: :string, required: false,
|
||||
|
|
|
@ -7,6 +7,15 @@ module Init
|
|||
class CLI < Inspec::BaseCLI
|
||||
namespace 'init'
|
||||
|
||||
# TODO: find another solution, once https://github.com/erikhuda/thor/issues/261 is fixed
|
||||
def self.banner(command, _namespace = nil, _subcommand = false)
|
||||
"#{basename} #{subcommand_prefix} #{command.usage}"
|
||||
end
|
||||
|
||||
def self.subcommand_prefix
|
||||
namespace
|
||||
end
|
||||
|
||||
# read template directoy
|
||||
template_dir = File.join(File.dirname(__FILE__), 'templates')
|
||||
Dir.glob(File.join(template_dir, '*')) do |template|
|
||||
|
|
|
@ -6,6 +6,15 @@ module Supermarket
|
|||
class SupermarketCLI < Inspec::BaseCLI
|
||||
namespace 'supermarket'
|
||||
|
||||
# TODO: find another solution, once https://github.com/erikhuda/thor/issues/261 is fixed
|
||||
def self.banner(command, _namespace = nil, _subcommand = false)
|
||||
"#{basename} #{subcommand_prefix} #{command.usage}"
|
||||
end
|
||||
|
||||
def self.subcommand_prefix
|
||||
namespace
|
||||
end
|
||||
|
||||
desc 'profiles', 'list all available profiles in Chef Supermarket'
|
||||
def profiles
|
||||
# display profiles in format user/profile
|
||||
|
|
Loading…
Reference in a new issue