lib/god/contacts/scout.rb in resurrected_god-0.14.0 vs lib/god/contacts/scout.rb in resurrected_god-1.0.0

- old
+ new

@@ -6,15 +6,13 @@ require 'net/http' require 'uri' module God module Contacts - class Scout < Contact class << self - attr_accessor :client_key, :plugin_id - attr_accessor :format + attr_accessor :client_key, :plugin_id, :format end self.format = lambda do |message, priority, category, host| text = "Message: #{message}\n" text += "Host: #{host}\n" if host @@ -30,11 +28,11 @@ valid &= complain("Attribute 'client_key' must be specified", self) unless arg(:client_key) valid &= complain("Attribute 'plugin_id' must be specified", self) unless arg(:plugin_id) valid end - def notify(message, time, priority, category, host) + def notify(message, _time, priority, category, host) data = { :client_key => arg(:client_key), :plugin_id => arg(:plugin_id), :format => 'xml', 'alert[subject]' => message, @@ -48,8 +46,7 @@ rescue => e applog(nil, :info, "failed to send scout alert to plugin ##{plugin_id}: #{e.message}") applog(nil, :debug, e.backtrace.join("\n")) end end - end end