Sha256: 8c5a4a9db29aaa4d92938272ef61e7fb6f148fec1609d5dc4100167bdd686411

Contents?: true

Size: 702 Bytes

Versions: 6

Compression:

Stored size: 702 Bytes

Contents

#!/usr/bin/env ruby

require "baton/<%= config[:name] %>/<%= config[:name] %>-monitor"
require 'optparse'

cfg = File.expand_path("../../config/<%= config[:name] %>.cfg", __FILE__)

OptionParser.new do |opt|
  opt.banner = "Usage: <%= config[:name] %> [OPTIONS]"
  opt.separator ""
  opt.separator "Specific options:"
  opt.on("-c","--config-file [PATH]", "Path to a baton config file") do |o|
    cfg = o
  end
  opt.on_tail("-h", "--help", "Show this message") do
    puts opt
    exit
  end
end.parse!

Baton.configure do |c|
  c.config_path  = cfg
  c.exchange     = "<%= config[:name] %>_in"
  c.exchange_out = "<%= config[:name] %>_out"
end

Baton::<%= config[:constant_array].last %>Monitor.run

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
baton-0.7.0 lib/baton/templates/gem/bin/gem-monitor.tt
baton-0.6.0 lib/baton/templates/gem/bin/gem-monitor.tt
baton-0.5.6 lib/baton/templates/gem/bin/gem-monitor.tt
baton-0.5.5 lib/baton/templates/gem/bin/gem-monitor.tt
baton-0.5.4 lib/baton/templates/gem/bin/gem-monitor.tt
baton-0.5.2 lib/baton/templates/gem/bin/gem-monitor.tt