faraday-typhoeus 1.1.0 → 2.0.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 +4 -4
- data/LICENSE.md +1 -1
- data/README.md +22 -2
- data/lib/faraday/typhoeus/version.rb +1 -1
- metadata +4 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1f7f589b91eba8e0f1397798d4c80f239b42c9396d1aa8dece302231133b441e
|
|
4
|
+
data.tar.gz: 249bb2a906e2b46af947825c729904a16ece5192ae327b45d52d57bf39ed96f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ab22db2585d259a3b1235b217dd909893e6c763f076a7a7da7037b02011e7bf2b4aaa5fb85c308c198b4001298ca765d78a96293b18257b2edf0161cffc711f
|
|
7
|
+
data.tar.gz: 8ae5279149e15e9c6acfefaa99784beac083ed71def30e69b2bc656dac8cd7874f8998357bd36994409891b6fad0cb4754f095d2d0d085f9007b5275dfde2f08
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
|
@@ -66,9 +66,17 @@ responses[0].body
|
|
|
66
66
|
responses[1].body
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
Typhoeus's [max concurrency][max_concurrency] defaults to 200 and can be controlled like so:
|
|
70
|
+
|
|
71
|
+
```ruby
|
|
72
|
+
conn.in_parallel(Typhoeus::Hydra.new(max_concurrency: 20)) do
|
|
73
|
+
# ...requests
|
|
74
|
+
end
|
|
75
|
+
```
|
|
76
|
+
|
|
69
77
|
### Streaming Responses
|
|
70
78
|
|
|
71
|
-
The adapter supports [streamed responses]
|
|
79
|
+
The adapter supports [streamed responses][faraday_streaming] via the `on_data` option:
|
|
72
80
|
|
|
73
81
|
```ruby
|
|
74
82
|
conn = Faraday.new(...) do |f|
|
|
@@ -108,6 +116,16 @@ rescue Faraday::ConnectionFailed => ex
|
|
|
108
116
|
end
|
|
109
117
|
```
|
|
110
118
|
|
|
119
|
+
### Compression
|
|
120
|
+
|
|
121
|
+
By default, this adapter takes advantage of libcurl's ability to [transparently handle HTTP compression][curl_accept_encoding]. To disable this behavior, set `accept_encoding` to `nil`:
|
|
122
|
+
|
|
123
|
+
```ruby
|
|
124
|
+
conn = Faraday.new(...) do |f|
|
|
125
|
+
f.adapter :typhoeus, accept_encoding: nil
|
|
126
|
+
end
|
|
127
|
+
```
|
|
128
|
+
|
|
111
129
|
## Resources
|
|
112
130
|
|
|
113
131
|
- See [Typhoeus Documentation][typhoeus] for more info.
|
|
@@ -139,7 +157,9 @@ The gem is available as open source under the terms of the [license][license].
|
|
|
139
157
|
[typhoeus]: https://github.com/typhoeus/typhoeus
|
|
140
158
|
[typhoeus_options]: https://github.com/typhoeus/typhoeus/blob/3544111b76b95d13da7cc6bfe4eb07921d771d93/lib/typhoeus/easy_factory.rb#L13-L39
|
|
141
159
|
[ethon_options]: https://github.com/typhoeus/ethon/blob/5d9ddf8f609a6be4b5c60d55e1e338eeeb08f25f/lib/ethon/curls/options.rb#L214-L499
|
|
142
|
-
[faraday_streaming]: https://lostisland.github.io/faraday/
|
|
160
|
+
[faraday_streaming]: https://lostisland.github.io/faraday/#/advanced/streaming-responses
|
|
143
161
|
[repo]: https://github.com/dleavitt/faraday-typhoeus
|
|
144
162
|
[license]: LICENSE.md
|
|
145
163
|
[rubygems]: https://github.com/dleavitt/faraday-typhoeus/blob/main/rubygems
|
|
164
|
+
[max_concurrency]: https://github.com/typhoeus/typhoeus?tab=readme-ov-file#specifying-max-concurrency
|
|
165
|
+
[curl_accept_encoding]: https://curl.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: faraday-typhoeus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Leavitt
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: faraday
|
|
@@ -58,7 +57,6 @@ metadata:
|
|
|
58
57
|
source_code_uri: https://github.com/dleavitt/faraday-typhoeus
|
|
59
58
|
changelog_uri: https://github.com/dleavitt/faraday-typhoeus
|
|
60
59
|
rubygems_mfa_required: 'true'
|
|
61
|
-
post_install_message:
|
|
62
60
|
rdoc_options: []
|
|
63
61
|
require_paths:
|
|
64
62
|
- lib
|
|
@@ -66,15 +64,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
66
64
|
requirements:
|
|
67
65
|
- - ">="
|
|
68
66
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 2.
|
|
67
|
+
version: 2.7.0
|
|
70
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
69
|
requirements:
|
|
72
70
|
- - ">="
|
|
73
71
|
- !ruby/object:Gem::Version
|
|
74
72
|
version: '0'
|
|
75
73
|
requirements: []
|
|
76
|
-
rubygems_version:
|
|
77
|
-
signing_key:
|
|
74
|
+
rubygems_version: 4.1.0.dev
|
|
78
75
|
specification_version: 4
|
|
79
76
|
summary: Faraday adapter for Typhoeus
|
|
80
77
|
test_files: []
|