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 | a22b8e96ead33b0f97ed5243dbad7f7b6cd5135d (patch) | |
tree | 3fe30365cc9d793c752653a59614b52009ef9336 /lib/custodian/protocoltest/http.rb | |
parent | 7782df6020704f51ee2d6194d8d3b74f28a53401 (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 |