summaryrefslogtreecommitdiff
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
parent0c2d64d6daf9a9a901a3b67730680e3e97c60f8d (diff)
More minor space fixups
-rwxr-xr-xbin/custodian-enqueue2
-rwxr-xr-xbin/multi-ping2
-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
-rwxr-xr-xt/test-custodian-parser.rb6
-rwxr-xr-xt/test-custodian-testfactory.rb8
-rwxr-xr-xt/test-custodian-util-bytemark.rb2
-rwxr-xr-xt/test-custodian-util-timespan.rb4
-rwxr-xr-xt/test-suite2
13 files changed, 22 insertions, 22 deletions
diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue
index c92cb0e..75cb863 100755
--- a/bin/custodian-enqueue
+++ b/bin/custodian-enqueue
@@ -74,7 +74,7 @@ if __FILE__ == $PROGRAM_NAME then
[ '--test', GetoptLong::NO_ARGUMENT ],
[ '--file', '-f', GetoptLong::REQUIRED_ARGUMENT ],
[ '--help', '-h', GetoptLong::NO_ARGUMENT ],
- [ '--manual','-m', GetoptLong::NO_ARGUMENT ]
+ [ '--manual', '-m', GetoptLong::NO_ARGUMENT ]
)
opts.each do |opt, arg|
case opt
diff --git a/bin/multi-ping b/bin/multi-ping
index 118fe66..fd4607c 100755
--- a/bin/multi-ping
+++ b/bin/multi-ping
@@ -48,7 +48,7 @@ opts = GetoptLong.new(
[ '--manual', '-m', GetoptLong::NO_ARGUMENT ])
begin
- opts.each do |opt,arg|
+ opts.each do |opt, arg|
case opt
when '--help' then
$help = true
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
diff --git a/t/test-custodian-parser.rb b/t/test-custodian-parser.rb
index 6d612b1..1af5e28 100755
--- a/t/test-custodian-parser.rb
+++ b/t/test-custodian-parser.rb
@@ -292,7 +292,7 @@ EOF
'http://example must run http not following redirect.' => false,
}
- data.each do |str,follow|
+ data.each do |str, follow|
assert_nothing_raised do
#
@@ -331,7 +331,7 @@ EOF
'http://example must run http without cache busting.' => false,
}
- data.each do |str,cb|
+ data.each do |str, cb|
assert_nothing_raised do
#
@@ -377,7 +377,7 @@ EOF
#
# For each test
#
- data.each do |str,fail|
+ data.each do |str, fail|
assert_nothing_raised do
#
diff --git a/t/test-custodian-testfactory.rb b/t/test-custodian-testfactory.rb
index c50ad56..db25462 100755
--- a/t/test-custodian-testfactory.rb
+++ b/t/test-custodian-testfactory.rb
@@ -69,7 +69,7 @@ class TestTestFactory < Test::Unit::TestCase
#
# Run each test
#
- data.each do |str,prt|
+ data.each do |str, prt|
assert_nothing_raised do
obj = Custodian::TestFactory.create(str)
@@ -101,7 +101,7 @@ class TestTestFactory < Test::Unit::TestCase
#
# Run each test
#
- data.each do |str,prt|
+ data.each do |str, prt|
assert_nothing_raised do
obj = Custodian::TestFactory.create(str)
@@ -149,7 +149,7 @@ class TestTestFactory < Test::Unit::TestCase
#
# Run each test
#
- data.each do |str,prt|
+ data.each do |str, prt|
assert_nothing_raised do
obj = Custodian::TestFactory.create(str)
@@ -225,7 +225,7 @@ class TestTestFactory < Test::Unit::TestCase
#
# Run each test
#
- data.each do |str,inv|
+ data.each do |str, inv|
assert_nothing_raised do
obj = Custodian::TestFactory.create(str)
diff --git a/t/test-custodian-util-bytemark.rb b/t/test-custodian-util-bytemark.rb
index 3b17f4f..3342569 100755
--- a/t/test-custodian-util-bytemark.rb
+++ b/t/test-custodian-util-bytemark.rb
@@ -50,7 +50,7 @@ class TestBytemarkUtil < Test::Unit::TestCase
}
- to_test.each do |name,inside|
+ to_test.each do |name, inside|
if inside
assert(Custodian::Util::Bytemark.inside?(name) == true)
diff --git a/t/test-custodian-util-timespan.rb b/t/test-custodian-util-timespan.rb
index 72428be..3ac37a6 100755
--- a/t/test-custodian-util-timespan.rb
+++ b/t/test-custodian-util-timespan.rb
@@ -215,14 +215,14 @@ class TestTimeSpanUtil < Test::Unit::TestCase
def test_wrap_around
for h in 00..23
- assert_equal(1, Custodian::Util::TimeSpan.to_hours(h,h).size)
+ assert_equal(1, Custodian::Util::TimeSpan.to_hours(h, h).size)
end
#
# But the time-period 00-23 is a full day
#
assert_equal(24,
- Custodian::Util::TimeSpan.to_hours(0,23).size)
+ Custodian::Util::TimeSpan.to_hours(0, 23).size)
end
diff --git a/t/test-suite b/t/test-suite
index 26ddb1f..0d3589a 100755
--- a/t/test-suite
+++ b/t/test-suite
@@ -27,7 +27,7 @@ dir = File.dirname(__FILE__)
#
# Load each file in the same directory.
#
-Dir.glob(File.join(dir,'t*.rb')).each do |test|
+Dir.glob(File.join(dir, 't*.rb')).each do |test|
require test
end