async-http 0.27.7 → 0.27.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/async-http.gemspec +2 -2
- data/lib/async/http/body/buffered.rb +2 -11
- data/lib/async/http/body/readable.rb +4 -2
- data/lib/async/http/body/rewindable.rb +2 -1
- data/lib/async/http/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a98e7b1a5efe141c3380f88a0a8dc0eb6fd4523a72d5cc5bd67a39438d7d560
|
4
|
+
data.tar.gz: 47fd3a1f0bdeec70fa2b449dcb463f962b2f0b7b75a1bac3ceaed3496a2cc804
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 575c71a18b0f9c8b2f59f0e578eaa1b533ad4e4232474ea5835eda409e97885a887e70fe2fbfdcda96a744af694cfdeab701246dc62fc73e0e853436704ae196
|
7
|
+
data.tar.gz: a6fee2ae222c2731c0252c226d931310fd1f65140ead24d0e9892032f0473facf08134f203f66b1db95909f291a7701d58f402929bd56dd11db7fb1c3ff30171
|
data/async-http.gemspec
CHANGED
@@ -17,12 +17,12 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
19
|
spec.add_dependency("async", "~> 1.6")
|
20
|
-
spec.add_dependency("async-io", "~> 1.
|
20
|
+
spec.add_dependency("async-io", "~> 1.13")
|
21
21
|
|
22
22
|
spec.add_dependency("http-2", "~> 0.9.0")
|
23
23
|
# spec.add_dependency("openssl")
|
24
24
|
|
25
|
-
spec.add_development_dependency "async-rspec", "~> 1.
|
25
|
+
spec.add_development_dependency "async-rspec", "~> 1.10"
|
26
26
|
spec.add_development_dependency "async-container", "~> 0.5.0"
|
27
27
|
|
28
28
|
spec.add_development_dependency "bundler", "~> 1.3"
|
@@ -58,28 +58,19 @@ module Async
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def empty?
|
61
|
-
@chunks.
|
61
|
+
@index >= @chunks.length
|
62
62
|
end
|
63
63
|
|
64
64
|
def close
|
65
65
|
self
|
66
66
|
end
|
67
67
|
|
68
|
-
def each
|
69
|
-
return to_enum unless block_given?
|
70
|
-
|
71
|
-
while @index < @chunks.count
|
72
|
-
yield @chunks[@index]
|
73
|
-
@index += 1
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
68
|
def read
|
78
69
|
if chunk = @chunks[@index]
|
79
70
|
@index += 1
|
80
71
|
end
|
81
72
|
|
82
|
-
return chunk
|
73
|
+
return chunk.dup
|
83
74
|
end
|
84
75
|
|
85
76
|
def rewind
|
@@ -18,7 +18,7 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
19
|
# THE SOFTWARE.
|
20
20
|
|
21
|
-
require 'async/io/
|
21
|
+
require 'async/io/buffer'
|
22
22
|
|
23
23
|
module Async
|
24
24
|
module HTTP
|
@@ -54,6 +54,7 @@ module Async
|
|
54
54
|
|
55
55
|
while chunk = self.read
|
56
56
|
yield chunk
|
57
|
+
# chunk.clear
|
57
58
|
end
|
58
59
|
rescue
|
59
60
|
stop($!)
|
@@ -63,10 +64,11 @@ module Async
|
|
63
64
|
|
64
65
|
# Read all remaining chunks into a single binary string.
|
65
66
|
def join
|
66
|
-
buffer = IO::
|
67
|
+
buffer = IO::Buffer.new
|
67
68
|
|
68
69
|
self.each do |chunk|
|
69
70
|
buffer << chunk
|
71
|
+
chunk.clear
|
70
72
|
end
|
71
73
|
|
72
74
|
return buffer
|
data/lib/async/http/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.
|
4
|
+
version: 0.27.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.13'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.13'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: http-2
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.10'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.10'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: async-container
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|