async-http 0.51.5 → 0.51.6

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: 82358c1bfd502fc8b6c915812c8cfd1f30fe913d4f6d4ba2e83219e7bc5b8c1b
4
- data.tar.gz: b320500fed1b14c5275848b4154c818a49e40db122e2b434f7c440c58880314d
3
+ metadata.gz: 1b52c544a23afd4597a2278507fb9c22852292a5a66bf4443e5f146895f2f534
4
+ data.tar.gz: 0d9f184c80bd1aa7a1d7862248ddaad82fd37b634392da373ef981743b25963f
5
5
  SHA512:
6
- metadata.gz: a341003b057838aba42e190b2bfdd47a34089706dd2f35413b53cb921261b131d4af84218449be038ee760fa53c48679d04802b1a5d702e798c633bf526b5fb8
7
- data.tar.gz: 953b30680ef52830bc14b41c47a954add118fe760d96248307cfefd7264df4131fac0ae2783f15dcf097aafd55a0251ffd0dd7376a86e81953d16e5ea20f95b3
6
+ metadata.gz: 3d1431ba4f3284f11dd3850365d44b19b7103ab6cc2853084e797bf7ae285e41b2a7b46da8614b7fd3ad8e86427788fb5502549c43ce819f69d47a4208ed915a
7
+ data.tar.gz: d3717d619d2e8c8ffb512c1f0f0c77e5661943d19b38469de300d98928e8dd4d115d2aa0c1c09c8db5485be463e67808c823f95169656230f3c6eaebe58a9fc8
@@ -0,0 +1,52 @@
1
+ name: Development
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ${{matrix.os}}-latest
8
+ continue-on-error: ${{matrix.experimental}}
9
+
10
+ strategy:
11
+ matrix:
12
+ experimental: [false]
13
+
14
+ os:
15
+ - ubuntu
16
+ - macos
17
+
18
+ ruby:
19
+ - 2.5
20
+ - 2.6
21
+ - 2.7
22
+
23
+ include:
24
+ - experimental: true
25
+ os: ubuntu
26
+ ruby: truffleruby
27
+ - experimental: true
28
+ os: ubuntu
29
+ ruby: jruby
30
+ - experimental: true
31
+ os: ubuntu
32
+ ruby: head
33
+ - experimental: true
34
+ os: ubuntu
35
+ ruby: 2.6
36
+ env: COVERAGE=PartialSummary,Coveralls
37
+
38
+ steps:
39
+ - uses: actions/checkout@v1
40
+ - uses: ruby/setup-ruby@v1
41
+ with:
42
+ ruby-version: ${{matrix.ruby}}
43
+
44
+ - name: Installing packages (ubuntu)
45
+ if: matrix.os == 'ubuntu'
46
+ run: sudo apt-get install apache2-utils
47
+
48
+ - name: Install dependencies
49
+ run: ${{matrix.env}} bundle install
50
+
51
+ - name: Run tests
52
+ run: ${{matrix.env}} bundle exec rspec
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_dependency("protocol-http", "~> 0.18.0")
25
25
  spec.add_dependency("protocol-http1", "~> 0.12.0")
26
- spec.add_dependency("protocol-http2", "~> 0.13.0")
26
+ spec.add_dependency("protocol-http2", "~> 0.14.0")
27
27
 
28
28
  # spec.add_dependency("openssl")
29
29
 
@@ -60,7 +60,7 @@ module Async
60
60
  def reader(task)
61
61
  @reader = task
62
62
 
63
- task.annotate "pipe reader"
63
+ task.annotate "#{self.class} reader."
64
64
 
65
65
  while chunk = @input.read
66
66
  @head.write(chunk)
@@ -80,7 +80,7 @@ module Async
80
80
  def writer(task)
81
81
  @writer = task
82
82
 
83
- task.annotate "pipe writer"
83
+ task.annotate "#{self.class} writer."
84
84
 
85
85
  while chunk = @head.read_partial
86
86
  @output.write(chunk)
@@ -83,7 +83,7 @@ module Async
83
83
 
84
84
  def close
85
85
  while @pool.busy?
86
- Async.logger.warn(self) {"Waiting for pool to drain: #{@pool}"}
86
+ Async.logger.warn(self) {"Waiting for #{@protocol} pool to drain: #{@pool}"}
87
87
  @pool.wait
88
88
  end
89
89
 
@@ -56,7 +56,7 @@ module Async
56
56
 
57
57
  # Server loop.
58
58
  def each(task: Task.current)
59
- task.annotate("#{version} reading requests for #{self.class}.")
59
+ task.annotate("Reading #{version} requests for #{self.class}.")
60
60
 
61
61
  while request = next_request
62
62
  response = yield(request, self)
@@ -66,7 +66,7 @@ module Async
66
66
  end
67
67
 
68
68
  def start_connection
69
- @reader ||= read_in_background
69
+ @reader || read_in_background
70
70
  end
71
71
 
72
72
  def close(error = nil)
@@ -93,7 +93,11 @@ module Async
93
93
  end
94
94
 
95
95
  def read_in_background(parent: Task.current)
96
+ raise RuntimeError, "Connection is closed!" if closed?
97
+
96
98
  parent.async do |task|
99
+ @reader = task
100
+
97
101
  task.annotate("#{version} reading data for #{self.class}.")
98
102
 
99
103
  begin
@@ -130,7 +134,7 @@ module Async
130
134
  end
131
135
 
132
136
  def reusable?
133
- !(self.closed? || @stream.closed?)
137
+ !self.closed?
134
138
  end
135
139
 
136
140
  def version
@@ -62,7 +62,7 @@ module Async
62
62
  end
63
63
 
64
64
  def each(task: Task.current)
65
- task.annotate("#{version} reading requests for #{self.class}.")
65
+ task.annotate("Reading #{version} requests for #{self.class}.")
66
66
 
67
67
  # It's possible the connection has died before we get here...
68
68
  @requests&.async do |task, request|
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Async
24
24
  module HTTP
25
- VERSION = "0.51.5"
25
+ VERSION = "0.51.6"
26
26
  end
27
27
  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.51.5
4
+ version: 0.51.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-19 00:00:00.000000000 Z
11
+ date: 2020-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.13.0
89
+ version: 0.14.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.13.0
96
+ version: 0.14.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: async-rspec
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -200,6 +200,7 @@ extensions: []
200
200
  extra_rdoc_files: []
201
201
  files:
202
202
  - ".editorconfig"
203
+ - ".github/workflows/development.yml"
203
204
  - ".gitignore"
204
205
  - ".rspec"
205
206
  - ".travis.yml"