Sha256: b5f5f16c46b3e2fb8eed3a179d6ae1c053230383e2d5adf3b4e35679f0042b7c

Contents?: true

Size: 1.66 KB

Versions: 21

Compression:

Stored size: 1.66 KB

Contents

require 'cri'

class Onceover
  class CLI
    def self.command
      @cmd ||= 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 loging'
        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

    # Add the help
    Onceover::CLI.command.add_command(Cri::Command.new_basic_help)
  end
end

# Add all of the other CLI components
require 'onceover/cli/show'
require 'onceover/cli/run'
require 'onceover/cli/init'
require 'onceover/cli/update'
require 'onceover/cli/plugins'

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
onceover-3.7.0 lib/onceover/cli.rb
onceover-3.6.2 lib/onceover/cli.rb
onceover-3.6.1 lib/onceover/cli.rb
onceover-3.6.0 lib/onceover/cli.rb
onceover-3.5.2 lib/onceover/cli.rb
onceover-3.5.1 lib/onceover/cli.rb
onceover-3.5.0 lib/onceover/cli.rb
onceover-3.4.0 lib/onceover/cli.rb
onceover-3.3.3 lib/onceover/cli.rb
onceover-3.3.2 lib/onceover/cli.rb
onceover-3.3.1 lib/onceover/cli.rb
onceover-3.3.0 lib/onceover/cli.rb
onceover-3.2.8 lib/onceover/cli.rb
onceover-3.2.7 lib/onceover/cli.rb
onceover-3.2.6 lib/onceover/cli.rb
onceover-3.2.5 lib/onceover/cli.rb
onceover-3.2.4 lib/onceover/cli.rb
onceover-3.2.3 lib/onceover/cli.rb
onceover-3.2.2 lib/onceover/cli.rb
onceover-3.2.1 lib/onceover/cli.rb