summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:22:46 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:22:46 +0000
commit56d3e8ab7b5bb29e814da0097ec18064685a1f60 (patch)
tree2bed8b119b53d2ecb3917ca8680b77281afc15a4 /lib
parent0c2d64d6daf9a9a901a3b67730680e3e97c60f8d (diff)
More minor space fixups
Diffstat (limited to 'lib')
-rw-r--r--lib/custodian/alertfactory.rb2
-rw-r--r--lib/custodian/protocoltest/ldap.rb2
-rw-r--r--lib/custodian/protocoltest/mx.rb2
-rw-r--r--lib/custodian/protocoltest/smtprelay.rb2
-rw-r--r--lib/custodian/protocoltest/ssl.rb8
-rw-r--r--lib/custodian/protocoltest/tcp.rb2
6 files changed, 9 insertions, 9 deletions
diff --git a/lib/custodian/alertfactory.rb b/lib/custodian/alertfactory.rb
index 5c69c74..640ae33 100644
--- a/lib/custodian/alertfactory.rb
+++ b/lib/custodian/alertfactory.rb
@@ -80,7 +80,7 @@ module Custodian
# Get the friendly-type of derived-classes.
#
def get_type
- @@subclasses.each do |name,value|
+ @@subclasses.each do |name, value|
if (value == self.class)
return name
end
diff --git a/lib/custodian/protocoltest/ldap.rb b/lib/custodian/protocoltest/ldap.rb
index ed75ae7..d7e58fa 100644
--- a/lib/custodian/protocoltest/ldap.rb
+++ b/lib/custodian/protocoltest/ldap.rb
@@ -117,7 +117,7 @@ module Custodian
#
# Search
#
- ldap.search(base,scope,filter,attrs) { |entry|
+ ldap.search(base, scope, filter, attrs) { |entry|
puts "We found an LDAP result #{entry.vals('cn')}"
}
ldap.unbind
diff --git a/lib/custodian/protocoltest/mx.rb b/lib/custodian/protocoltest/mx.rb
index c323af7..2d0bcc2 100644
--- a/lib/custodian/protocoltest/mx.rb
+++ b/lib/custodian/protocoltest/mx.rb
@@ -115,7 +115,7 @@ module Custodian
# trim to a sane length & strip newlines.
if !read.nil?
- read = read[0,255]
+ read = read[0, 255]
read.gsub!(/[\n\r]/, '')
end
diff --git a/lib/custodian/protocoltest/smtprelay.rb b/lib/custodian/protocoltest/smtprelay.rb
index 0a98a9d..6b1f721 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/ssl.rb b/lib/custodian/protocoltest/ssl.rb
index e34e770..4c5343e 100644
--- a/lib/custodian/protocoltest/ssl.rb
+++ b/lib/custodian/protocoltest/ssl.rb
@@ -263,7 +263,7 @@ class SSLCheck
# Check that the certificate is current
#
if self.certificate.not_before < Time.now
- verbose "The certificate for #{self.domain} is valid from #{self.certificate.not_before}."
+ verbose "The certificate for #{self.domain} is valid from #{self.certificate.not_before}."
return true
else
self.errors << verbose("The certificate for #{self.domain} *is not valid yet*.")
@@ -280,7 +280,7 @@ class SSLCheck
days_until_expiry = (self.certificate.not_after.to_i - Time.now.to_i) / (24.0 * 3600).floor.to_i
if days_until_expiry > 14
- verbose "The certificate for #{self.domain} is valid until #{self.certificate.not_after}."
+ verbose "The certificate for #{self.domain} is valid until #{self.certificate.not_after}."
return true
else
if days_until_expiry > 0
@@ -305,7 +305,7 @@ class SSLCheck
# certificate is self-signed.
#
if self.key.is_a?(OpenSSL::PKey) and self.certificate.verify(self.key)
- verbose "Using a self-signed certificate for #{self.domain}."
+ verbose "Using a self-signed certificate for #{self.domain}."
return true
#
@@ -313,7 +313,7 @@ class SSLCheck
# including any bundle that has been uploaded.
#
elsif self.certificate_store.is_a?(OpenSSL::X509::Store) and self.certificate_store.verify(self.certificate)
- verbose "Certificate signed by #{self.certificate.issuer}"
+ verbose "Certificate signed by #{self.certificate.issuer}"
return true
#
diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb
index eb00e99..367cf78 100644
--- a/lib/custodian/protocoltest/tcp.rb
+++ b/lib/custodian/protocoltest/tcp.rb
@@ -279,7 +279,7 @@ module Custodian
# trim to a sane length & strip newlines.
if !read.nil?
- read = read[0,255]
+ read = read[0, 255]
read.gsub!(/[\n\r]/, '')
end