async-http 0.67.1 → 0.68.0

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: 86fa32fbabfbf7e98484c197db5062ecbdd5fc7f2e360fbdb778781ab64c2d18
4
- data.tar.gz: 7212090a7708522c11dfa457e85714eb698493fc3382372f48b22cde748f1350
3
+ metadata.gz: 232e7394f119e448ebf2e16f2064d660ba164c852a23dc6d15c7cd7d3984d4de
4
+ data.tar.gz: 27bf2b400b9b4bab65cb2fee22ec75ed0ff74210fb61d53a1932ab3d8c6e9615
5
5
  SHA512:
6
- metadata.gz: 9aa817a134d29db249a8c503ac9fc69ffb8ed500e1518249f09f1fb4fe9d123e3682ec032d7e87368007ebcce56cf42861bd56be2e418d23d86565672d7a5017
7
- data.tar.gz: 71e89c429dbdc4731c6e4335d14a235946fd1fecbbdc2deeed0ec0ef332f7952a5d175de63009a91b4cc35544b3ee8b3e915c6586df5fbea9a78253a4c5f5e19
6
+ metadata.gz: ab4cf960886ec3f8efdd0587fef2214213d09aabd8501d8c2fb212da706c78c2df73fe9dff7ce0d882945727fd7dc6635650658a5b84421b07257d94c5a2d435
7
+ data.tar.gz: 70aea8682c576a672afc7b0f009f03a2ed8fadfe33c5e39e668754d9c6dd3d0e875d40734447d3983d8b11f0b5e92ce275d282766844e2552431476a74837b0f
checksums.yaml.gz.sig CHANGED
Binary file
@@ -3,6 +3,7 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2019-2024, by Samuel Williams.
5
5
  # Copyright, 2021-2022, by Adam Daniels.
6
+ # Copyright, 2024, by Thomas Morgan.
6
7
 
7
8
  require 'io/endpoint'
8
9
  require 'io/endpoint/host_endpoint'
@@ -32,6 +33,16 @@ module Async
32
33
  )
33
34
  end
34
35
 
36
+ # Coerce the given object into an endpoint.
37
+ # @parameter url [String | Endpoint] The URL or endpoint to convert.
38
+ def self.[](url)
39
+ if url.is_a?(Endpoint)
40
+ return url
41
+ else
42
+ Endpoint.parse(url.to_str)
43
+ end
44
+ end
45
+
35
46
  # @option scheme [String] the scheme to use, overrides the URL scheme.
36
47
  # @option hostname [String] the hostname to connect to (or bind to), overrides the URL hostname (used for SNI).
37
48
  # @option port [Integer] the port to bind to, overrides the URL port.
@@ -39,7 +39,7 @@ module Async
39
39
  # @parameter headers [Hash | Protocol::HTTP::Headers] The headers to send with the request.
40
40
  # @parameter body [String | Protocol::HTTP::Body] The body to send with the request.
41
41
  def call(method, url, headers = nil, body = nil)
42
- endpoint = Endpoint.parse(url)
42
+ endpoint = Endpoint[url]
43
43
  client = self.client_for(endpoint)
44
44
 
45
45
  body = Body::Buffered.wrap(body)
@@ -60,7 +60,7 @@ module Async
60
60
 
61
61
  ::Protocol::HTTP::Methods.each do |name, verb|
62
62
  define_method(verb.downcase) do |url, headers = nil, body = nil|
63
- self.call(verb, url.to_str, headers, body)
63
+ self.call(verb, url, headers, body)
64
64
  end
65
65
  end
66
66
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2023, by Thomas Morgan.
4
+ # Copyright, 2024, by Thomas Morgan.
5
5
 
6
6
  require_relative 'http1'
7
7
  require_relative 'http2'
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2017-2024, by Samuel Williams.
5
- # Copyright, 2023, by Thomas Morgan.
5
+ # Copyright, 2024, by Thomas Morgan.
6
6
 
7
7
  require_relative 'http1/client'
8
8
  require_relative 'http1/server'
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2017-2024, by Samuel Williams.
5
- # Copyright, 2023, by Thomas Morgan.
5
+ # Copyright, 2024, by Thomas Morgan.
6
6
 
7
7
  require_relative 'http1'
8
8
 
@@ -3,7 +3,7 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2017-2024, by Samuel Williams.
5
5
  # Copyright, 2018, by Janko Marohnić.
6
- # Copyright, 2023, by Thomas Morgan.
6
+ # Copyright, 2024, by Thomas Morgan.
7
7
 
8
8
  require_relative 'http1'
9
9
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2018-2024, by Samuel Williams.
5
- # Copyright, 2023, by Thomas Morgan.
5
+ # Copyright, 2024, by Thomas Morgan.
6
6
 
7
7
  require_relative 'http2/client'
8
8
  require_relative 'http2/server'
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module HTTP
8
- VERSION = "0.67.1"
8
+ VERSION = "0.68.0"
9
9
  end
10
10
  end
data/license.md CHANGED
@@ -17,7 +17,7 @@ Copyright, 2021-2022, by Adam Daniels.
17
17
  Copyright, 2022, by Ian Ker-Seymer.
18
18
  Copyright, 2022, by Marco Concetto Rudilosso.
19
19
  Copyright, 2022, by Tim Meusel.
20
- Copyright, 2023, by Thomas Morgan.
20
+ Copyright, 2023-2024, by Thomas Morgan.
21
21
  Copyright, 2023, by dependabot[bot].
22
22
  Copyright, 2023, by Josh Huber.
23
23
  Copyright, 2024, by Anton Zhuravsky.
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.67.1
4
+ version: 0.68.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -57,7 +57,7 @@ cert_chain:
57
57
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
58
58
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
59
59
  -----END CERTIFICATE-----
60
- date: 2024-06-10 00:00:00.000000000 Z
60
+ date: 2024-06-23 00:00:00.000000000 Z
61
61
  dependencies:
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: async
@@ -77,36 +77,30 @@ dependencies:
77
77
  name: async-pool
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.6.1
82
+ version: '0.7'
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.6.1
89
+ version: '0.7'
90
90
  - !ruby/object:Gem::Dependency
91
91
  name: io-endpoint
92
92
  requirement: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.10'
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: 0.10.3
96
+ version: '0.11'
100
97
  type: :runtime
101
98
  prerelease: false
102
99
  version_requirements: !ruby/object:Gem::Requirement
103
100
  requirements:
104
101
  - - "~>"
105
102
  - !ruby/object:Gem::Version
106
- version: '0.10'
107
- - - ">="
108
- - !ruby/object:Gem::Version
109
- version: 0.10.3
103
+ version: '0.11'
110
104
  - !ruby/object:Gem::Dependency
111
105
  name: io-stream
112
106
  requirement: !ruby/object:Gem::Requirement
@@ -127,56 +121,56 @@ dependencies:
127
121
  requirements:
128
122
  - - "~>"
129
123
  - !ruby/object:Gem::Version
130
- version: 0.26.0
124
+ version: '0.26'
131
125
  type: :runtime
132
126
  prerelease: false
133
127
  version_requirements: !ruby/object:Gem::Requirement
134
128
  requirements:
135
129
  - - "~>"
136
130
  - !ruby/object:Gem::Version
137
- version: 0.26.0
131
+ version: '0.26'
138
132
  - !ruby/object:Gem::Dependency
139
133
  name: protocol-http1
140
134
  requirement: !ruby/object:Gem::Requirement
141
135
  requirements:
142
136
  - - "~>"
143
137
  - !ruby/object:Gem::Version
144
- version: 0.19.0
138
+ version: '0.19'
145
139
  type: :runtime
146
140
  prerelease: false
147
141
  version_requirements: !ruby/object:Gem::Requirement
148
142
  requirements:
149
143
  - - "~>"
150
144
  - !ruby/object:Gem::Version
151
- version: 0.19.0
145
+ version: '0.19'
152
146
  - !ruby/object:Gem::Dependency
153
147
  name: protocol-http2
154
148
  requirement: !ruby/object:Gem::Requirement
155
149
  requirements:
156
150
  - - "~>"
157
151
  - !ruby/object:Gem::Version
158
- version: 0.18.0
152
+ version: '0.18'
159
153
  type: :runtime
160
154
  prerelease: false
161
155
  version_requirements: !ruby/object:Gem::Requirement
162
156
  requirements:
163
157
  - - "~>"
164
158
  - !ruby/object:Gem::Version
165
- version: 0.18.0
159
+ version: '0.18'
166
160
  - !ruby/object:Gem::Dependency
167
161
  name: traces
168
162
  requirement: !ruby/object:Gem::Requirement
169
163
  requirements:
170
164
  - - ">="
171
165
  - !ruby/object:Gem::Version
172
- version: 0.10.0
166
+ version: '0.10'
173
167
  type: :runtime
174
168
  prerelease: false
175
169
  version_requirements: !ruby/object:Gem::Requirement
176
170
  requirements:
177
171
  - - ">="
178
172
  - !ruby/object:Gem::Version
179
- version: 0.10.0
173
+ version: '0.10'
180
174
  description:
181
175
  email:
182
176
  executables: []
@@ -247,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
241
  - !ruby/object:Gem::Version
248
242
  version: '0'
249
243
  requirements: []
250
- rubygems_version: 3.5.9
244
+ rubygems_version: 3.5.11
251
245
  signing_key:
252
246
  specification_version: 4
253
247
  summary: A HTTP client and server library.
metadata.gz.sig CHANGED
@@ -1,3 +1,3 @@
1
- V���?��я-ROE7k~�8�2��=6��;1tX�ž�#45��+� �Qe�� �KCWݾ���u��č��;��AR�k�@�[����%O>_#e�F/�zڧ�9_HMD
2
- ���i.����DZ#�f3�I;��۴����|�@� 3SN��m$�m �U�LA&Vg8�+Fjm
3
- ]��d}Q6Gw� ���$v�Õ�i��=�����mUg�����c �;A���gsV5�F��K{�4�$O��ȴ�|�w"E��"��B4��HD.|a�!oΚ��D����43��B'��TB�ē_dJ��O8��U�j���D �~�r <IELs%���� \�B"?&�zd!~Ԃ0����T,"�`
1
+ 17YT����*@�3}�-��MdGZưm��CҁgE}��hjS�;I���J��祓[L���:O��� m��f2"2�8s��w��u8���7t
2
+ �p���נ�۶��$���AV�g���4@)
3
+ 8l��~4aQ0~��ޙ�}����wG��Nu)�χDmf���͛��W�M�4�