async-http-faraday 0.13.0 → 0.14.0

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: f29979ba18e04a42d3d6e1f3f9c526ad317855469b29c0a558f5a44a9fc71ad9
4
- data.tar.gz: 6f2fdb360239562744b4cfda02b149d02320db6f739b9295c9e255741b33b921
3
+ metadata.gz: c8efd253e7a697bce2dbe8aafcab6cc667584242e923ee060213ee88ba40a2ce
4
+ data.tar.gz: 34c1d934c5e153091a04e5208144026d5da10e6dd429c67a0770a3f25b71ecdc
5
5
  SHA512:
6
- metadata.gz: 52cf7f3d635dfe2aeb1dfba9d0368cc080378e5481db807ff55764563f74cb5cf42adb1745d9543c64871043e645282826e3940128bf6df7c00460d7a0ec6478
7
- data.tar.gz: 9e24af568c3f181b3ac25076bac2d5285ac6ece909e095e9763207755244ffc068a80ec1705bc4ede81442dd3c7d232ae7f3a079c5f8ea9fb40d7aa6263c8f34
6
+ metadata.gz: 7d921cee566700dc9c82bbf9f993f20c8f912523ed75b78d7f644c0e962fce63203f38648867ebc74b600713d1240db7909d69f0199ac56e3dcef90942ac855e
7
+ data.tar.gz: 8a7746559ec23c868445ae1d18201d6ac00c38ef1c950d0401d14cf62c4852c4861ad852d5bc9fe7044840b7db659ff63ef7088354fded353014f1641d04bdad
checksums.yaml.gz.sig CHANGED
Binary file
@@ -18,7 +18,7 @@ require 'async/http/proxy'
18
18
  module Async
19
19
  module HTTP
20
20
  module Faraday
21
- class BodyWrapper < ::Protocol::HTTP::Body::Readable
21
+ class BodyReadWrapper < ::Protocol::HTTP::Body::Readable
22
22
  def initialize(body, block_size: 4096)
23
23
  @body = body
24
24
  @block_size = block_size
@@ -118,8 +118,11 @@ module Async
118
118
  if body = env.body
119
119
  # We need to wrap the body in a Readable object so that it can be read in chunks:
120
120
  # Faraday's body only responds to `#read`.
121
- # body = ::Protocol::HTTP::Body::Buffered.wrap(body)
122
- body = BodyWrapper.new(body)
121
+ if body.respond_to?(:read)
122
+ body = BodyReadWrapper.new(body)
123
+ else
124
+ body = ::Protocol::HTTP::Body::Buffered.wrap(body)
125
+ end
123
126
  end
124
127
 
125
128
  if headers = env.request_headers
@@ -6,7 +6,7 @@
6
6
  module Async
7
7
  module HTTP
8
8
  module Faraday
9
- VERSION = "0.13.0"
9
+ VERSION = "0.14.0"
10
10
  end
11
11
  end
12
12
  end
data/readme.md CHANGED
@@ -31,8 +31,8 @@ require 'async/http/faraday'
31
31
  Faraday.default_adapter = :async_http
32
32
 
33
33
  # Per connection:
34
- conn = Faraday.new(...) do |faraday|
35
- faraday.adapter :async_http
34
+ connection = Faraday.new(...) do |builder|
35
+ builder.adapter :async_http
36
36
  end
37
37
  ```
38
38
 
@@ -40,7 +40,7 @@ Here is how you make a request:
40
40
 
41
41
  ``` ruby
42
42
  Async do
43
- response = conn.get("/index")
43
+ response = connection.get("/index")
44
44
  end
45
45
  ```
46
46
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-http-faraday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -44,7 +44,7 @@ cert_chain:
44
44
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
45
45
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
46
46
  -----END CERTIFICATE-----
47
- date: 2024-02-07 00:00:00.000000000 Z
47
+ date: 2024-04-23 00:00:00.000000000 Z
48
48
  dependencies:
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: async-http
@@ -90,7 +90,9 @@ files:
90
90
  homepage: https://github.com/socketry/async-http
91
91
  licenses:
92
92
  - MIT
93
- metadata: {}
93
+ metadata:
94
+ documentation_uri: https://socketry.github.io/async-http/
95
+ source_code_uri: https://github.com/socketry/async-http.git
94
96
  post_install_message:
95
97
  rdoc_options: []
96
98
  require_paths:
@@ -99,7 +101,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
101
  requirements:
100
102
  - - ">="
101
103
  - !ruby/object:Gem::Version
102
- version: '3.0'
104
+ version: '3.1'
103
105
  required_rubygems_version: !ruby/object:Gem::Requirement
104
106
  requirements:
105
107
  - - ">="
metadata.gz.sig CHANGED
Binary file