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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a30b3776d7094afe5386fa1097e376bb0ba41596917f51a924e79e91531b6ae
4
- data.tar.gz: 8ae1a4833d716423edcd207f61d44338c8f6da9919b2a3ec70db559f206f6c30
3
+ metadata.gz: 8a98e7b1a5efe141c3380f88a0a8dc0eb6fd4523a72d5cc5bd67a39438d7d560
4
+ data.tar.gz: 47fd3a1f0bdeec70fa2b449dcb463f962b2f0b7b75a1bac3ceaed3496a2cc804
5
5
  SHA512:
6
- metadata.gz: 5524c922e52a30bec82c9f686e0ade382d2ecb23b7a41e2cb2df7639458152bb7019dcae05c351fc34698ffdb9e8fa0b5a2d437a4cc1e28df411610c45189d81
7
- data.tar.gz: 2d7615f6c95399630973aeff09744ba1153b3eef5916f64b4561868a2639ac9f946487aa66e7f851534643c5a40418eebe116ce1996d3824b9b82a480eb7c877
6
+ metadata.gz: 575c71a18b0f9c8b2f59f0e578eaa1b533ad4e4232474ea5835eda409e97885a887e70fe2fbfdcda96a744af694cfdeab701246dc62fc73e0e853436704ae196
7
+ data.tar.gz: a6fee2ae222c2731c0252c226d931310fd1f65140ead24d0e9892032f0473facf08134f203f66b1db95909f291a7701d58f402929bd56dd11db7fb1c3ff30171
@@ -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.12")
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.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.empty?
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/binary_string'
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::BinaryString.new
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
@@ -43,7 +43,8 @@ module Async
43
43
  end
44
44
  end
45
45
 
46
- return chunk
46
+ # We dup them on the way out, so that if someone modifies the string, it won't modify the rewindability.
47
+ return chunk.dup
47
48
  end
48
49
 
49
50
  def rewind
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module HTTP
23
- VERSION = "0.27.7"
23
+ VERSION = "0.27.8"
24
24
  end
25
25
  end
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.7
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-05 00:00:00.000000000 Z
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.12'
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.12'
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.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.1'
68
+ version: '1.10'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: async-container
71
71
  requirement: !ruby/object:Gem::Requirement