Module: Abide::CLI

Includes:
AbideDevUtils::CliConstants
Defined in:
lib/abide_dev_utils/cli.rb,
lib/abide_dev_utils/cli/cem.rb,
lib/abide_dev_utils/cli/jira.rb,
lib/abide_dev_utils/cli/test.rb,
lib/abide_dev_utils/cli/xccdf.rb,
lib/abide_dev_utils/cli/comply.rb,
lib/abide_dev_utils/cli/puppet.rb,
lib/abide_dev_utils/cli/abstract.rb

Defined Under Namespace

Classes: AbideCommand, CemCommand, CemGenerate, CemGenerateCoverageReport, CemGenerateReference, CemUpdateConfig, CemUpdateConfigFromDiff, CemValidate, CemValidatePuppetStrings, ComplyCommand, ComplyCompareReportCommand, ComplyReportCommand, JiraAuthCommand, JiraCommand, JiraFromCoverageCommand, JiraFromXccdfCommand, JiraFromXccdfDiffCommand, JiraGetIssueCommand, JiraNewIssueCommand, PuppetAddCISCommentCommand, PuppetAuditClassNamesCommand, PuppetCommand, PuppetCoverageCommand, PuppetFixClassNamesCommand, PuppetNewCommand, PuppetRenameCommand, PuppetScoreModuleCommand, TestCommand, XccdfCommand, XccdfDiffCommand, XccdfGenMapCommand, XccdfToHieraCommand

Constant Summary collapse

ROOT_CMD_NAME =
'abide'
ROOT_CMD_BANNER =
'Developer tools for Abide'

Constants included from AbideDevUtils::CliConstants

AbideDevUtils::CliConstants::CONFIG, AbideDevUtils::CliConstants::ERRORS, AbideDevUtils::CliConstants::OUTPUT, AbideDevUtils::CliConstants::PROMPT, AbideDevUtils::CliConstants::VALIDATE

Class Method Summary collapse

Class Method Details

.executeObject



35
36
37
38
# File 'lib/abide_dev_utils/cli.rb', line 35

def self.execute
  parser = new_parser
  parser.parse
end

.new_parserObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/abide_dev_utils/cli.rb', line 19

def self.new_parser
  parser = CmdParse::CommandParser.new(handle_exceptions: true)
  parser.main_options.program_name = ROOT_CMD_NAME
  parser.main_options.version = AbideDevUtils::VERSION
  parser.main_options.banner = ROOT_CMD_BANNER
  parser.add_command(CmdParse::HelpCommand.new, default: true)
  parser.add_command(CmdParse::VersionCommand.new(add_switches: true))
  parser.add_command(CemCommand.new)
  parser.add_command(ComplyCommand.new)
  parser.add_command(PuppetCommand.new)
  parser.add_command(XccdfCommand.new)
  parser.add_command(TestCommand.new)
  parser.add_command(JiraCommand.new)
  parser
end