async-http 0.64.0 → 0.64.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c40a57758ae5ea41adfa4340af200489f37a70725746e86f212ac130c3e3c56
4
- data.tar.gz: '088337148f9ecc40f9bdc93d30618038a8e60ae9436d0f26d78246027c6b3937'
3
+ metadata.gz: 69e55450d843d44bc5b454d5d888cc3e5a5b76c2a437253eb2c29bfd8b6087d5
4
+ data.tar.gz: 99982836741ad88a7f86e58a43723861f4a825907026614f0dd7fd9f5a4aa63b
5
5
  SHA512:
6
- metadata.gz: 811b2e32cfc64991a89aff3ebe076f8c1e53c32dd8f4e2ffa8aa42b2413e23e673a74c7af8acc1e1b6bfee62a799950dd9ccfc0dcd7b6dd2691a675c1b9d837f
7
- data.tar.gz: a119d79e491c25291553902d026396004f78be5716831a4ea3f38415cde3c37fa6812f32431e6120f5bcbb5f275a533cdf52557a049e5010f582c6909f81e0d1
6
+ metadata.gz: 46484d6a407f2334e2c273373e99c2fa75ebde8125b2acd2331d8a00cc35b28b97336248f4d4c780a0e38e469a724aa6c5e6f306f976185082a122faf343e7fc
7
+ data.tar.gz: 6a9408adf7ac198d5211dfa9231537e37c33484ad637f17cb7013042ecf35dcddc72321fb823ee20b3d085909fe8552505d86bb8cbd3b9c6f32dce8b5289bb65
checksums.yaml.gz.sig CHANGED
Binary file
@@ -42,6 +42,20 @@ module Async
42
42
  @authority = authority
43
43
  end
44
44
 
45
+ def as_json(...)
46
+ {
47
+ endpoint: @endpoint.to_s,
48
+ protocol: @protocol,
49
+ retries: @retries,
50
+ scheme: @scheme,
51
+ authority: @authority,
52
+ }
53
+ end
54
+
55
+ def to_json(...)
56
+ as_json.to_json(...)
57
+ end
58
+
45
59
  attr :endpoint
46
60
  attr :protocol
47
61
 
@@ -20,6 +20,18 @@ module Async
20
20
  @version = version
21
21
  end
22
22
 
23
+ def to_s
24
+ "\#<#{self.class} negotiated #{@version}, currently #{@ready ? 'ready' : 'in-use'}>"
25
+ end
26
+
27
+ def as_json(...)
28
+ to_s
29
+ end
30
+
31
+ def to_json(...)
32
+ as_json.to_json(...)
33
+ end
34
+
23
35
  attr :version
24
36
 
25
37
  def http1?
@@ -50,8 +50,8 @@ module Async
50
50
  response = yield(request, self)
51
51
  body = response&.body
52
52
 
53
- if @stream.nil? and body.nil?
54
- # Full hijack.
53
+ if hijacked?
54
+ body&.close
55
55
  return
56
56
  end
57
57
 
@@ -36,7 +36,15 @@ module Async
36
36
  end
37
37
 
38
38
  def to_s
39
- "\#<#{self.class} #{@streams.count} active streams>"
39
+ "\#<#{self.class} #{@count} requests, #{@streams.count} active streams>"
40
+ end
41
+
42
+ def as_json(...)
43
+ to_s
44
+ end
45
+
46
+ def to_json(...)
47
+ as_json.to_json(...)
40
48
  end
41
49
 
42
50
  attr :stream
@@ -28,6 +28,18 @@ module Async
28
28
  @scheme = scheme
29
29
  end
30
30
 
31
+ def as_json(...)
32
+ {
33
+ endpoint: @endpoint.to_s,
34
+ protocol: @protocol,
35
+ scheme: @scheme,
36
+ }
37
+ end
38
+
39
+ def to_json(...)
40
+ as_json.to_json(...)
41
+ end
42
+
31
43
  attr :endpoint
32
44
  attr :protocol
33
45
  attr :scheme
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module HTTP
8
- VERSION = "0.64.0"
8
+ VERSION = "0.64.2"
9
9
  end
10
10
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.64.0
4
+ version: 0.64.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -54,7 +54,7 @@ cert_chain:
54
54
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
55
55
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
56
56
  -----END CERTIFICATE-----
57
- date: 2024-03-28 00:00:00.000000000 Z
57
+ date: 2024-04-22 00:00:00.000000000 Z
58
58
  dependencies:
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: async
@@ -118,14 +118,14 @@ dependencies:
118
118
  requirements:
119
119
  - - "~>"
120
120
  - !ruby/object:Gem::Version
121
- version: 0.18.0
121
+ version: 0.19.0
122
122
  type: :runtime
123
123
  prerelease: false
124
124
  version_requirements: !ruby/object:Gem::Requirement
125
125
  requirements:
126
126
  - - "~>"
127
127
  - !ruby/object:Gem::Version
128
- version: 0.18.0
128
+ version: 0.19.0
129
129
  - !ruby/object:Gem::Dependency
130
130
  name: protocol-http2
131
131
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file