Sha256: a01a515d6a918f4540bb04e6048d29a644ab248de97fd3b2a4d625064ab1e14c

Contents?: true

Size: 755 Bytes

Versions: 4

Compression:

Stored size: 755 Bytes

Contents

#!/usr/bin/env ruby
require 'rubygems'
require 'optparse'
$LOAD_PATH << "#{File.dirname(__FILE__)}/../lib"
require 'deputy'

options = {}
OptionParser.new do |opts|
  opts.banner = <<BANNER
Report to the sheriff

Usage:
    deputy System.metric value
    deputy [OPTION]

Options:
BANNER
  opts.on("-h", "--help","Show this.") { puts opts; exit }
  opts.on('-v', '--version','Show Version'){ puts Deputy::VERSION; exit}
  opts.on('--install-cron','Install crontask'){ Deputy.install_cron; exit}
  opts.on('--run-plugins','Run all plugins for this minute (belongs into crontask)'){ Deputy.run_plugins; exit}
end.parse!

metric, value = ARGV[0..1]
if metric.to_s.empty?
  puts "Usage instructions: deputy --help"
  exit
end

Deputy.send_report metric, value

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
deputy-0.1.7 bin/deputy
deputy-0.1.6 bin/deputy
deputy-0.1.5 bin/deputy
deputy-0.1.4 bin/deputy