diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:09:46 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:09:46 +0000 |
commit | 891b720013f06f092f6be82adad95e5551c696b6 (patch) | |
tree | bffba558147d68d951f403caa2b6396e4faf5f29 /lib/custodian/alerts | |
parent | 3a96cc957dbd97c6ffeaea42f738e7c35b4acbc7 (diff) |
Do not use parentheses for method calls with no arguments.
This is neater. Flagged by rubocop
Diffstat (limited to 'lib/custodian/alerts')
-rw-r--r-- | lib/custodian/alerts/file.rb | 2 | ||||
-rw-r--r-- | lib/custodian/alerts/graphite.rb | 4 | ||||
-rw-r--r-- | lib/custodian/alerts/mauve.rb | 8 | ||||
-rw-r--r-- | lib/custodian/alerts/redis-state.rb | 2 | ||||
-rw-r--r-- | lib/custodian/alerts/smtp.rb | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/lib/custodian/alerts/file.rb b/lib/custodian/alerts/file.rb index cc2a672..5874136 100644 --- a/lib/custodian/alerts/file.rb +++ b/lib/custodian/alerts/file.rb @@ -31,7 +31,7 @@ module Custodian # Record a raise event for the given test. # def raise - write_message( "RAISE: #{test.target} failed #{test.get_type}-test - #{test.error()}" ) + write_message( "RAISE: #{test.target} failed #{test.get_type}-test - #{test.error}" ) end diff --git a/lib/custodian/alerts/graphite.rb b/lib/custodian/alerts/graphite.rb index 34ec73c..2e49125 100644 --- a/lib/custodian/alerts/graphite.rb +++ b/lib/custodian/alerts/graphite.rb @@ -63,9 +63,9 @@ module Custodian # # Send via UDP. # - socket = UDPSocket.new() + socket = UDPSocket.new socket.send( payload, 0, @target, 2003 ); - socket.close() + socket.close end diff --git a/lib/custodian/alerts/mauve.rb b/lib/custodian/alerts/mauve.rb index 8ce14c1..dfa4a04 100644 --- a/lib/custodian/alerts/mauve.rb +++ b/lib/custodian/alerts/mauve.rb @@ -69,7 +69,7 @@ module Custodian # update = Mauve::Proto::AlertUpdate.new update.alert = [] - update.source = @settings.alert_source() + update.source = @settings.alert_source update.replace = false # @@ -151,7 +151,7 @@ module Custodian # update = Mauve::Proto::AlertUpdate.new update.alert = [] - update.source = @settings.alert_source() + update.source = @settings.alert_source update.replace = false # @@ -241,7 +241,7 @@ module Custodian # # The text from the job-defition # - user_text = test.get_notification_text() + user_text = test.get_notification_text # # Add the user-detail if present @@ -251,7 +251,7 @@ module Custodian # # Add the test-failure message # - alert.detail = "#{alert.detail}<p>#{test.error()}</p>" + alert.detail = "#{alert.detail}<p>#{test.error}</p>" # # Determine if this is inside/outside the bytemark network diff --git a/lib/custodian/alerts/redis-state.rb b/lib/custodian/alerts/redis-state.rb index 7d9daa7..f37cef2 100644 --- a/lib/custodian/alerts/redis-state.rb +++ b/lib/custodian/alerts/redis-state.rb @@ -59,7 +59,7 @@ module Custodian tmp["type"] = @test.get_type tmp["target"] = @test.target tmp["result"] = "RAISE" - tmp["reason"] = @test.error() + tmp["reason"] = @test.error tmp["test" ] = @test.to_s tmp["class" ] = @test.class diff --git a/lib/custodian/alerts/smtp.rb b/lib/custodian/alerts/smtp.rb index 4de6fbe..d37701b 100644 --- a/lib/custodian/alerts/smtp.rb +++ b/lib/custodian/alerts/smtp.rb @@ -30,8 +30,8 @@ module Custodian # Raise an alert by email. # 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"; + subject = "#{test.target} alert #{test.get_type}-test - #{test.error}" + body = "The alert has raised, with the following details:\n#{test.error}\nRegards\n"; _send_mail( @target, subject, body ) end |