From 4c642e3dc17f98e5560763f019c3eb18e09e5e8c Mon Sep 17 00:00:00 2001 From: Chris Elsworth Date: Tue, 31 Jan 2017 23:30:40 +0000 Subject: Tweak HipChat colours to be a bit more useful MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > It would be lovely if cleared messages were green > —- Tom Hill --- lib/mauve/notifiers/hipchat.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/mauve') 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 = { -- cgit v1.2.1 From a3372ff012444a5c330e0f6865851462bcfcea01 Mon Sep 17 00:00:00 2001 From: telyn Date: Mon, 29 Jan 2018 14:33:09 +0000 Subject: remove all mention of Locale --- lib/mauve/sender.rb | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'lib/mauve') 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' @@ -152,13 +147,6 @@ module Mauve # `nil` doesn't work. 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" - # # # -- cgit v1.2.1