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 +4 -4
- data/.github/workflows/development.yml +52 -0
- data/async-http.gemspec +1 -1
- data/lib/async/http/body/pipe.rb +2 -2
- data/lib/async/http/client.rb +1 -1
- data/lib/async/http/protocol/http1/server.rb +1 -1
- data/lib/async/http/protocol/http2/connection.rb +6 -2
- data/lib/async/http/protocol/http2/server.rb +1 -1
- data/lib/async/http/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b52c544a23afd4597a2278507fb9c22852292a5a66bf4443e5f146895f2f534
|
4
|
+
data.tar.gz: 0d9f184c80bd1aa7a1d7862248ddaad82fd37b634392da373ef981743b25963f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/async-http.gemspec
CHANGED
@@ -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.
|
26
|
+
spec.add_dependency("protocol-http2", "~> 0.14.0")
|
27
27
|
|
28
28
|
# spec.add_dependency("openssl")
|
29
29
|
|
data/lib/async/http/body/pipe.rb
CHANGED
@@ -60,7 +60,7 @@ module Async
|
|
60
60
|
def reader(task)
|
61
61
|
@reader = task
|
62
62
|
|
63
|
-
task.annotate "
|
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 "
|
83
|
+
task.annotate "#{self.class} writer."
|
84
84
|
|
85
85
|
while chunk = @head.read_partial
|
86
86
|
@output.write(chunk)
|
data/lib/async/http/client.rb
CHANGED
@@ -56,7 +56,7 @@ module Async
|
|
56
56
|
|
57
57
|
# Server loop.
|
58
58
|
def each(task: Task.current)
|
59
|
-
task.annotate("#{version}
|
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
|
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
|
-
!
|
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}
|
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|
|
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.51.
|
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-
|
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.
|
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.
|
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"
|