From 48e66ecec133ef348c0a46b80998230116121f3b Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 9 Mar 2015 13:15:06 +0000 Subject: Do not terminate expressions with ";". Ruby is not Perl, much as I sometimes wish it were. --- lib/custodian/alerts/graphite.rb | 2 +- lib/custodian/alerts/smtp.rb | 4 ++-- lib/custodian/protocoltest/mx.rb | 2 +- lib/custodian/protocoltest/ssl.rb | 2 +- lib/custodian/util/timespan.rb | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/custodian') diff --git a/lib/custodian/alerts/graphite.rb b/lib/custodian/alerts/graphite.rb index 2e49125..778b36b 100644 --- a/lib/custodian/alerts/graphite.rb +++ b/lib/custodian/alerts/graphite.rb @@ -64,7 +64,7 @@ module Custodian # Send via UDP. # socket = UDPSocket.new - socket.send( payload, 0, @target, 2003 ); + socket.send( payload, 0, @target, 2003 ) socket.close end diff --git a/lib/custodian/alerts/smtp.rb b/lib/custodian/alerts/smtp.rb index d37701b..e418031 100644 --- a/lib/custodian/alerts/smtp.rb +++ b/lib/custodian/alerts/smtp.rb @@ -31,7 +31,7 @@ module Custodian # def raise subject = "#{test.target} alert #{test.get_type}-test - #{test.error}" - body = "The alert has raised, with the following details:\n#{test.error}\nRegards\n"; + body = "The alert has raised, with the following details:\n#{test.error}\nRegards\n" _send_mail( @target, subject, body ) end @@ -43,7 +43,7 @@ module Custodian # def clear subject = "#{test.target} cleared #{test.get_type}-test" - body = "The alert has cleared\nRegards\n"; + body = "The alert has cleared\nRegards\n" _send_mail( @target, subject, body ) end diff --git a/lib/custodian/protocoltest/mx.rb b/lib/custodian/protocoltest/mx.rb index b77e596..0df1b5d 100644 --- a/lib/custodian/protocoltest/mx.rb +++ b/lib/custodian/protocoltest/mx.rb @@ -144,7 +144,7 @@ module Custodian @error = "There are #{mx.size} hosts running as MX-servers for domain #{@host} - #{passed}:OK #{failed}:FAILED - #{error}" return false else - return true; + return true end end diff --git a/lib/custodian/protocoltest/ssl.rb b/lib/custodian/protocoltest/ssl.rb index 9f65712..86acb34 100644 --- a/lib/custodian/protocoltest/ssl.rb +++ b/lib/custodian/protocoltest/ssl.rb @@ -427,7 +427,7 @@ module Custodian return true else puts( "SSL Verification for #{@host} has failed." ) - @error = "SSL Verification for #{@host} failed: "; + @error = "SSL Verification for #{@host} failed: " @error += s.errors.join("\n") return false end diff --git a/lib/custodian/util/timespan.rb b/lib/custodian/util/timespan.rb index b3cb647..36e8d9e 100644 --- a/lib/custodian/util/timespan.rb +++ b/lib/custodian/util/timespan.rb @@ -19,7 +19,7 @@ module Custodian # if ( desc.kind_of? String ) && ( desc =~ /([0-9]+)pm$/i ) - desc = $1.dup.to_i + 12; + desc = $1.dup.to_i + 12 end # -- cgit v1.2.1