Sha256: cb34864a19bdf55b1b3d5984f5c1a08d8aa21b9990fc88ee201df4c92cb751ab
Contents?: true
Size: 882 Bytes
Versions: 50
Compression:
Stored size: 882 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 File.dirname(__FILE__) + '/../lib/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
50 entries across 50 versions & 2 rubygems