From b87b69ca3fb266bdb5de88b9e77da54e23e370a5 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 31 Aug 2011 12:19:48 +0100 Subject: Fixed up alert suppression to be less jumpy --- lib/mauve/configuration_builders/person.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/mauve/configuration_builders') diff --git a/lib/mauve/configuration_builders/person.rb b/lib/mauve/configuration_builders/person.rb index 1f2af71..014987f 100644 --- a/lib/mauve/configuration_builders/person.rb +++ b/lib/mauve/configuration_builders/person.rb @@ -41,6 +41,7 @@ module Mauve def suppress_notifications_after(h) raise ArgumentError.new("notification_threshold must be specified as e.g. (10 => 1.minute)") unless h.kind_of?(Hash) && h.keys[0].kind_of?(Integer) && h.values[0].kind_of?(Integer) + @result.notification_thresholds[h.values[0]] = Array.new(h.keys[0]) end end @@ -53,6 +54,10 @@ module Mauve def created_person(person) name = person.username raise BuildException.new("Duplicate person '#{name}'") if @result.people[name] + # + # Add a default notification threshold + # + person.notification_thresholds[60] = Array.new(10) if person.notification_thresholds.empty? @result.people[person.username] = person end -- cgit v1.2.1