summaryrefslogtreecommitdiff
path: root/lib/custodian/alerts/mauve.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2016-04-22 21:54:18 +0300
committerSteve Kemp <steve@steve.org.uk>2016-04-22 21:54:18 +0300
commit85a9a63eb5d8690fd7945bba901b10ef8c3326c9 (patch)
tree7d19fa2c6f951ad9c2537f75c397a9adb94e7372 /lib/custodian/alerts/mauve.rb
parent67fbf68705e1808107e8cea1d3ab6ad0e206f645 (diff)
More rubocop fixes.
Diffstat (limited to 'lib/custodian/alerts/mauve.rb')
-rw-r--r--lib/custodian/alerts/mauve.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/custodian/alerts/mauve.rb b/lib/custodian/alerts/mauve.rb
index 5a00557..be19eec 100644
--- a/lib/custodian/alerts/mauve.rb
+++ b/lib/custodian/alerts/mauve.rb
@@ -213,7 +213,7 @@ module Custodian
test_host = test.target
test_type = test.get_type
- alert = Mauve::Proto::Alert.new
+ alert = Mauve::Proto::Alert.new
#
# Mauve only lets us use IDs which are <= 255 characters in length
@@ -234,9 +234,9 @@ 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>"
+ alert.detail = "<p>The #{test_type} test failed against #{test_host}.</p>"
#
# The text from the job-defition
@@ -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
@@ -339,7 +339,7 @@ module Custodian
# Return the formatted message
#
ips.each do |ipaddr|
- if Custodian::Util::Bytemark.inside?(ipaddr.to_s)
+ if Custodian::Util::Bytemark.inside?(ipaddr.to_s)
result += "<p>#{host} resolves to #{ipaddr} which is inside the Bytemark network.</p>"
else
result += "<p>#{host} resolves to #{ipaddr} which is OUTSIDE the Bytemark network.</p>"