async-http-faraday 0.16.0 → 0.18.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: 7776d459550575acb11624923ae956bf21f3810a0ffc0017afbcf72b708729f7
4
- data.tar.gz: 3542ef8a35ddf61847f83af21386a7b43c42de3d5f4e72d26173293c8031703d
3
+ metadata.gz: 7b306179751e2a8f56e9f63b68b243f8ae504b8c7a79f2c00ecd98fc1e09d9ba
4
+ data.tar.gz: c5aef891d4ba786d2e489c847c021a00bb47c8b0096ad07b595184bf8cd96caf
5
5
  SHA512:
6
- metadata.gz: 4719795d6ce2bd376d136de090d850cb724c4d6de93e0aa813bd3288cb729332367f6f70525153e4a4f307f6336f4f188d0144caa7811fde978341527e55cefd
7
- data.tar.gz: c6b6fbe83e46143c10f426c6b483b7729c4d3e5ba507affd06985abdba7afbec2b5576c53f2ddd0b76beae911a536e61fe6e825126581d19ea15d81296c9286a
6
+ metadata.gz: 2faccb555f15488e99cc9f3b774dd9aae4eb9b3dac432623a85cf5c85019fa223cf0fe3538fb1e82cef67400f6d4ec86fc41ec8530a95effc69364fa50a99bf3
7
+ data.tar.gz: 4ea301d64d6bd6716eae5f7bbdb6569a31a4d51b9ac023a30f153ff248e87420c454966fb05cecd44acfad0a614690ada231b9d4ef6508f4ec53c4b87ee24a07
checksums.yaml.gz.sig CHANGED
Binary file
data/changes.md ADDED
@@ -0,0 +1,17 @@
1
+ # v0.18.0
2
+
3
+ ## Config Block
4
+
5
+ The `config_block` provided to the adapter must now return `nil`, `client` or a middleware wrapper around `client`.
6
+
7
+ ```ruby
8
+ Faraday.new do |builder|
9
+ builder.adapter :async_http do |client|
10
+ # Option 1 (same as returning `nil`), use client as is:
11
+ client # Use `client` as is.
12
+
13
+ # Option 2, wrap client in a middleware:
14
+ Async::HTTP::Middleware::LocationRedirector.new(client)
15
+ end
16
+ end
17
+ ```
@@ -76,7 +76,7 @@ module Async
76
76
  if clients = @connection_options.delete(:clients)
77
77
  @clients = clients.call(**@connection_options, &@config_block)
78
78
  else
79
- @clients = PersistentClients.new(**@connection_options, &@config_block)
79
+ @clients = PerThreadPersistentClients.new(**@connection_options, &@config_block)
80
80
  end
81
81
  end
82
82
 
@@ -38,8 +38,8 @@ module Async
38
38
  # @parameter endpoint [IO::Endpoint::Generic] The endpoint to create the client for.
39
39
  def make_client(endpoint)
40
40
  client = Client.new(endpoint, **@options)
41
- @block&.call(client)
42
- return client
41
+
42
+ return @block&.call(client) || client
43
43
  end
44
44
 
45
45
  # Get a client for the given endpoint.
@@ -6,7 +6,7 @@
6
6
  module Async
7
7
  module HTTP
8
8
  module Faraday
9
- VERSION = "0.16.0"
9
+ VERSION = "0.18.0"
10
10
  end
11
11
  end
12
12
  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-faraday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -46,7 +46,7 @@ cert_chain:
46
46
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
47
47
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
48
48
  -----END CERTIFICATE-----
49
- date: 2024-08-13 00:00:00.000000000 Z
49
+ date: 2024-08-17 00:00:00.000000000 Z
50
50
  dependencies:
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: async-http
@@ -82,6 +82,7 @@ executables: []
82
82
  extensions: []
83
83
  extra_rdoc_files: []
84
84
  files:
85
+ - changes.md
85
86
  - examples/topics.rb
86
87
  - lib/async/http/faraday.rb
87
88
  - lib/async/http/faraday/adapter.rb
metadata.gz.sig CHANGED
Binary file