diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 14:44:15 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 14:44:15 +0000 |
commit | d7f792c6cf5f9dab870d0205de1a174863ca6a12 (patch) | |
tree | 5e85ad75b27ccd31c798e259e880864d865ce4c3 /lib/custodian/protocoltest | |
parent | 69acb34d89e05637f04531f4ba8903f1dd887383 (diff) |
Updated to test for more whitespace issues.
Diffstat (limited to 'lib/custodian/protocoltest')
-rw-r--r-- | lib/custodian/protocoltest/dns.rb | 10 | ||||
-rw-r--r-- | lib/custodian/protocoltest/ssl.rb | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/custodian/protocoltest/dns.rb b/lib/custodian/protocoltest/dns.rb index a4e7baf..4685029 100644 --- a/lib/custodian/protocoltest/dns.rb +++ b/lib/custodian/protocoltest/dns.rb @@ -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}'" @@ -178,7 +178,7 @@ module Custodian # # Flatten, sort, uniq # - results.flatten.map{|r| r.to_s.downcase }.sort.uniq + results.flatten.map { |r| r.to_s.downcase }.sort.uniq end diff --git a/lib/custodian/protocoltest/ssl.rb b/lib/custodian/protocoltest/ssl.rb index 5e14329..f2baf67 100644 --- a/lib/custodian/protocoltest/ssl.rb +++ b/lib/custodian/protocoltest/ssl.rb @@ -77,7 +77,7 @@ class SSLCheck # def tests=(ts) raise ArgumentError, 'tests must be an Array' unless ts.is_a?(Array) - @tests = ts.collect{|t| t.to_sym}.select{|t| ALL_TESTS.include?(t)} + @tests = ts.collect { |t| t.to_sym }.select { |t| ALL_TESTS.include?(t) } @tests end @@ -200,7 +200,7 @@ class SSLCheck self.errors << verbose("Failed to fetch certificate for #{self.domain}") return nil else - return ![verify_subject, verify_valid_from, verify_valid_to, verify_signature].any?{|r| false == r} + return ![verify_subject, verify_valid_from, verify_valid_to, verify_signature].any? { |r| false == r } end end |