Class: Onceover::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/onceover/cli.rb,
lib/onceover/cli/run.rb,
lib/onceover/cli/init.rb,
lib/onceover/cli/show.rb,
lib/onceover/cli/update.rb

Defined Under Namespace

Classes: Init, Run, Show, Update

Class Method Summary collapse

Class Method Details

.commandObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/onceover/cli.rb', line 5

def self.command
  @command ||= Cri::Command.define do
    name 'onceover'
    usage 'onceover <subcommand> [options]'
    summary 'Tool for testing Puppet controlrepos'

    flag :h, :help, 'Show help for this command' do |value, cmd|
      puts cmd.help
      exit 0
    end

    flag nil, :trace, 'Display stack traces on application crash'
    flag :d, :debug, 'Enable debug logging'
    optional :p, :path, 'Path to the root of the controlrepo'
    optional nil, :environmentpath, 'Value of environmentpath from puppet.conf'
    optional nil, :puppetfile, 'Location of the Puppetfile'
    optional nil, :environment_conf, 'Location of environment.con'
    optional nil, :facts_dir, 'Directory in which to find factsets'
    optional nil, :spec_dir, 'Directory in which to find spec tests and config'
    optional nil, :facts_files, 'List of factset files to use (Overrides --facts_dir)'
    optional nil, :nodeset_file, 'YAML file containing node definitions'
    optional nil, :tempdir, 'Temp directory to use, defaults to .controlrepo'
    optional nil, :manifest, 'Path fo find manifests'
    optional nil, :onceover_yaml, 'Path of controlrepo.yaml'

    run do |opts, args, cmd|
      puts cmd.help(:verbose => opts[:verbose])
      exit 0
    end
  end
end