Class: Onceover::HelloWorld::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/onceover/helloworld/cli.rb

Class Method Summary collapse

Class Method Details

.commandObject

Static method defining the new command to be added



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/onceover/helloworld/cli.rb', line 8

def self.command
  @cmd ||= Cri::Command.define do
    name 'helloworld'
    usage 'helloworld [--name NAME]'
    summary "Hello, World! plugin for Onceover"
    description "This is a sample plugin to show you how to get started writing your own\nplugins for onceover, The gateway drug to automated infrastructure testing \nwith Puppet\n    DESCRIPTION\n  \n    option :n,  :name, 'Who to say hello to', :argument => :optional\n\n    run do |opts, args, cmd|\n      # print a simple message - this is the point where you would\n      # normally call out to a library to do the real work\n      logger.info \"Hello, \#{opts[:name]||'World'}!\"\n    end\n  end\nend\n"