summaryrefslogtreecommitdiff
path: root/lib/custodian/alerts/mauve.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 14:43:10 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 14:43:10 +0000
commit69acb34d89e05637f04531f4ba8903f1dd887383 (patch)
tree023a3777576237d3b89b7554c00ee2ae1142b0a9 /lib/custodian/alerts/mauve.rb
parentff910ae9491d81085e25d289f61cec72e96e57ef (diff)
Removed trailing whitespace from the code
Diffstat (limited to 'lib/custodian/alerts/mauve.rb')
-rw-r--r--lib/custodian/alerts/mauve.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/custodian/alerts/mauve.rb b/lib/custodian/alerts/mauve.rb
index 47431d6..c3c6521 100644
--- a/lib/custodian/alerts/mauve.rb
+++ b/lib/custodian/alerts/mauve.rb
@@ -110,7 +110,7 @@ module Custodian
# we're in the working day.
#
if ((wday != 0) && (wday != 6)) &&
- (hour >= day_start && hour < day_end)
+ (hour >= day_start && hour < day_end)
working = true
end
@@ -199,9 +199,9 @@ module Custodian
subject = @test.target
if (subject =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/) ||
- (subject =~ /^([0-9a-f:]+)$/)
+ (subject =~ /^([0-9a-f:]+)$/)
res = Custodian::Util::DNS.ip_to_hostname(subject)
- if res
+ if res
subject = res
end
end
@@ -234,7 +234,7 @@ module Custodian
#
# If we're raising then add the error
#
- if failure
+ if failure
alert.detail = "<p>The #{test_type} test failed against #{test_host}.</p>"
@@ -246,7 +246,7 @@ module Custodian
#
# Add the user-detail if present
#
- alert.detail = "#{alert.detail}<p>#{user_text}</p>" if !user_text.nil?
+ alert.detail = "#{alert.detail}<p>#{user_text}</p>" if !user_text.nil?
#
# Add the test-failure message
@@ -257,7 +257,7 @@ module Custodian
# Determine if this is inside/outside the bytemark network
#
location = expand_inside_bytemark(test_host)
- if !location.nil? && location.length
+ if !location.nil? && location.length
alert.detail = "#{alert.detail}\n#{location}"
end
end
@@ -282,7 +282,7 @@ module Custodian
# We'll also make the host a link that can be clicked in the alert we raise.
#
target = host
- if target =~ /^([a-z]+):\/\/([^\/]+)/
+ if target =~ /^([a-z]+):\/\/([^\/]+)/
target = $2.dup
host = "<a href=\"#{host}\">#{host}</a>"
end
@@ -297,7 +297,7 @@ module Custodian
# Resolve the target to an IP, unless it is already an address.
#
if (target =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/) ||
- (target =~ /^([0-9a-f:]+)$/)
+ (target =~ /^([0-9a-f:]+)$/)
resolved = target
else
resolved = Custodian::Util::DNS.hostname_to_ip(target)
@@ -307,13 +307,13 @@ module Custodian
#
# Did we get an error?
#
- return '' unless !resolved.nil?
+ return '' unless !resolved.nil?
#
# Return the formatted message
#
- if Custodian::Util::Bytemark.inside?(resolved.to_s)
+ if Custodian::Util::Bytemark.inside?(resolved.to_s)
if (resolved == target)
return "<p>#{host} is inside the Bytemark network.</p>"
else