typhoeus 1.4.1 → 1.6.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/CHANGELOG.md +56 -1
- data/README.md +2 -2
- data/lib/typhoeus/expectation.rb +4 -2
- data/lib/typhoeus/request/responseable.rb +1 -1
- data/lib/typhoeus/version.rb +1 -1
- data/typhoeus.gemspec +14 -4
- metadata +14 -99
- data/.github/workflows/ci.yml +0 -30
- data/.github/workflows/experimental.yml +0 -33
- data/.gitignore +0 -8
- data/.rspec +0 -4
- data/Gemfile +0 -36
- 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 -256
- data/spec/typhoeus/response/header_spec.rb +0 -147
- data/spec/typhoeus/response/informations_spec.rb +0 -323
- 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
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da76288cb44cae7a0b697d2758d41c736ce8cd35b83cc80dcc36b05a46b71601
|
|
4
|
+
data.tar.gz: 00675ad1b7cca1fa8a944c03450d1ff78419df4a734913f9297f00fb890bed41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 931cc5e229d88380754841384cd11aa2e96f851d7ba765420f00e9817d2e05be0b77fbd96d68c21865fd894f34d5708f5c2d306fa0cc9bdbf3c06489103b0b0e
|
|
7
|
+
data.tar.gz: 8b26b43c59ef011e401f6938ba063fceea42288e755f4762a08b5cf44f6d82dbe8f30959ea65a446a73da35127378d2a2e24f6e920fbe067fcaa37f01320cbe5
|
data/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,67 @@
|
|
|
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.6.0...master)
|
|
6
|
+
|
|
7
|
+
## 1.6.0
|
|
8
|
+
|
|
9
|
+
[Full Changelog](http://github.com/typhoeus/typhoeus/compare/v1.5.0...v1.6.0)
|
|
10
|
+
|
|
11
|
+
* Add Ruby 4.0 to CI matrix and update checkout action to v6.
|
|
12
|
+
([Geremia Taglialatela](https://github.com/tagliala), [#744](https://github.com/typhoeus/typhoeus/pull/744))
|
|
13
|
+
* Require Ethon >= 0.18.0, removing the upper bound constraint.
|
|
14
|
+
([Geremia Taglialatela](https://github.com/tagliala), [#742](https://github.com/typhoeus/typhoeus/pull/742))
|
|
15
|
+
* Update RubyDoc link in gemspec metadata.
|
|
16
|
+
([Felipe Mesquita](https://github.com/felipedmesquita), [#737](https://github.com/typhoeus/typhoeus/pull/737))
|
|
17
|
+
* Update gem version badge and remove Code Climate badge.
|
|
18
|
+
([Felipe Mesquita](https://github.com/felipedmesquita), [#736](https://github.com/typhoeus/typhoeus/pull/736))
|
|
19
|
+
|
|
20
|
+
## 1.5.0
|
|
21
|
+
|
|
22
|
+
[Full Changelog](http://github.com/typhoeus/typhoeus/compare/v1.4.1...v1.5.0)
|
|
23
|
+
|
|
24
|
+
* Update gemspec with metadata and remove extra files from the bundled gem.
|
|
25
|
+
([Felipe Mesquita](https://github.com/felipedmesquita), [#734](https://github.com/typhoeus/typhoeus/pull/734))
|
|
26
|
+
* Require Ruby 2.6+ and simplify Gemfile.
|
|
27
|
+
([Felipe Mesquita](https://github.com/felipedmesquita), [#733](https://github.com/typhoeus/typhoeus/pull/733))
|
|
28
|
+
* Add support for URI objects in `Typhoeus.stub()`.
|
|
29
|
+
([Katelyn Schiesser](https://github.com/slowbro), [#732](https://github.com/typhoeus/typhoeus/pull/732))
|
|
30
|
+
* Add explicit require for logger and ostruct gems for Ruby 3.5+ compatibility.
|
|
31
|
+
([Felipe Mesquita](https://github.com/felipedmesquita), [#729](https://github.com/typhoeus/typhoeus/pull/729))
|
|
32
|
+
* Add Ruby 3.4 to CI matrix.
|
|
33
|
+
([y-yagi](https://github.com/y-yagi), [#728](https://github.com/typhoeus/typhoeus/pull/728))
|
|
34
|
+
* Support curl 8.9 error message changes in tests.
|
|
35
|
+
([Mamoru TASAKA](https://github.com/mtasaka), [#724](https://github.com/typhoeus/typhoeus/pull/724))
|
|
36
|
+
* Add Ruby 3.2 and 3.3 to CI, drop Ruby 2.5, lock ethon < 0.16.0.
|
|
37
|
+
([y-yagi](https://github.com/y-yagi), [#716](https://github.com/typhoeus/typhoeus/pull/716))
|
|
38
|
+
* Fix typo in comment: "reponse" → "response".
|
|
39
|
+
([George Brocklehurst](https://github.com/georgebrock), [#700](https://github.com/typhoeus/typhoeus/pull/700))
|
|
6
40
|
|
|
7
41
|
## 1.4.1
|
|
8
42
|
|
|
9
43
|
[Full Changelog](http://github.com/typhoeus/typhoeus/compare/v1.4.0...v1.4.1)
|
|
10
44
|
|
|
45
|
+
* Fix to run CI with Ruby 3.0.
|
|
46
|
+
([mishina](https://github.com/mishina2228), [#699](https://github.com/typhoeus/typhoeus/pull/699))
|
|
47
|
+
* Replace CI status badge from Travis to GH Actions.
|
|
48
|
+
([mishina](https://github.com/mishina2228), [#698](https://github.com/typhoeus/typhoeus/pull/698))
|
|
49
|
+
* Added getter for `redirect_url` attribute.
|
|
50
|
+
([Adrien Rey-Jarthon](https://github.com/jarthod), [#697](https://github.com/typhoeus/typhoeus/pull/697))
|
|
51
|
+
* CI: Adjust ruby versions and MacOS runs.
|
|
52
|
+
([Holger Arndt](https://github.com/Kjarrigan), [#696](https://github.com/typhoeus/typhoeus/pull/696))
|
|
53
|
+
* Allow performing `curl --upload-file`.
|
|
54
|
+
([Arian Faurtosh](https://github.com/arianf), [#695](https://github.com/typhoeus/typhoeus/pull/695))
|
|
55
|
+
* Add getter for size_upload, size_download, speed_upload, speed_download values.
|
|
56
|
+
([Ryo Nakano](https://github.com/ryonkn), [#692](https://github.com/typhoeus/typhoeus/pull/692))
|
|
57
|
+
* Use bundle add instead.
|
|
58
|
+
([Glauco Custodio](https://github.com/glaucocustodio), [#691](https://github.com/typhoeus/typhoeus/pull/691))
|
|
59
|
+
* Travis -> Github actions.
|
|
60
|
+
([John Mortlock](https://github.com/jmortlock), [#689](https://github.com/typhoeus/typhoeus/pull/689))
|
|
61
|
+
* Add global timeout and connecttimeout to config.
|
|
62
|
+
([Teck Wan Wong](https://github.com/teckwan), [#685](https://github.com/typhoeus/typhoeus/pull/685))
|
|
63
|
+
* Update README.md.
|
|
64
|
+
([Hussain Akram](https://github.com/hussainakram), [#677](https://github.com/typhoeus/typhoeus/pull/677))
|
|
65
|
+
|
|
11
66
|
## 1.4.0
|
|
12
67
|
|
|
13
68
|
[Full Changelog](http://github.com/typhoeus/typhoeus/compare/v1.1.2...v1.4.0)
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Typhoeus [](https://badge.fury.io/rb/typhoeus) [](https://github.com/typhoeus/typhoeus/actions/workflows/ci.yml) [](https://github.com/typhoeus/typhoeus/actions/workflows/experimental.yml)
|
|
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
|
|
|
@@ -32,7 +32,7 @@ gem install typhoeus
|
|
|
32
32
|
|
|
33
33
|
## Project Tracking
|
|
34
34
|
|
|
35
|
-
* [API Documentation](https://rubydoc.info/github/typhoeus/typhoeus
|
|
35
|
+
* [API Documentation](https://rubydoc.info/github/typhoeus/typhoeus) (GitHub master)
|
|
36
36
|
|
|
37
37
|
## Usage
|
|
38
38
|
|
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/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.
|
|
27
|
+
s.add_dependency('ethon', [">= 0.18.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.6.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
|
|
@@ -18,14 +17,14 @@ dependencies:
|
|
|
18
17
|
requirements:
|
|
19
18
|
- - ">="
|
|
20
19
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 0.
|
|
20
|
+
version: 0.18.0
|
|
22
21
|
type: :runtime
|
|
23
22
|
prerelease: false
|
|
24
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
24
|
requirements:
|
|
26
25
|
- - ">="
|
|
27
26
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: 0.
|
|
27
|
+
version: 0.18.0
|
|
29
28
|
description: Like a modern code version of the mythical beast with 100 serpent heads,
|
|
30
29
|
Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling logic.
|
|
31
30
|
email:
|
|
@@ -34,17 +33,10 @@ executables: []
|
|
|
34
33
|
extensions: []
|
|
35
34
|
extra_rdoc_files: []
|
|
36
35
|
files:
|
|
37
|
-
- ".github/workflows/ci.yml"
|
|
38
|
-
- ".github/workflows/experimental.yml"
|
|
39
|
-
- ".gitignore"
|
|
40
|
-
- ".rspec"
|
|
41
36
|
- CHANGELOG.md
|
|
42
37
|
- CONTRIBUTING.md
|
|
43
|
-
- Gemfile
|
|
44
|
-
- Guardfile
|
|
45
38
|
- LICENSE
|
|
46
39
|
- README.md
|
|
47
|
-
- Rakefile
|
|
48
40
|
- UPGRADE.md
|
|
49
41
|
- lib/rack/typhoeus.rb
|
|
50
42
|
- lib/rack/typhoeus/middleware/params_decoder.rb
|
|
@@ -89,53 +81,16 @@ files:
|
|
|
89
81
|
- lib/typhoeus/response/informations.rb
|
|
90
82
|
- lib/typhoeus/response/status.rb
|
|
91
83
|
- lib/typhoeus/version.rb
|
|
92
|
-
- perf/profile.rb
|
|
93
|
-
- perf/vs_nethttp.rb
|
|
94
|
-
- spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb
|
|
95
|
-
- spec/rack/typhoeus/middleware/params_decoder_spec.rb
|
|
96
|
-
- spec/spec_helper.rb
|
|
97
|
-
- spec/support/localhost_server.rb
|
|
98
|
-
- spec/support/memory_cache.rb
|
|
99
|
-
- spec/support/server.rb
|
|
100
|
-
- spec/typhoeus/adapters/faraday_spec.rb
|
|
101
|
-
- spec/typhoeus/cache/dalli_spec.rb
|
|
102
|
-
- spec/typhoeus/cache/redis_spec.rb
|
|
103
|
-
- spec/typhoeus/config_spec.rb
|
|
104
|
-
- spec/typhoeus/easy_factory_spec.rb
|
|
105
|
-
- spec/typhoeus/errors/no_stub_spec.rb
|
|
106
|
-
- spec/typhoeus/expectation_spec.rb
|
|
107
|
-
- spec/typhoeus/hydra/addable_spec.rb
|
|
108
|
-
- spec/typhoeus/hydra/before_spec.rb
|
|
109
|
-
- spec/typhoeus/hydra/block_connection_spec.rb
|
|
110
|
-
- spec/typhoeus/hydra/cacheable_spec.rb
|
|
111
|
-
- spec/typhoeus/hydra/memoizable_spec.rb
|
|
112
|
-
- spec/typhoeus/hydra/queueable_spec.rb
|
|
113
|
-
- spec/typhoeus/hydra/runnable_spec.rb
|
|
114
|
-
- spec/typhoeus/hydra/stubbable_spec.rb
|
|
115
|
-
- spec/typhoeus/hydra_spec.rb
|
|
116
|
-
- spec/typhoeus/pool_spec.rb
|
|
117
|
-
- spec/typhoeus/request/actions_spec.rb
|
|
118
|
-
- spec/typhoeus/request/before_spec.rb
|
|
119
|
-
- spec/typhoeus/request/block_connection_spec.rb
|
|
120
|
-
- spec/typhoeus/request/cacheable_spec.rb
|
|
121
|
-
- spec/typhoeus/request/callbacks_spec.rb
|
|
122
|
-
- spec/typhoeus/request/marshal_spec.rb
|
|
123
|
-
- spec/typhoeus/request/memoizable_spec.rb
|
|
124
|
-
- spec/typhoeus/request/operations_spec.rb
|
|
125
|
-
- spec/typhoeus/request/responseable_spec.rb
|
|
126
|
-
- spec/typhoeus/request/stubbable_spec.rb
|
|
127
|
-
- spec/typhoeus/request_spec.rb
|
|
128
|
-
- spec/typhoeus/response/header_spec.rb
|
|
129
|
-
- spec/typhoeus/response/informations_spec.rb
|
|
130
|
-
- spec/typhoeus/response/status_spec.rb
|
|
131
|
-
- spec/typhoeus/response_spec.rb
|
|
132
|
-
- spec/typhoeus_spec.rb
|
|
133
84
|
- typhoeus.gemspec
|
|
134
85
|
homepage: https://github.com/typhoeus/typhoeus
|
|
135
86
|
licenses:
|
|
136
87
|
- MIT
|
|
137
|
-
metadata:
|
|
138
|
-
|
|
88
|
+
metadata:
|
|
89
|
+
bug_tracker_uri: https://github.com/typhoeus/typhoeus/issues
|
|
90
|
+
changelog_uri: https://github.com/typhoeus/typhoeus/blob/v1.6.0/CHANGELOG.md
|
|
91
|
+
documentation_uri: https://www.rubydoc.info/gems/typhoeus/1.6.0
|
|
92
|
+
rubygems_mfa_required: 'true'
|
|
93
|
+
source_code_uri: https://github.com/typhoeus/typhoeus/tree/v1.6.0
|
|
139
94
|
rdoc_options: []
|
|
140
95
|
require_paths:
|
|
141
96
|
- lib
|
|
@@ -143,54 +98,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
143
98
|
requirements:
|
|
144
99
|
- - ">="
|
|
145
100
|
- !ruby/object:Gem::Version
|
|
146
|
-
version: '
|
|
101
|
+
version: '2.6'
|
|
147
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
103
|
requirements:
|
|
149
104
|
- - ">="
|
|
150
105
|
- !ruby/object:Gem::Version
|
|
151
|
-
version:
|
|
106
|
+
version: '0'
|
|
152
107
|
requirements: []
|
|
153
|
-
rubygems_version:
|
|
154
|
-
signing_key:
|
|
108
|
+
rubygems_version: 4.0.3
|
|
155
109
|
specification_version: 4
|
|
156
110
|
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
|
|
111
|
+
test_files: []
|
data/.github/workflows/ci.yml
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
on: [push, pull_request]
|
|
3
|
-
jobs:
|
|
4
|
-
build:
|
|
5
|
-
env:
|
|
6
|
-
BUNDLE_GEMFILE: Gemfile
|
|
7
|
-
runs-on: ${{ matrix.os }}-latest
|
|
8
|
-
strategy:
|
|
9
|
-
fail-fast: false
|
|
10
|
-
matrix:
|
|
11
|
-
os: [ubuntu, macos]
|
|
12
|
-
ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', truffleruby]
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v3
|
|
15
|
-
- name: Install libcurl header
|
|
16
|
-
run: |
|
|
17
|
-
if ${{ matrix.os == 'macos' }}
|
|
18
|
-
then
|
|
19
|
-
brew install curl
|
|
20
|
-
else
|
|
21
|
-
sudo apt update && sudo apt install -y --no-install-recommends libcurl4-openssl-dev
|
|
22
|
-
fi
|
|
23
|
-
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
24
|
-
uses: ruby/setup-ruby@v1
|
|
25
|
-
with:
|
|
26
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
27
|
-
bundler-cache: true
|
|
28
|
-
- name: Run tests
|
|
29
|
-
run: |
|
|
30
|
-
bundle exec rake
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
name: Experimental
|
|
2
|
-
on: [push, pull_request]
|
|
3
|
-
jobs:
|
|
4
|
-
build:
|
|
5
|
-
env:
|
|
6
|
-
BUNDLE_GEMFILE: Gemfile
|
|
7
|
-
runs-on: ${{ matrix.os }}-latest
|
|
8
|
-
strategy:
|
|
9
|
-
fail-fast: false
|
|
10
|
-
matrix:
|
|
11
|
-
os: [ubuntu, macos]
|
|
12
|
-
ruby-version:
|
|
13
|
-
- ruby-head
|
|
14
|
-
- jruby-head
|
|
15
|
-
- truffleruby-head
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v3
|
|
18
|
-
- name: Install libcurl header
|
|
19
|
-
run: |
|
|
20
|
-
if ${{ matrix.os == 'macos' }}
|
|
21
|
-
then
|
|
22
|
-
brew install curl
|
|
23
|
-
else
|
|
24
|
-
sudo apt update && sudo apt install -y --no-install-recommends libcurl4-openssl-dev
|
|
25
|
-
fi
|
|
26
|
-
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
27
|
-
uses: ruby/setup-ruby@v1
|
|
28
|
-
with:
|
|
29
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
30
|
-
bundler-cache: true
|
|
31
|
-
- name: Run tests
|
|
32
|
-
run: |
|
|
33
|
-
bundle exec rake
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/Gemfile
DELETED
|
@@ -1,36 +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", "< 2.0"
|
|
19
|
-
gem "dalli", "~> 2.0"
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
if Gem.ruby_version >= Gem::Version.new("3.0.0")
|
|
23
|
-
gem 'webrick'
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
gem "redis", "~> 3.0"
|
|
27
|
-
|
|
28
|
-
if RUBY_PLATFORM == "java"
|
|
29
|
-
gem "spoon"
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
unless ENV["CI"]
|
|
33
|
-
gem "guard-rspec", "~> 0.7"
|
|
34
|
-
gem 'rb-fsevent', '~> 0.9.1'
|
|
35
|
-
end
|
|
36
|
-
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)
|
data/perf/vs_nethttp.rb
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
require 'typhoeus'
|
|
2
|
-
require 'net/http'
|
|
3
|
-
require 'open-uri'
|
|
4
|
-
require 'benchmark'
|
|
5
|
-
|
|
6
|
-
URL = "http://localhost:300"
|
|
7
|
-
hydra = Typhoeus::Hydra.new(max_concurrency: 3)
|
|
8
|
-
|
|
9
|
-
if defined? require_relative
|
|
10
|
-
require_relative '../spec/support/localhost_server.rb'
|
|
11
|
-
require_relative '../spec/support/server.rb'
|
|
12
|
-
else
|
|
13
|
-
require '../spec/support/localhost_server.rb'
|
|
14
|
-
require '../spec/support/server.rb'
|
|
15
|
-
end
|
|
16
|
-
LocalhostServer.new(TESTSERVER.new, 3000)
|
|
17
|
-
LocalhostServer.new(TESTSERVER.new, 3001)
|
|
18
|
-
LocalhostServer.new(TESTSERVER.new, 3002)
|
|
19
|
-
|
|
20
|
-
def url_for(i)
|
|
21
|
-
"#{URL}#{i%3}/"
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
Benchmark.bm do |bm|
|
|
25
|
-
|
|
26
|
-
[1000].each do |calls|
|
|
27
|
-
puts "[ #{calls} requests ]"
|
|
28
|
-
|
|
29
|
-
bm.report("net/http ") do
|
|
30
|
-
calls.times do |i|
|
|
31
|
-
uri = URI.parse(url_for(i))
|
|
32
|
-
Net::HTTP.get_response(uri)
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
bm.report("open ") do
|
|
37
|
-
calls.times do |i|
|
|
38
|
-
open(url_for(i))
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
bm.report("request ") do
|
|
43
|
-
calls.times do |i|
|
|
44
|
-
Typhoeus::Request.get(url_for(i))
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
bm.report("hydra ") do
|
|
49
|
-
calls.times do |i|
|
|
50
|
-
hydra.queue(Typhoeus::Request.new(url_for(i)))
|
|
51
|
-
end
|
|
52
|
-
hydra.run
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
bm.report("hydra memoize ") do
|
|
56
|
-
Typhoeus::Config.memoize = true
|
|
57
|
-
calls.times do |i|
|
|
58
|
-
hydra.queue(Typhoeus::Request.new(url_for(i)))
|
|
59
|
-
end
|
|
60
|
-
hydra.run
|
|
61
|
-
Typhoeus::Config.memoize = false
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
end
|