ethon 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 612df63c107484c065be684be2f9d9c0b228a371
4
- data.tar.gz: 906f70fe6d048a0b3e8022ad24d704996c18bb90
3
+ metadata.gz: 3cc64826630c9f25f87d4a4140a9cecc43575994
4
+ data.tar.gz: 01f6e1dc05161204a18eabe86e64c941fcb5bda1
5
5
  SHA512:
6
- metadata.gz: 614883cb82bd35ffe340e9e2b9d091726d8345d8b293b2a4efbfaed7244b181c2657543dcc4824af8e2fc347b32029b2e84ac9069edc6c0e58d92191eda97dd9
7
- data.tar.gz: 6bb002290d0e5ca932f2f90a79eb05d96942582fdff2cb6f86febfdfc932b8e6e48437716017cfd8e6e014a7fe765ec1f4259239023e461c211fbd823c109dcd
6
+ metadata.gz: d98725e35b6e1d81fcd4f2b1207d54f178e058230b2bbf49249e94e4ff05067d8e7a5e6cdfb7be2465ac7a2c6f8b4a7145e5bf9e291817dd0e1661c87816f595
7
+ data.tar.gz: a60d5cd6436990a8f58d3ef5c2eb47167998b6ade221fdaa66e6464b2119d3a6e395e660ef17031dc72eec059f9b92dc0f4187e57b3d032dd30a5c29cd74f20b
@@ -2,7 +2,11 @@
2
2
 
3
3
  ## Master
4
4
 
5
- [Full Changelog](https://github.com/typhoeus/ethon/compare/v0.10.0...master)
5
+ [Full Changelog](https://github.com/typhoeus/ethon/compare/v0.10.1...master)
6
+
7
+ ## 0.10.1
8
+
9
+ [Full Changelog](https://github.com/typhoeus/ethon/compare/v0.10.0...v0.10.1)
6
10
 
7
11
  ## 0.10.0
8
12
 
@@ -4,8 +4,6 @@ module Ethon
4
4
  #
5
5
  # @api private
6
6
  module Header
7
- EMPTY_STRING_VALUE = "".freeze
8
-
9
7
  # Return headers, return empty hash if none.
10
8
  #
11
9
  # @example Return the headers.
@@ -55,11 +53,7 @@ module Ethon
55
53
  #
56
54
  # @return [ String ] The composed header.
57
55
  def compose_header(key, value)
58
- if(value == EMPTY_STRING_VALUE)
59
- Util.escape_zero_byte("#{key};")
60
- else
61
- Util.escape_zero_byte("#{key}: #{value}")
62
- end
56
+ Util.escape_zero_byte("#{key}: #{value}")
63
57
  end
64
58
  end
65
59
  end
@@ -1,5 +1,5 @@
1
1
  module Ethon
2
2
 
3
3
  # Ethon version.
4
- VERSION = '0.10.0'
4
+ VERSION = '0.10.1'
5
5
  end
@@ -46,36 +46,6 @@ describe Ethon::Easy::Header do
46
46
  expect(easy.response_body).to include('"HTTP_USER_AGENT":"Ethon"')
47
47
  end
48
48
  end
49
-
50
- context "when header value is empty string" do
51
- let(:headers) { { 'User-Agent' => "" } }
52
-
53
- if(Ethon::Curl.version_info[:version] >= "7.23.0")
54
- it "sends header with empty value" do
55
- expect(easy.response_body).to include('"HTTP_USER_AGENT":""')
56
- end
57
- else
58
- it "does not send header (curl < 7.23.0 does not support empty values)" do
59
- expect(easy.response_body).to_not include('"HTTP_USER_AGENT"')
60
- end
61
- end
62
- end
63
-
64
- context "when header value is nil" do
65
- let(:headers) { { 'User-Agent' => nil } }
66
-
67
- it "does not send header" do
68
- expect(easy.response_body).to_not include('"HTTP_USER_AGENT"')
69
- end
70
- end
71
-
72
- context "when header value is integer" do
73
- let(:headers) { { 'User-Agent' => 0 } }
74
-
75
- it "sends as string" do
76
- expect(easy.response_body).to include('"HTTP_USER_AGENT":"0"')
77
- end
78
- end
79
49
  end
80
50
  end
81
51
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hans Hasselberg