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 | edf0e675123e4869e2739d1bab0ed57b3b9f664c (patch) | |
tree | c0771fecb0734fb342cf16e352f19fd3ead9a112 /lib/custodian/protocoltest | |
parent | 22b40326730fb7a4a8e2f5cb8d877f6a84494d02 (diff) |
Do not use parentheses for method calls with no arguments.
This is neater. Flagged by rubocop
Diffstat (limited to 'lib/custodian/protocoltest')
-rw-r--r-- | lib/custodian/protocoltest/dns.rb | 12 | ||||
-rw-r--r-- | lib/custodian/protocoltest/http.rb | 4 | ||||
-rw-r--r-- | lib/custodian/protocoltest/mx.rb | 4 | ||||
-rw-r--r-- | lib/custodian/protocoltest/openproxy.rb | 6 | ||||
-rw-r--r-- | lib/custodian/protocoltest/ping.rb | 4 | ||||
-rw-r--r-- | lib/custodian/protocoltest/smtprelay.rb | 2 | ||||
-rw-r--r-- | lib/custodian/protocoltest/tcp.rb | 10 |
7 files changed, 21 insertions, 21 deletions
diff --git a/lib/custodian/protocoltest/dns.rb b/lib/custodian/protocoltest/dns.rb index 05c8534..5787881 100644 --- a/lib/custodian/protocoltest/dns.rb +++ b/lib/custodian/protocoltest/dns.rb @@ -100,8 +100,8 @@ module Custodian # # Get the timeout period. # - settings = Custodian::Settings.instance() - period = settings.timeout() + settings = Custodian::Settings.instance + period = settings.timeout # # Do the lookup @@ -147,16 +147,16 @@ module Custodian case ltype when /^A$/ then - dns.getresources(name, Resolv::DNS::Resource::IN::A).map{ |r| results.push( r.address.to_s() ) } + dns.getresources(name, Resolv::DNS::Resource::IN::A).map{ |r| results.push( r.address.to_s ) } when /^AAAA$/ then - dns.getresources(name, Resolv::DNS::Resource::IN::AAAA).map{ |r| results.push( r.address.to_s() ) } + dns.getresources(name, Resolv::DNS::Resource::IN::AAAA).map{ |r| results.push( r.address.to_s ) } when /^NS$/ then - dns.getresources(name, Resolv::DNS::Resource::IN::NS).map{ |r| results.push( Resolv.getaddresses( r.name.to_s() ) ) } + dns.getresources(name, Resolv::DNS::Resource::IN::NS).map{ |r| results.push( Resolv.getaddresses( r.name.to_s ) ) } when /^MX$/ then - dns.getresources(name, Resolv::DNS::Resource::IN::MX).map{ |r| results.push( Resolv.getaddresses( r.exchange.to_s() ) ) } + dns.getresources(name, Resolv::DNS::Resource::IN::MX).map{ |r| results.push( Resolv.getaddresses( r.exchange.to_s ) ) } else @error = "Unknown record type to resolve: '#{ltype}'" diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index 0bbe290..a36b349 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -209,8 +209,8 @@ module Custodian # # Get the timeout period for this test. # - settings = Custodian::Settings.instance() - period = settings.timeout() + settings = Custodian::Settings.instance + period = settings.timeout # # The URL we'll fetch/poll. diff --git a/lib/custodian/protocoltest/mx.rb b/lib/custodian/protocoltest/mx.rb index 29a9183..2372556 100644 --- a/lib/custodian/protocoltest/mx.rb +++ b/lib/custodian/protocoltest/mx.rb @@ -57,8 +57,8 @@ module Custodian # # Get the timeout period. # - settings = Custodian::Settings.instance() - period = settings.timeout() + settings = Custodian::Settings.instance + period = settings.timeout # # The MX-hosts diff --git a/lib/custodian/protocoltest/openproxy.rb b/lib/custodian/protocoltest/openproxy.rb index 5313343..851982c 100644 --- a/lib/custodian/protocoltest/openproxy.rb +++ b/lib/custodian/protocoltest/openproxy.rb @@ -80,13 +80,13 @@ module Custodian # # Get the timeout period for this test. # - settings = Custodian::Settings.instance() - period = settings.timeout() + settings = Custodian::Settings.instance + period = settings.timeout begin timeout( period ) do begin - c = Curl::Easy.new() + c = Curl::Easy.new c.follow_location = true c.max_redirects = 10 c.ssl_verify_host = false diff --git a/lib/custodian/protocoltest/ping.rb b/lib/custodian/protocoltest/ping.rb index ff406d5..423b925 100644 --- a/lib/custodian/protocoltest/ping.rb +++ b/lib/custodian/protocoltest/ping.rb @@ -94,8 +94,8 @@ module Custodian # # Get the timeout period. # - settings = Custodian::Settings.instance() - period = settings.timeout() + settings = Custodian::Settings.instance + period = settings.timeout diff --git a/lib/custodian/protocoltest/smtprelay.rb b/lib/custodian/protocoltest/smtprelay.rb index a1c0b33..45abf16 100644 --- a/lib/custodian/protocoltest/smtprelay.rb +++ b/lib/custodian/protocoltest/smtprelay.rb @@ -86,7 +86,7 @@ module Custodian begin - Net::SMTP.start(@host,@port, get_hostname() ) do |smtp| + Net::SMTP.start(@host,@port, get_hostname ) do |smtp| sent = smtp.send_message message, "noreply@bytemark.co.uk", "noreply@bytemark.co.uk" @status = sent.status.to_s diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb index 9ca2180..24a05be 100644 --- a/lib/custodian/protocoltest/tcp.rb +++ b/lib/custodian/protocoltest/tcp.rb @@ -153,8 +153,8 @@ module Custodian # # Get the timeout period. # - settings = Custodian::Settings.instance() - period = settings.timeout() + settings = Custodian::Settings.instance + period = settings.timeout # # Perform the DNS lookups of the specified name. @@ -265,8 +265,8 @@ module Custodian # # Get the timeout period for this test. # - settings = Custodian::Settings.instance() - period = settings.timeout() + settings = Custodian::Settings.instance + period = settings.timeout begin timeout(period) do @@ -283,7 +283,7 @@ module Custodian read.gsub!(/[\n\r]/, "") end - socket.close() + socket.close if ( banner.nil? ) @error = nil |