diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:19:15 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:19:15 +0000 |
commit | af2ee063abea8235a8cbd1448533e4f4fbc0d0af (patch) | |
tree | 969e448e2d5995f7e838a68ef1d25d54df9b8d29 /lib/custodian/protocoltest/http.rb | |
parent | bb2ec1f07af747c69f2fd1e5b70c41b35fb069e6 (diff) |
Prefer single-quotes when you don't need interpolation.
So "foo" is less good than 'foo'.
Diffstat (limited to 'lib/custodian/protocoltest/http.rb')
-rw-r--r-- | lib/custodian/protocoltest/http.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index c43aee3..6ed3c5b 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -79,10 +79,10 @@ module Custodian case line when /\s+must\s(not\s+)?run\s+http(\s+|\.|$)/i then - test_type = "http" + test_type = 'http' when /\s+must\s+(not\s+)?run\s+https(\s+|\.|$)/i then - test_type = "https" + test_type = 'https' else raise ArgumentError, "URL has invalid scheme: #{@line}" end @@ -111,7 +111,7 @@ module Custodian if line =~ /with status ([0-9]+)/ @expected_status = $1.dup else - @expected_status = "200" + @expected_status = '200' end if line =~ /with (IPv[46])/i @@ -158,9 +158,9 @@ module Custodian # def get_type if @url =~ /^https:/ - "https" + 'https' elsif @url =~ /^http:/ - "http" + 'http' else raise ArgumentError, "URL isn't http/https: #{@url}" end @@ -255,7 +255,7 @@ module Custodian end unless @host_override.nil? - c.headers["Host"] = @host_override + c.headers['Host'] = @host_override end c.ssl_verify_host = false @@ -265,7 +265,7 @@ module Custodian # # Set a basic protocol message, for use later. # - protocol_msg = (resolve_mode == :ipv4 ? "IPv4" : "IPv6") + protocol_msg = (resolve_mode == :ipv4 ? 'IPv4' : 'IPv6') begin timeout( period ) do @@ -342,8 +342,8 @@ module Custodian end - register_test_type "http" - register_test_type "https" + register_test_type 'http' + register_test_type 'https' end end |