From 891b720013f06f092f6be82adad95e5551c696b6 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 9 Mar 2015 13:09:46 +0000 Subject: Do not use parentheses for method calls with no arguments. This is neater. Flagged by rubocop --- lib/custodian/alerts/file.rb | 2 +- lib/custodian/alerts/graphite.rb | 4 ++-- lib/custodian/alerts/mauve.rb | 8 ++++---- lib/custodian/alerts/redis-state.rb | 2 +- lib/custodian/alerts/smtp.rb | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/custodian/alerts') 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}

#{test.error()}

" + alert.detail = "#{alert.detail}

#{test.error}

" # # 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 -- cgit v1.2.1