typhoeus 1.4.0 → 1.5.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 +5 -5
- data/CHANGELOG.md +47 -1
- data/README.md +10 -6
- data/lib/typhoeus/config.rb +16 -0
- data/lib/typhoeus/easy_factory.rb +26 -0
- data/lib/typhoeus/expectation.rb +4 -2
- data/lib/typhoeus/request/responseable.rb +1 -1
- data/lib/typhoeus/request.rb +2 -0
- data/lib/typhoeus/response/informations.rb +57 -0
- data/lib/typhoeus/version.rb +1 -1
- data/typhoeus.gemspec +14 -4
- metadata +18 -97
- data/.gitignore +0 -8
- data/.rspec +0 -4
- data/.travis.yml +0 -26
- data/Gemfile +0 -32
- data/Guardfile +0 -9
- data/Rakefile +0 -38
- data/perf/profile.rb +0 -14
- data/perf/vs_nethttp.rb +0 -64
- data/spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb +0 -156
- data/spec/rack/typhoeus/middleware/params_decoder_spec.rb +0 -31
- data/spec/spec_helper.rb +0 -29
- data/spec/support/localhost_server.rb +0 -94
- data/spec/support/memory_cache.rb +0 -15
- data/spec/support/server.rb +0 -116
- data/spec/typhoeus/adapters/faraday_spec.rb +0 -339
- data/spec/typhoeus/cache/dalli_spec.rb +0 -41
- data/spec/typhoeus/cache/redis_spec.rb +0 -41
- data/spec/typhoeus/config_spec.rb +0 -15
- data/spec/typhoeus/easy_factory_spec.rb +0 -143
- data/spec/typhoeus/errors/no_stub_spec.rb +0 -13
- data/spec/typhoeus/expectation_spec.rb +0 -280
- data/spec/typhoeus/hydra/addable_spec.rb +0 -22
- data/spec/typhoeus/hydra/before_spec.rb +0 -98
- data/spec/typhoeus/hydra/block_connection_spec.rb +0 -18
- data/spec/typhoeus/hydra/cacheable_spec.rb +0 -88
- data/spec/typhoeus/hydra/memoizable_spec.rb +0 -53
- data/spec/typhoeus/hydra/queueable_spec.rb +0 -98
- data/spec/typhoeus/hydra/runnable_spec.rb +0 -137
- data/spec/typhoeus/hydra/stubbable_spec.rb +0 -48
- data/spec/typhoeus/hydra_spec.rb +0 -22
- data/spec/typhoeus/pool_spec.rb +0 -137
- data/spec/typhoeus/request/actions_spec.rb +0 -19
- data/spec/typhoeus/request/before_spec.rb +0 -93
- data/spec/typhoeus/request/block_connection_spec.rb +0 -75
- data/spec/typhoeus/request/cacheable_spec.rb +0 -94
- data/spec/typhoeus/request/callbacks_spec.rb +0 -91
- data/spec/typhoeus/request/marshal_spec.rb +0 -60
- data/spec/typhoeus/request/memoizable_spec.rb +0 -34
- data/spec/typhoeus/request/operations_spec.rb +0 -101
- data/spec/typhoeus/request/responseable_spec.rb +0 -13
- data/spec/typhoeus/request/stubbable_spec.rb +0 -45
- data/spec/typhoeus/request_spec.rb +0 -232
- data/spec/typhoeus/response/header_spec.rb +0 -147
- data/spec/typhoeus/response/informations_spec.rb +0 -283
- data/spec/typhoeus/response/status_spec.rb +0 -256
- data/spec/typhoeus/response_spec.rb +0 -100
- data/spec/typhoeus_spec.rb +0 -105
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '09cda92cc81622180d5611b30234ea35c382779dcac43716ed3acaa041f41c31'
|
4
|
+
data.tar.gz: 739ebbdbffe74d7a72e2ef2c07f85585e62bc38f9e44c3926ed0c6635797e63b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89ec1a6d9c2d8f9a1e74688507961e14d97742049df617baa3141311ef9951cb1ae9bce20d29f41ab371f97ea1022f1062a6ae07b9838fd27551513161faf0c8
|
7
|
+
data.tar.gz: aedfec09b2f08c34c279574ec34637a0f8262b1a00be8a36c18918ebf7d9ea9ed9e962fc0f8851f312f96bf588dc77830ce4636f34b43d92434c825832e1e13b
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,53 @@
|
|
2
2
|
|
3
3
|
## Master
|
4
4
|
|
5
|
-
[Full Changelog](http://github.com/typhoeus/typhoeus/compare/v1.
|
5
|
+
[Full Changelog](http://github.com/typhoeus/typhoeus/compare/v1.5.0...master)
|
6
|
+
|
7
|
+
## 1.5.0
|
8
|
+
|
9
|
+
[Full Changelog](http://github.com/typhoeus/typhoeus/compare/v1.4.1...v1.5.0)
|
10
|
+
|
11
|
+
* Update gemspec with metadata and remove extra files from the bundled gem.
|
12
|
+
([Felipe Mesquita](https://github.com/felipedmesquita), [#734](https://github.com/typhoeus/typhoeus/pull/734))
|
13
|
+
* Require Ruby 2.6+ and simplify Gemfile.
|
14
|
+
([Felipe Mesquita](https://github.com/felipedmesquita), [#733](https://github.com/typhoeus/typhoeus/pull/733))
|
15
|
+
* Add support for URI objects in `Typhoeus.stub()`.
|
16
|
+
([Katelyn Schiesser](https://github.com/slowbro), [#732](https://github.com/typhoeus/typhoeus/pull/732))
|
17
|
+
* Add explicit require for logger and ostruct gems for Ruby 3.5+ compatibility.
|
18
|
+
([Felipe Mesquita](https://github.com/felipedmesquita), [#729](https://github.com/typhoeus/typhoeus/pull/729))
|
19
|
+
* Add Ruby 3.4 to CI matrix.
|
20
|
+
([y-yagi](https://github.com/y-yagi), [#728](https://github.com/typhoeus/typhoeus/pull/728))
|
21
|
+
* Support curl 8.9 error message changes in tests.
|
22
|
+
([Mamoru TASAKA](https://github.com/mtasaka), [#724](https://github.com/typhoeus/typhoeus/pull/724))
|
23
|
+
* Add Ruby 3.2 and 3.3 to CI, drop Ruby 2.5, lock ethon < 0.16.0.
|
24
|
+
([y-yagi](https://github.com/y-yagi), [#716](https://github.com/typhoeus/typhoeus/pull/716))
|
25
|
+
* Fix typo in comment: "reponse" → "response".
|
26
|
+
([George Brocklehurst](https://github.com/georgebrock), [#700](https://github.com/typhoeus/typhoeus/pull/700))
|
27
|
+
|
28
|
+
## 1.4.1
|
29
|
+
|
30
|
+
[Full Changelog](http://github.com/typhoeus/typhoeus/compare/v1.4.0...v1.4.1)
|
31
|
+
|
32
|
+
* Fix to run CI with Ruby 3.0.
|
33
|
+
([mishina](https://github.com/mishina2228), [#699](https://github.com/typhoeus/typhoeus/pull/699))
|
34
|
+
* Replace CI status badge from Travis to GH Actions.
|
35
|
+
([mishina](https://github.com/mishina2228), [#698](https://github.com/typhoeus/typhoeus/pull/698))
|
36
|
+
* Added getter for `redirect_url` attribute.
|
37
|
+
([Adrien Rey-Jarthon](https://github.com/jarthod), [#697](https://github.com/typhoeus/typhoeus/pull/697))
|
38
|
+
* CI: Adjust ruby versions and MacOS runs.
|
39
|
+
([Holger Arndt](https://github.com/Kjarrigan), [#696](https://github.com/typhoeus/typhoeus/pull/696))
|
40
|
+
* Allow performing `curl --upload-file`.
|
41
|
+
([Arian Faurtosh](https://github.com/arianf), [#695](https://github.com/typhoeus/typhoeus/pull/695))
|
42
|
+
* Add getter for size_upload, size_download, speed_upload, speed_download values.
|
43
|
+
([Ryo Nakano](https://github.com/ryonkn), [#692](https://github.com/typhoeus/typhoeus/pull/692))
|
44
|
+
* Use bundle add instead.
|
45
|
+
([Glauco Custodio](https://github.com/glaucocustodio), [#691](https://github.com/typhoeus/typhoeus/pull/691))
|
46
|
+
* Travis -> Github actions.
|
47
|
+
([John Mortlock](https://github.com/jmortlock), [#689](https://github.com/typhoeus/typhoeus/pull/689))
|
48
|
+
* Add global timeout and connecttimeout to config.
|
49
|
+
([Teck Wan Wong](https://github.com/teckwan), [#685](https://github.com/typhoeus/typhoeus/pull/685))
|
50
|
+
* Update README.md.
|
51
|
+
([Hussain Akram](https://github.com/hussainakram), [#677](https://github.com/typhoeus/typhoeus/pull/677))
|
6
52
|
|
7
53
|
## 1.4.0
|
8
54
|
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Typhoeus [](https://github.com/typhoeus/typhoeus/actions/workflows/ci.yml) [](https://github.com/typhoeus/typhoeus/actions/workflows/experimental.yml) [](https://codeclimate.com/github/typhoeus/typhoeus) [](https://rubygems.org/gems/typhoeus)
|
2
2
|
|
3
3
|
Like a modern code version of the mythical beast with 100 serpent heads, Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling logic.
|
4
4
|
|
@@ -19,11 +19,10 @@ hydra.run
|
|
19
19
|
```
|
20
20
|
|
21
21
|
## Installation
|
22
|
-
|
22
|
+
Run:
|
23
23
|
```
|
24
|
-
|
24
|
+
bundle add typhoeus
|
25
25
|
```
|
26
|
-
Then run `bundle install`
|
27
26
|
|
28
27
|
Or install it yourself as:
|
29
28
|
|
@@ -33,8 +32,7 @@ gem install typhoeus
|
|
33
32
|
|
34
33
|
## Project Tracking
|
35
34
|
|
36
|
-
* [Documentation](
|
37
|
-
* [Mailing list](http://groups.google.com/group/typhoeus)
|
35
|
+
* [API Documentation](https://rubydoc.info/github/typhoeus/typhoeus/frames/Typhoeus) (GitHub master)
|
38
36
|
|
39
37
|
## Usage
|
40
38
|
|
@@ -350,6 +348,8 @@ Typhoeus.get("www.example.com").cached?
|
|
350
348
|
For use with [Dalli](https://github.com/mperham/dalli):
|
351
349
|
|
352
350
|
```ruby
|
351
|
+
require "typhoeus/cache/dalli"
|
352
|
+
|
353
353
|
dalli = Dalli::Client.new(...)
|
354
354
|
Typhoeus::Config.cache = Typhoeus::Cache::Dalli.new(dalli)
|
355
355
|
```
|
@@ -357,12 +357,16 @@ Typhoeus::Config.cache = Typhoeus::Cache::Dalli.new(dalli)
|
|
357
357
|
For use with Rails:
|
358
358
|
|
359
359
|
```ruby
|
360
|
+
require "typhoeus/cache/rails"
|
361
|
+
|
360
362
|
Typhoeus::Config.cache = Typhoeus::Cache::Rails.new
|
361
363
|
```
|
362
364
|
|
363
365
|
For use with [Redis](https://github.com/redis/redis-rb):
|
364
366
|
|
365
367
|
```ruby
|
368
|
+
require "typhoeus/cache/redis"
|
369
|
+
|
366
370
|
redis = Redis.new(...)
|
367
371
|
Typhoeus::Config.cache = Typhoeus::Cache::Redis.new(redis)
|
368
372
|
```
|
data/lib/typhoeus/config.rb
CHANGED
@@ -44,6 +44,22 @@ module Typhoeus
|
|
44
44
|
# @see http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTVERBOSE
|
45
45
|
attr_accessor :verbose
|
46
46
|
|
47
|
+
# Defines the default HTTP timeout for the entire request in seconds
|
48
|
+
# See README for more details about timeouts
|
49
|
+
#
|
50
|
+
# @return [ Integer, Float ]
|
51
|
+
#
|
52
|
+
# @see https://curl.haxx.se/libcurl/c/curl_easy_setopt#CURLOPTTIMEOUT
|
53
|
+
attr_accessor :timeout
|
54
|
+
|
55
|
+
# Defines the default HTTP timeout for the connection phase in seconds
|
56
|
+
# See README for more details about timeouts
|
57
|
+
#
|
58
|
+
# @return [ Integer, Float ]
|
59
|
+
#
|
60
|
+
# @see https://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTCONNECTTIMEOUT
|
61
|
+
attr_accessor :connecttimeout
|
62
|
+
|
47
63
|
# Defines whether requests are cached.
|
48
64
|
#
|
49
65
|
# @return [ Object ]
|
@@ -78,11 +78,17 @@ module Typhoeus
|
|
78
78
|
# @return [ Ethon::Easy ] The easy.
|
79
79
|
def get
|
80
80
|
begin
|
81
|
+
read_callback_body = request.options.delete(:set_read_callback)
|
82
|
+
|
81
83
|
easy.http_request(
|
82
84
|
request.base_url.to_s,
|
83
85
|
request.options.fetch(:method, :get),
|
84
86
|
sanitize(request.options)
|
85
87
|
)
|
88
|
+
|
89
|
+
# this needs to happen after http_request because
|
90
|
+
# ethon will set infilesize to zero if form.empty?
|
91
|
+
set_read_callback(read_callback_body) if !read_callback_body.nil?
|
86
92
|
rescue Ethon::Errors::InvalidOption => e
|
87
93
|
help = provide_help(e.message.match(/:\s(\w+)/)[1])
|
88
94
|
raise $!, "#{$!}#{help}", $!.backtrace
|
@@ -169,6 +175,26 @@ module Typhoeus
|
|
169
175
|
end
|
170
176
|
end
|
171
177
|
|
178
|
+
# Sets up an easy upload with CURLOPT_READFUNCTION
|
179
|
+
# along with CURLOPT_INFILESIZE_LARGE and CURLOPT_UPLOAD
|
180
|
+
#
|
181
|
+
# @param [ String/File ] body The body read by the readfunction.
|
182
|
+
#
|
183
|
+
# @return [ Ethon::Easy ] The easy.
|
184
|
+
def set_read_callback(body)
|
185
|
+
easy.infilesize_large =
|
186
|
+
if body.respond_to?(:bytesize)
|
187
|
+
body.bytesize
|
188
|
+
elsif body.respond_to?(:size)
|
189
|
+
body.size
|
190
|
+
end
|
191
|
+
|
192
|
+
easy.upload = true
|
193
|
+
easy.set_read_callback(body)
|
194
|
+
|
195
|
+
easy
|
196
|
+
end
|
197
|
+
|
172
198
|
def provide_help(option)
|
173
199
|
if new_option = CHANGED_OPTIONS[option.to_sym]
|
174
200
|
"\nPlease try #{new_option} instead of #{option}." if new_option
|
data/lib/typhoeus/expectation.rb
CHANGED
@@ -204,9 +204,11 @@ module Typhoeus
|
|
204
204
|
def url_match?(request_url)
|
205
205
|
case base_url
|
206
206
|
when String
|
207
|
-
base_url == request_url
|
207
|
+
base_url == request_url.to_s
|
208
208
|
when Regexp
|
209
|
-
base_url === request_url
|
209
|
+
base_url === request_url.to_s
|
210
|
+
when defined?(URI) && URI
|
211
|
+
base_url.to_s == request_url.to_s
|
210
212
|
when nil
|
211
213
|
true
|
212
214
|
else
|
data/lib/typhoeus/request.rb
CHANGED
@@ -214,6 +214,8 @@ module Typhoeus
|
|
214
214
|
options[:headers] = {'User-Agent' => default_user_agent}.merge(options[:headers] || {})
|
215
215
|
options[:headers]['Expect'] ||= ''
|
216
216
|
options[:verbose] = Typhoeus::Config.verbose if options[:verbose].nil? && !Typhoeus::Config.verbose.nil?
|
217
|
+
options[:timeout] = Typhoeus::Config.timeout if options[:timeout].nil? && !Typhoeus::Config.timeout.nil?
|
218
|
+
options[:connecttimeout] = Typhoeus::Config.connecttimeout if options[:connecttimeout].nil? && !Typhoeus::Config.connecttimeout.nil?
|
217
219
|
options[:maxredirs] ||= 50
|
218
220
|
options[:proxy] = Typhoeus::Config.proxy unless options.has_key?(:proxy) || Typhoeus::Config.proxy.nil?
|
219
221
|
end
|
@@ -210,10 +210,67 @@ module Typhoeus
|
|
210
210
|
options[:redirect_count]
|
211
211
|
end
|
212
212
|
|
213
|
+
# Return the URL a redirect would take you to, had you enabled redirects.
|
214
|
+
#
|
215
|
+
# @example Get redirect_url.
|
216
|
+
# response.redirect_url
|
217
|
+
#
|
218
|
+
# @return [ String ] The redirect_url.
|
219
|
+
def redirect_url
|
220
|
+
options[:redirect_url]
|
221
|
+
end
|
222
|
+
|
213
223
|
def request_size
|
214
224
|
options[:request_size]
|
215
225
|
end
|
216
226
|
|
227
|
+
# Return the bytes, the total amount of bytes that were uploaded
|
228
|
+
#
|
229
|
+
# @example Get size_upload.
|
230
|
+
# response.size_upload
|
231
|
+
#
|
232
|
+
# @return [ Float ] The size_upload.
|
233
|
+
def size_upload
|
234
|
+
options[:size_upload]
|
235
|
+
end
|
236
|
+
|
237
|
+
|
238
|
+
# Return the bytes, the total amount of bytes that were downloaded.
|
239
|
+
# The amount is only for the latest transfer and will be reset again
|
240
|
+
# for each new transfer. This counts actual payload data, what's
|
241
|
+
# also commonly called body. All meta and header data are excluded
|
242
|
+
# and will not be counted in this number.
|
243
|
+
#
|
244
|
+
# @example Get size_download
|
245
|
+
# response.size_download
|
246
|
+
#
|
247
|
+
# @return [ Float ] The size_download.
|
248
|
+
def size_download
|
249
|
+
options[:size_download]
|
250
|
+
end
|
251
|
+
|
252
|
+
# Return the bytes/second, the average upload speed that curl
|
253
|
+
# measured for the complete upload
|
254
|
+
#
|
255
|
+
# @example Get speed_upload.
|
256
|
+
# response.speed_upload
|
257
|
+
#
|
258
|
+
# @return [ Float ] The speed_upload.
|
259
|
+
def speed_upload
|
260
|
+
options[:speed_upload]
|
261
|
+
end
|
262
|
+
|
263
|
+
# Return the bytes/second, the average download speed that curl
|
264
|
+
# measured for the complete download
|
265
|
+
#
|
266
|
+
# @example Get speed_download.
|
267
|
+
# response.speed_download
|
268
|
+
#
|
269
|
+
# @return [ Float ] The speed_download.
|
270
|
+
def speed_download
|
271
|
+
options[:speed_download]
|
272
|
+
end
|
273
|
+
|
217
274
|
def debug_info
|
218
275
|
options[:debug_info]
|
219
276
|
end
|
data/lib/typhoeus/version.rb
CHANGED
data/typhoeus.gemspec
CHANGED
@@ -14,12 +14,22 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.summary = "Parallel HTTP library on top of libcurl multi."
|
15
15
|
s.description = %q{Like a modern code version of the mythical beast with 100 serpent heads, Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling logic.}
|
16
16
|
|
17
|
-
s.
|
17
|
+
s.required_ruby_version = ">= 2.6"
|
18
18
|
s.license = 'MIT'
|
19
|
+
s.metadata = {
|
20
|
+
'bug_tracker_uri' => 'https://github.com/typhoeus/typhoeus/issues',
|
21
|
+
'changelog_uri' => "https://github.com/typhoeus/typhoeus/blob/v#{s.version}/CHANGELOG.md",
|
22
|
+
'documentation_uri' => "https://www.rubydoc.info/gems/typhoeus/#{s.version}",
|
23
|
+
'rubygems_mfa_required' => 'true',
|
24
|
+
'source_code_uri' => "https://github.com/typhoeus/typhoeus/tree/v#{s.version}"
|
25
|
+
}
|
19
26
|
|
20
|
-
s.add_dependency('ethon', [">= 0.9.0"])
|
27
|
+
s.add_dependency('ethon', [">= 0.9.0", "< 0.16.0"])
|
21
28
|
|
22
|
-
s.files
|
23
|
-
|
29
|
+
s.files = Dir.chdir(__dir__) do
|
30
|
+
`git ls-files -z`.split("\x0").reject do |file|
|
31
|
+
file.start_with?(*%w[. Gemfile Guardfile Rakefile perf spec])
|
32
|
+
end
|
33
|
+
end
|
24
34
|
s.require_path = 'lib'
|
25
35
|
end
|
metadata
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typhoeus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Balatero
|
8
8
|
- Paul Dix
|
9
9
|
- Hans Hasselberg
|
10
|
-
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: ethon
|
@@ -19,6 +18,9 @@ dependencies:
|
|
19
18
|
- - ">="
|
20
19
|
- !ruby/object:Gem::Version
|
21
20
|
version: 0.9.0
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.16.0
|
22
24
|
type: :runtime
|
23
25
|
prerelease: false
|
24
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,6 +28,9 @@ dependencies:
|
|
26
28
|
- - ">="
|
27
29
|
- !ruby/object:Gem::Version
|
28
30
|
version: 0.9.0
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.16.0
|
29
34
|
description: Like a modern code version of the mythical beast with 100 serpent heads,
|
30
35
|
Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling logic.
|
31
36
|
email:
|
@@ -34,16 +39,10 @@ executables: []
|
|
34
39
|
extensions: []
|
35
40
|
extra_rdoc_files: []
|
36
41
|
files:
|
37
|
-
- ".gitignore"
|
38
|
-
- ".rspec"
|
39
|
-
- ".travis.yml"
|
40
42
|
- CHANGELOG.md
|
41
43
|
- CONTRIBUTING.md
|
42
|
-
- Gemfile
|
43
|
-
- Guardfile
|
44
44
|
- LICENSE
|
45
45
|
- README.md
|
46
|
-
- Rakefile
|
47
46
|
- UPGRADE.md
|
48
47
|
- lib/rack/typhoeus.rb
|
49
48
|
- lib/rack/typhoeus/middleware/params_decoder.rb
|
@@ -88,53 +87,16 @@ files:
|
|
88
87
|
- lib/typhoeus/response/informations.rb
|
89
88
|
- lib/typhoeus/response/status.rb
|
90
89
|
- lib/typhoeus/version.rb
|
91
|
-
- perf/profile.rb
|
92
|
-
- perf/vs_nethttp.rb
|
93
|
-
- spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb
|
94
|
-
- spec/rack/typhoeus/middleware/params_decoder_spec.rb
|
95
|
-
- spec/spec_helper.rb
|
96
|
-
- spec/support/localhost_server.rb
|
97
|
-
- spec/support/memory_cache.rb
|
98
|
-
- spec/support/server.rb
|
99
|
-
- spec/typhoeus/adapters/faraday_spec.rb
|
100
|
-
- spec/typhoeus/cache/dalli_spec.rb
|
101
|
-
- spec/typhoeus/cache/redis_spec.rb
|
102
|
-
- spec/typhoeus/config_spec.rb
|
103
|
-
- spec/typhoeus/easy_factory_spec.rb
|
104
|
-
- spec/typhoeus/errors/no_stub_spec.rb
|
105
|
-
- spec/typhoeus/expectation_spec.rb
|
106
|
-
- spec/typhoeus/hydra/addable_spec.rb
|
107
|
-
- spec/typhoeus/hydra/before_spec.rb
|
108
|
-
- spec/typhoeus/hydra/block_connection_spec.rb
|
109
|
-
- spec/typhoeus/hydra/cacheable_spec.rb
|
110
|
-
- spec/typhoeus/hydra/memoizable_spec.rb
|
111
|
-
- spec/typhoeus/hydra/queueable_spec.rb
|
112
|
-
- spec/typhoeus/hydra/runnable_spec.rb
|
113
|
-
- spec/typhoeus/hydra/stubbable_spec.rb
|
114
|
-
- spec/typhoeus/hydra_spec.rb
|
115
|
-
- spec/typhoeus/pool_spec.rb
|
116
|
-
- spec/typhoeus/request/actions_spec.rb
|
117
|
-
- spec/typhoeus/request/before_spec.rb
|
118
|
-
- spec/typhoeus/request/block_connection_spec.rb
|
119
|
-
- spec/typhoeus/request/cacheable_spec.rb
|
120
|
-
- spec/typhoeus/request/callbacks_spec.rb
|
121
|
-
- spec/typhoeus/request/marshal_spec.rb
|
122
|
-
- spec/typhoeus/request/memoizable_spec.rb
|
123
|
-
- spec/typhoeus/request/operations_spec.rb
|
124
|
-
- spec/typhoeus/request/responseable_spec.rb
|
125
|
-
- spec/typhoeus/request/stubbable_spec.rb
|
126
|
-
- spec/typhoeus/request_spec.rb
|
127
|
-
- spec/typhoeus/response/header_spec.rb
|
128
|
-
- spec/typhoeus/response/informations_spec.rb
|
129
|
-
- spec/typhoeus/response/status_spec.rb
|
130
|
-
- spec/typhoeus/response_spec.rb
|
131
|
-
- spec/typhoeus_spec.rb
|
132
90
|
- typhoeus.gemspec
|
133
91
|
homepage: https://github.com/typhoeus/typhoeus
|
134
92
|
licenses:
|
135
93
|
- MIT
|
136
|
-
metadata:
|
137
|
-
|
94
|
+
metadata:
|
95
|
+
bug_tracker_uri: https://github.com/typhoeus/typhoeus/issues
|
96
|
+
changelog_uri: https://github.com/typhoeus/typhoeus/blob/v1.5.0/CHANGELOG.md
|
97
|
+
documentation_uri: https://www.rubydoc.info/gems/typhoeus/1.5.0
|
98
|
+
rubygems_mfa_required: 'true'
|
99
|
+
source_code_uri: https://github.com/typhoeus/typhoeus/tree/v1.5.0
|
138
100
|
rdoc_options: []
|
139
101
|
require_paths:
|
140
102
|
- lib
|
@@ -142,55 +104,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
104
|
requirements:
|
143
105
|
- - ">="
|
144
106
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
107
|
+
version: '2.6'
|
146
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
109
|
requirements:
|
148
110
|
- - ">="
|
149
111
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
112
|
+
version: '0'
|
151
113
|
requirements: []
|
152
|
-
|
153
|
-
rubygems_version: 2.5.2.3
|
154
|
-
signing_key:
|
114
|
+
rubygems_version: 3.7.1
|
155
115
|
specification_version: 4
|
156
116
|
summary: Parallel HTTP library on top of libcurl multi.
|
157
|
-
test_files:
|
158
|
-
- spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb
|
159
|
-
- spec/rack/typhoeus/middleware/params_decoder_spec.rb
|
160
|
-
- spec/spec_helper.rb
|
161
|
-
- spec/support/localhost_server.rb
|
162
|
-
- spec/support/memory_cache.rb
|
163
|
-
- spec/support/server.rb
|
164
|
-
- spec/typhoeus/adapters/faraday_spec.rb
|
165
|
-
- spec/typhoeus/cache/dalli_spec.rb
|
166
|
-
- spec/typhoeus/cache/redis_spec.rb
|
167
|
-
- spec/typhoeus/config_spec.rb
|
168
|
-
- spec/typhoeus/easy_factory_spec.rb
|
169
|
-
- spec/typhoeus/errors/no_stub_spec.rb
|
170
|
-
- spec/typhoeus/expectation_spec.rb
|
171
|
-
- spec/typhoeus/hydra/addable_spec.rb
|
172
|
-
- spec/typhoeus/hydra/before_spec.rb
|
173
|
-
- spec/typhoeus/hydra/block_connection_spec.rb
|
174
|
-
- spec/typhoeus/hydra/cacheable_spec.rb
|
175
|
-
- spec/typhoeus/hydra/memoizable_spec.rb
|
176
|
-
- spec/typhoeus/hydra/queueable_spec.rb
|
177
|
-
- spec/typhoeus/hydra/runnable_spec.rb
|
178
|
-
- spec/typhoeus/hydra/stubbable_spec.rb
|
179
|
-
- spec/typhoeus/hydra_spec.rb
|
180
|
-
- spec/typhoeus/pool_spec.rb
|
181
|
-
- spec/typhoeus/request/actions_spec.rb
|
182
|
-
- spec/typhoeus/request/before_spec.rb
|
183
|
-
- spec/typhoeus/request/block_connection_spec.rb
|
184
|
-
- spec/typhoeus/request/cacheable_spec.rb
|
185
|
-
- spec/typhoeus/request/callbacks_spec.rb
|
186
|
-
- spec/typhoeus/request/marshal_spec.rb
|
187
|
-
- spec/typhoeus/request/memoizable_spec.rb
|
188
|
-
- spec/typhoeus/request/operations_spec.rb
|
189
|
-
- spec/typhoeus/request/responseable_spec.rb
|
190
|
-
- spec/typhoeus/request/stubbable_spec.rb
|
191
|
-
- spec/typhoeus/request_spec.rb
|
192
|
-
- spec/typhoeus/response/header_spec.rb
|
193
|
-
- spec/typhoeus/response/informations_spec.rb
|
194
|
-
- spec/typhoeus/response/status_spec.rb
|
195
|
-
- spec/typhoeus/response_spec.rb
|
196
|
-
- spec/typhoeus_spec.rb
|
117
|
+
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
script: "bundle exec rake"
|
3
|
-
rvm:
|
4
|
-
- 1.9.3
|
5
|
-
- 2.0.0
|
6
|
-
- 2.1.10
|
7
|
-
- 2.2.10
|
8
|
-
- 2.3.8
|
9
|
-
- 2.4.7
|
10
|
-
- 2.5.6
|
11
|
-
- 2.6.4
|
12
|
-
- ruby-head
|
13
|
-
- jruby-head
|
14
|
-
- jruby-18mode
|
15
|
-
- jruby-19mode
|
16
|
-
matrix:
|
17
|
-
fast_finish: true
|
18
|
-
allow_failures:
|
19
|
-
- rvm: ruby-head
|
20
|
-
- rvm: jruby-head
|
21
|
-
- rvm: ree
|
22
|
-
include:
|
23
|
-
- rvm: 1.8.7
|
24
|
-
dist: precise
|
25
|
-
- rvm: 1.9.2
|
26
|
-
dist: trusty
|
data/Gemfile
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
gemspec
|
3
|
-
|
4
|
-
if Gem.ruby_version < Gem::Version.new("2.0.0")
|
5
|
-
gem "rake", "< 11"
|
6
|
-
gem "json", "< 2"
|
7
|
-
else
|
8
|
-
gem "json"
|
9
|
-
gem "rake"
|
10
|
-
end
|
11
|
-
|
12
|
-
group :development, :test do
|
13
|
-
gem "rspec", "~> 3.0"
|
14
|
-
|
15
|
-
gem "sinatra", "~> 1.3"
|
16
|
-
|
17
|
-
if Gem.ruby_version >= Gem::Version.new("1.9.0")
|
18
|
-
gem "faraday", ">= 0.9"
|
19
|
-
gem "dalli", "~> 2.0"
|
20
|
-
end
|
21
|
-
|
22
|
-
gem "redis", "~> 3.0"
|
23
|
-
|
24
|
-
if RUBY_PLATFORM == "java"
|
25
|
-
gem "spoon"
|
26
|
-
end
|
27
|
-
|
28
|
-
unless ENV["CI"]
|
29
|
-
gem "guard-rspec", "~> 0.7"
|
30
|
-
gem 'rb-fsevent', '~> 0.9.1'
|
31
|
-
end
|
32
|
-
end
|
data/Guardfile
DELETED
data/Rakefile
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
require "bundler"
|
2
|
-
Bundler.setup
|
3
|
-
|
4
|
-
require "rake"
|
5
|
-
require "rspec/core/rake_task"
|
6
|
-
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
7
|
-
require "typhoeus/version"
|
8
|
-
|
9
|
-
task :gem => :build
|
10
|
-
task :build do
|
11
|
-
system "gem build typhoeus.gemspec"
|
12
|
-
end
|
13
|
-
|
14
|
-
task :install => :build do
|
15
|
-
system "gem install typhoeus-#{Typhoeus::VERSION}.gem"
|
16
|
-
end
|
17
|
-
|
18
|
-
task :release => :build do
|
19
|
-
system "git tag -a v#{Typhoeus::VERSION} -m 'Tagging #{Typhoeus::VERSION}'"
|
20
|
-
system "git push --tags"
|
21
|
-
system "gem push typhoeus-#{Typhoeus::VERSION}.gem"
|
22
|
-
end
|
23
|
-
|
24
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
25
|
-
t.verbose = false
|
26
|
-
t.ruby_opts = "-W -I./spec -rspec_helper"
|
27
|
-
end
|
28
|
-
|
29
|
-
desc "Start up the test servers"
|
30
|
-
task :start do
|
31
|
-
require_relative 'spec/support/boot'
|
32
|
-
begin
|
33
|
-
Boot.start_servers(:rake)
|
34
|
-
rescue Exception
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
task :default => :spec
|
data/perf/profile.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'typhoeus'
|
2
|
-
require 'ruby-prof'
|
3
|
-
|
4
|
-
calls = 50
|
5
|
-
base_url = "http://127.0.0.1:3000/"
|
6
|
-
|
7
|
-
RubyProf.start
|
8
|
-
calls.times do |i|
|
9
|
-
Typhoeus::Request.get(base_url+i.to_s)
|
10
|
-
end
|
11
|
-
result = RubyProf.stop
|
12
|
-
|
13
|
-
printer = RubyProf::FlatPrinter.new(result)
|
14
|
-
printer.print(STDOUT)
|