summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/mx.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2016-04-22 21:42:32 +0300
committerSteve Kemp <steve@steve.org.uk>2016-04-22 21:42:32 +0300
commit12de7cf1aefcd5d567a9e6e2eaa061f2074c8dbb (patch)
tree5912d325d739d66a05690cb0d4b87a92ffde3fca /lib/custodian/protocoltest/mx.rb
parent91bfb015647bba1249a96933a48d88f2a50039a9 (diff)
More updates to silence rubocop style-guides.
These warnings were largely whitespace-based.
Diffstat (limited to 'lib/custodian/protocoltest/mx.rb')
-rw-r--r--lib/custodian/protocoltest/mx.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/custodian/protocoltest/mx.rb b/lib/custodian/protocoltest/mx.rb
index cd5e58e..378a257 100644
--- a/lib/custodian/protocoltest/mx.rb
+++ b/lib/custodian/protocoltest/mx.rb
@@ -85,7 +85,7 @@ module Custodian
#
# So on that basis we must alert.
#
- if mx.empty? then
+ if mx.empty? then
@error = "Failed to perform DNS lookup of MX record(s) for host #{@host}"
return Custodian::TestResult::TEST_FAILED
end
@@ -109,12 +109,12 @@ module Custodian
read = socket.sysread(1024)
# trim to a sane length & strip newlines.
- if !read.nil?
+ if !read.nil?
read = read[0, 255]
read.gsub!(/[\n\r]/, '')
end
- if read =~ /^220/
+ if read =~ /^220/
passed += 1
else
failed += 1
@@ -135,7 +135,7 @@ module Custodian
#
# At this point we should have tested the things
#
- if failed > 0
+ if failed > 0
@error = "There are #{mx.size} hosts running as MX-servers for domain #{@host} - #{passed}:OK #{failed}:FAILED - #{error}"
return Custodian::TestResult::TEST_FAILED
else