http 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGES.md +7 -0
- data/lib/http/request/body.rb +1 -0
- data/lib/http/version.rb +1 -1
- data/spec/lib/http/request/body_spec.rb +18 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7a096aa1b9d5191761bbd4cc1205b371038bac039e7b7eff2bf1a95d25f4cc20
|
4
|
+
data.tar.gz: 9c27c29310fda99f663a2c52dddab4bf1541e51b34c74cd6fac7b0c34f0b8eae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5034ce467b1a9d72be5272a1c1aa1060e29a2c52badf1fbc413559c5027a36f0d052c7f9a69d6ef66d45aae814d57a44e022758908670d3e27aca650c6f957a2
|
7
|
+
data.tar.gz: 48d814174b0d98a6d4722f144f423ab755eabf48cfb56246bbee6d2ab53dad3d37a162ce696a49a82c34d4de97469393b8668863a6ac8a4b611522c01204ac99
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 3.2.1 (2018-04-24)
|
2
|
+
|
3
|
+
* [#468](https://github.com/httprb/http/pull/468)
|
4
|
+
Rewind `HTTP::Request::Body#source` once `#each` is complete.
|
5
|
+
([@ixti])
|
6
|
+
|
7
|
+
|
1
8
|
## 3.2.0 (2018-04-22)
|
2
9
|
|
3
10
|
This vresion backports one change we missed to backport in previous release:
|
data/lib/http/request/body.rb
CHANGED
data/lib/http/version.rb
CHANGED
@@ -126,10 +126,26 @@ RSpec.describe HTTP::Request::Body do
|
|
126
126
|
end
|
127
127
|
|
128
128
|
context "when body is an Enumerable IO" do
|
129
|
-
let(:
|
129
|
+
let(:data) { "a" * 16 * 1024 + "b" * 10 * 1024 }
|
130
|
+
let(:body) { StringIO.new data }
|
130
131
|
|
131
132
|
it "yields chunks of content" do
|
132
|
-
expect(chunks.inject("", :+)).to eq
|
133
|
+
expect(chunks.inject("", :+)).to eq data
|
134
|
+
end
|
135
|
+
|
136
|
+
it "allows to enumerate multiple times" do
|
137
|
+
results = []
|
138
|
+
|
139
|
+
2.times do
|
140
|
+
result = ""
|
141
|
+
subject.each { |chunk| result += chunk }
|
142
|
+
results << result
|
143
|
+
end
|
144
|
+
|
145
|
+
aggregate_failures do
|
146
|
+
expect(results.count).to eq 2
|
147
|
+
expect(results).to all eq data
|
148
|
+
end
|
133
149
|
end
|
134
150
|
end
|
135
151
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-04-
|
14
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: http_parser.rb
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
version: '0'
|
196
196
|
requirements: []
|
197
197
|
rubyforge_project:
|
198
|
-
rubygems_version: 2.
|
198
|
+
rubygems_version: 2.7.6
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: HTTP should be easy
|