aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mauve')
-rw-r--r--lib/mauve/notifiers/hipchat.rb12
-rw-r--r--lib/mauve/sender.rb12
2 files changed, 6 insertions, 18 deletions
diff --git a/lib/mauve/notifiers/hipchat.rb b/lib/mauve/notifiers/hipchat.rb
index 7537bc5..b29f450 100644
--- a/lib/mauve/notifiers/hipchat.rb
+++ b/lib/mauve/notifiers/hipchat.rb
@@ -27,13 +27,13 @@ module Mauve
def send_alert(destination, alert, all_alerts, conditions = {})
msg = prepare_message(destination, alert, all_alerts, conditions)
- colour = case alert.level
- when :urgent
- "red"
- when :normal
- "yellow"
+ colour = case alert.update_type
+ when 'cleared'
+ 'green'
+ when 'acknowledged'
+ 'yellow'
else
- "green"
+ 'red'
end
opts = {
diff --git a/lib/mauve/sender.rb b/lib/mauve/sender.rb
index 29c085b..7a965ab 100644
--- a/lib/mauve/sender.rb
+++ b/lib/mauve/sender.rb
@@ -1,11 +1,6 @@
# encoding: UTF-8
require 'ipaddr'
require 'socket'
-#begin
-# require 'locale'
-#rescue LoadError
- # Do nothing -- these are bonus libraries :)
-#end
require 'mauve/mauve_resolv'
require 'mauve/mauve_time'
@@ -153,13 +148,6 @@ module Mauve
update.replace ||= false
#
- # Check the locale charset. This is to maximise the amout of information
- # mauve receives, rather than provide proper sanitized data for the server.
- #
- from_charset = (Locale.current.charset || Locale.charset) if defined?(Locale)
- from_charset ||= "UTF-8"
-
- #
#
#
update.each_field do |field, value|