summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/http.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:19:47 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:19:47 +0000
commit54b21cf54c51dfe40784a8096f84c7a80b015bd4 (patch)
tree4763692624732650daf1a9e02c91576d3f7ee8d0 /lib/custodian/protocoltest/http.rb
parenta22b8e96ead33b0f97ed5243dbad7f7b6cd5135d (diff)
Removed spaces inside parenthesis.
Diffstat (limited to 'lib/custodian/protocoltest/http.rb')
-rw-r--r--lib/custodian/protocoltest/http.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb
index 6ed3c5b..7bbc3e2 100644
--- a/lib/custodian/protocoltest/http.rb
+++ b/lib/custodian/protocoltest/http.rb
@@ -38,7 +38,7 @@ module Custodian
#
# Constructor
#
- def initialize( line )
+ def initialize(line)
#
# Save the line
@@ -48,7 +48,7 @@ module Custodian
#
# Save the URL
#
- @url = line.split( /\s+/)[0]
+ @url = line.split(/\s+/)[0]
@host = @url
#
@@ -90,8 +90,8 @@ module Custodian
#
# Get the schema of the URL
#
- u = URI.parse( @url )
- if ( u.scheme != test_type )
+ u = URI.parse(@url)
+ if (u.scheme != test_type)
raise ArgumentError, "The test case has a different protocol in the URI than that which we're testing: #{@line} - \"#{test_type} != #{u.scheme}\""
end
@@ -222,7 +222,7 @@ module Custodian
# running with cache-busting.
#
if @cache_busting
- u = URI.parse( test_url )
+ u = URI.parse(test_url)
if ! u.query
u.query = "ctime=#{Time.now.to_i}"
test_url = u.to_s
@@ -268,7 +268,7 @@ module Custodian
protocol_msg = (resolve_mode == :ipv4 ? 'IPv4' : 'IPv6')
begin
- timeout( period ) do
+ timeout(period) do
c.perform
status = c.response_code
content = c.body_str