Skip to content

Instantly share code, notes, and snippets.

@adamhjk
Created March 12, 2009 22:44
Show Gist options
  • Save adamhjk/78333 to your computer and use it in GitHub Desktop.
Save adamhjk/78333 to your computer and use it in GitHub Desktop.
class TestCLI
include Mixlib::CLI
option :config_file,
:short => "-c CONFIG",
:long => "--config CONFIG",
:default => 'config.rb',
:description => "The configuration file to use"
option :log_level,
:short => "-l LEVEL",
:long => "--log_level LEVEL",
:description => "Set the log level (debug, info, warn, error, fatal)",
:required => true,
:proc => nil
option :help,
:short => "-h",
:long => "--help",
:description => "Show this message",
:on => :tail,
:boolean => true,
:show_options => true,
:exit => 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment