Sha256: 20c3f347356c35a694ce5d35f63465c23ed987773773e5a1ccde85c22dc897de

Contents?: true

Size: 849 Bytes

Versions: 3

Compression:

Stored size: 849 Bytes

Contents

#!/usr/bin/env ruby

# == Synopsis
#
# monitor: monitor the refinery system
#
# == Usage
#
# monitor [OPTION]
#
# -h, --help:
#    show help
#
# -d, --debug:
#    turn on debug logging
#
# -c, --config filename
#    specify a configuration file
#
# -v, --verbose
#    print info to the standard output

require 'getoptlong'
require 'rdoc/usage'
require 'refinery'

options = {}
opts = GetoptLong.new(
  [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
  [ '--debug', '-d', GetoptLong::NO_ARGUMENT ],
  [ '--config', '-c', GetoptLong::REQUIRED_ARGUMENT],
  [ '--verbose', '-v', GetoptLong::NO_ARGUMENT]
)
opts.each do |opt, arg|
  case opt
  when '--help'
    RDoc::usage
  when '--debug'
    options[:debug] = true
  when '--config'
    options[:config] = arg
  when '--verbose'
    options[:verbose] = true
  end
end

Refinery::Monitor.new(options).run

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
refinery-0.12.2 bin/monitor
refinery-0.12.1 bin/monitor
refinery-0.12.0 bin/monitor