webmock 3.0.0 → 3.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 +5 -5
- data/.github/workflows/CI.yml +37 -0
- data/CHANGELOG.md +416 -0
- data/Gemfile +1 -1
- data/README.md +157 -31
- data/Rakefile +12 -4
- data/lib/webmock/api.rb +12 -0
- data/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +216 -0
- data/lib/webmock/http_lib_adapters/curb_adapter.rb +17 -3
- data/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +7 -4
- data/lib/webmock/http_lib_adapters/excon_adapter.rb +5 -2
- data/lib/webmock/http_lib_adapters/http_rb/client.rb +4 -1
- data/lib/webmock/http_lib_adapters/http_rb/request.rb +7 -1
- data/lib/webmock/http_lib_adapters/http_rb/response.rb +24 -3
- data/lib/webmock/http_lib_adapters/http_rb/streamer.rb +6 -2
- data/lib/webmock/http_lib_adapters/http_rb/webmock.rb +2 -2
- data/lib/webmock/http_lib_adapters/httpclient_adapter.rb +28 -9
- data/lib/webmock/http_lib_adapters/manticore_adapter.rb +33 -15
- data/lib/webmock/http_lib_adapters/net_http.rb +54 -14
- data/lib/webmock/http_lib_adapters/net_http_response.rb +1 -1
- data/lib/webmock/http_lib_adapters/patron_adapter.rb +4 -4
- data/lib/webmock/matchers/any_arg_matcher.rb +13 -0
- data/lib/webmock/matchers/hash_argument_matcher.rb +21 -0
- data/lib/webmock/matchers/hash_excluding_matcher.rb +15 -0
- data/lib/webmock/matchers/hash_including_matcher.rb +4 -23
- data/lib/webmock/rack_response.rb +1 -1
- data/lib/webmock/request_body_diff.rb +1 -1
- data/lib/webmock/request_execution_verifier.rb +2 -3
- data/lib/webmock/request_pattern.rb +108 -46
- data/lib/webmock/request_registry.rb +1 -1
- data/lib/webmock/request_signature.rb +1 -1
- data/lib/webmock/request_signature_snippet.rb +4 -4
- data/lib/webmock/response.rb +11 -5
- data/lib/webmock/rspec.rb +10 -3
- data/lib/webmock/stub_registry.rb +26 -11
- data/lib/webmock/stub_request_snippet.rb +10 -6
- data/lib/webmock/test_unit.rb +1 -3
- data/lib/webmock/util/hash_counter.rb +4 -4
- data/lib/webmock/util/headers.rb +17 -2
- data/lib/webmock/util/json.rb +1 -2
- data/lib/webmock/util/query_mapper.rb +9 -7
- data/lib/webmock/util/uri.rb +10 -10
- data/lib/webmock/util/values_stringifier.rb +20 -0
- data/lib/webmock/version.rb +1 -1
- data/lib/webmock/webmock.rb +10 -3
- data/lib/webmock.rb +53 -48
- data/minitest/webmock_spec.rb +2 -2
- data/spec/acceptance/async_http_client/async_http_client_spec.rb +375 -0
- data/spec/acceptance/async_http_client/async_http_client_spec_helper.rb +73 -0
- data/spec/acceptance/curb/curb_spec.rb +33 -0
- data/spec/acceptance/em_http_request/em_http_request_spec.rb +56 -0
- data/spec/acceptance/em_http_request/em_http_request_spec_helper.rb +1 -1
- data/spec/acceptance/excon/excon_spec.rb +4 -2
- data/spec/acceptance/excon/excon_spec_helper.rb +2 -0
- data/spec/acceptance/http_rb/http_rb_spec.rb +20 -0
- data/spec/acceptance/http_rb/http_rb_spec_helper.rb +5 -2
- data/spec/acceptance/httpclient/httpclient_spec.rb +8 -1
- data/spec/acceptance/manticore/manticore_spec.rb +51 -0
- data/spec/acceptance/net_http/net_http_shared.rb +1 -1
- data/spec/acceptance/net_http/net_http_spec.rb +53 -1
- data/spec/acceptance/patron/patron_spec.rb +7 -0
- data/spec/acceptance/patron/patron_spec_helper.rb +3 -3
- data/spec/acceptance/shared/callbacks.rb +3 -2
- data/spec/acceptance/shared/request_expectations.rb +14 -0
- data/spec/acceptance/shared/returning_declared_responses.rb +36 -15
- data/spec/acceptance/shared/stubbing_requests.rb +95 -0
- data/spec/acceptance/typhoeus/typhoeus_hydra_spec.rb +1 -1
- data/spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb +1 -1
- data/spec/support/webmock_server.rb +1 -0
- data/spec/unit/api_spec.rb +103 -3
- data/spec/unit/matchers/hash_excluding_matcher_spec.rb +61 -0
- data/spec/unit/request_execution_verifier_spec.rb +12 -12
- data/spec/unit/request_pattern_spec.rb +195 -49
- data/spec/unit/request_signature_snippet_spec.rb +2 -2
- data/spec/unit/response_spec.rb +22 -18
- data/spec/unit/stub_request_snippet_spec.rb +30 -10
- data/spec/unit/util/query_mapper_spec.rb +13 -0
- data/spec/unit/util/uri_spec.rb +74 -2
- data/spec/unit/webmock_spec.rb +54 -5
- data/test/shared_test.rb +15 -2
- data/test/test_webmock.rb +6 -0
- data/webmock.gemspec +11 -3
- metadata +66 -17
- data/.travis.yml +0 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: a8f150fbeccca419468dfebe632e3b5d365cb8c2df9a5e2a31e65591298786fb
|
|
4
|
+
data.tar.gz: d92950bc5ae3510e599c40545f3e7a0ebaafa54a698f79a3c82243e240d35948
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f58d569f7c633d758cee725e5dafb39edacb74e0017ba9c29de0cad8fe16d1f7740cc30847a9f129f6571232d2ca8172d7fb76a1eb3383e31ee8371472f141f9
|
|
7
|
+
data.tar.gz: 52191c4e12ac3bf79b575f36d58823ea37ab17f83c7a62602889f361eafadabfa4b0b8ffc1f466eee6de53ea77578fc0149a60e14abdd8a7459b651afbeb85d0
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
ruby:
|
|
16
|
+
- head
|
|
17
|
+
- '3.0'
|
|
18
|
+
- '2.7'
|
|
19
|
+
- '2.6'
|
|
20
|
+
- '2.5'
|
|
21
|
+
- jruby
|
|
22
|
+
continue-on-error: ${{ matrix.ruby == 'head' }}
|
|
23
|
+
name: Ruby ${{ matrix.ruby }}
|
|
24
|
+
env:
|
|
25
|
+
JRUBY_OPTS: "--debug"
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v2
|
|
28
|
+
- name: Install Apt Packages
|
|
29
|
+
run: |
|
|
30
|
+
sudo apt-get install libcurl4-openssl-dev -y
|
|
31
|
+
- uses: ruby/setup-ruby@v1
|
|
32
|
+
continue-on-error: true
|
|
33
|
+
with:
|
|
34
|
+
ruby-version: ${{ matrix.ruby }}
|
|
35
|
+
bundler-cache: true
|
|
36
|
+
- run: |
|
|
37
|
+
bundle exec rake
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,421 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# 3.14.0
|
|
4
|
+
|
|
5
|
+
* Bump Addressable from 2.3.6 to 2.8.0
|
|
6
|
+
|
|
7
|
+
Thanks to [Eduardo Hernandez](https://github.com/EduardoGHdez)
|
|
8
|
+
|
|
9
|
+
# 3.13.0
|
|
10
|
+
|
|
11
|
+
* Support http.rb 5.x
|
|
12
|
+
|
|
13
|
+
Thanks to [Will Storey](https://github.com/horgh)
|
|
14
|
+
|
|
15
|
+
# 3.12.2
|
|
16
|
+
|
|
17
|
+
* Fixed em-http-request adapter to avoid calling middleware twice.
|
|
18
|
+
|
|
19
|
+
Thanks to [Alex Vondrak](https://github.com/ajvondrak)
|
|
20
|
+
|
|
21
|
+
# 3.12.1
|
|
22
|
+
|
|
23
|
+
* Fixed handling of URIs with IPv6 addresses with square brackets when in Net::HTTP adapter.
|
|
24
|
+
|
|
25
|
+
Thanks to [Johanna Hartmann](https://github.com/JohannaHartmann)
|
|
26
|
+
|
|
27
|
+
# 3.12.0
|
|
28
|
+
|
|
29
|
+
* Added support for handling custom JSON and XML content types e.g. 'application/vnd.api+json'
|
|
30
|
+
|
|
31
|
+
# 3.11.3
|
|
32
|
+
|
|
33
|
+
* Fixed async-http adapter to only considered requests as real if they are real.
|
|
34
|
+
|
|
35
|
+
Thanks to Thanks to [Tony Schneider](https://github.com/tonywok) and [Samuel Williams](https://github.com/ioquatix)
|
|
36
|
+
|
|
37
|
+
# 3.11.2
|
|
38
|
+
|
|
39
|
+
* Fix for Manticore streaming mode
|
|
40
|
+
|
|
41
|
+
Thanks to [Oleksiy Kovyrin](https://github.com/kovyrin)
|
|
42
|
+
|
|
43
|
+
# 3.11.1
|
|
44
|
+
|
|
45
|
+
* Compatibility with async-http 0.54+
|
|
46
|
+
|
|
47
|
+
Thanks to [Jun Jiang](https://github.com/jasl)
|
|
48
|
+
|
|
49
|
+
# 3.11.0
|
|
50
|
+
|
|
51
|
+
* Added support for `features` in http.rb adapter.
|
|
52
|
+
|
|
53
|
+
Thanks to [Carl (ce07c3)](https://github.com/ce07c3)
|
|
54
|
+
|
|
55
|
+
# 3.10.0
|
|
56
|
+
|
|
57
|
+
* Added option to global stubs to have lower priority than local stubs.
|
|
58
|
+
|
|
59
|
+
WebMock.globally_stub_request(:after_local_stubs) do
|
|
60
|
+
{ body: "global stub body" }
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
stub_request(:get, "www.example.com").to_return(body: 'non-global stub body')
|
|
64
|
+
|
|
65
|
+
expect(http_request(:get, "http://www.example.com/").body).to eq("non-global stub body")
|
|
66
|
+
|
|
67
|
+
Thanks to [Marek Kasztelnik](https://github.com/mkasztelnik)
|
|
68
|
+
|
|
69
|
+
# 3.9.5
|
|
70
|
+
|
|
71
|
+
* Prevent overwriting `teardown` method in Test::Unit
|
|
72
|
+
|
|
73
|
+
Thanks to [Jesse Bowes](https://github.com/jessebs)
|
|
74
|
+
|
|
75
|
+
# 3.9.4
|
|
76
|
+
|
|
77
|
+
* More intuitive error message when stubbed response body was provided as Hash
|
|
78
|
+
|
|
79
|
+
Thanks to [Ben Koshy](https://github.com/BKSpurgeon)
|
|
80
|
+
|
|
81
|
+
# 3.9.3
|
|
82
|
+
|
|
83
|
+
* Make httpclient_adapter thread-safe
|
|
84
|
+
|
|
85
|
+
Thanks to [Adam Harwood](https://github.com/adam-harwood)
|
|
86
|
+
|
|
87
|
+
# 3.9.2
|
|
88
|
+
|
|
89
|
+
* Made global stubs thread-safe
|
|
90
|
+
|
|
91
|
+
Thanks to [Adam Harwood](https://github.com/adam-harwood)
|
|
92
|
+
|
|
93
|
+
# 3.9.1
|
|
94
|
+
|
|
95
|
+
* Fixed support for passing `URI` objects as second argument of `stub_request`
|
|
96
|
+
|
|
97
|
+
Thanks to [Ryan Kerr](https://github.com/leboshi)
|
|
98
|
+
|
|
99
|
+
## 3.9.0
|
|
100
|
+
|
|
101
|
+
* Allow using a "callable" (like a proc) as URI pattern
|
|
102
|
+
|
|
103
|
+
stub_request(:any, ->(uri) { true })
|
|
104
|
+
|
|
105
|
+
Thanks to [John Hawthorn](https://github.com/jhawthorn)
|
|
106
|
+
|
|
107
|
+
* Added stubbed IO on stubbed socket in Net::HTTP adapter.
|
|
108
|
+
|
|
109
|
+
Thanks to [Thilo Rusche](https://github.com/trusche)
|
|
110
|
+
|
|
111
|
+
* When 'webmock/rspec' is required, reset WebMock after all after(:each/example) hooks
|
|
112
|
+
|
|
113
|
+
Thanks to [Andrew Stuntz](https://github.com/drews256)
|
|
114
|
+
|
|
115
|
+
* Fixed `net_connect_allowed?` when invoked with no arguments, when there were any allowed URIs passed to `disable_net_connect?`.
|
|
116
|
+
|
|
117
|
+
Thanks to [Lucas Uyezu](https://github.com/lucasuyezu)
|
|
118
|
+
|
|
119
|
+
* Fixed async-http adapter which caused Async::HTTP::Client or Async::HTTP::Internet to hang and never return a response.
|
|
120
|
+
|
|
121
|
+
Thanks to [Bruno Sutic](https://github.com/bruno-) and [Samuel Williams](https://github.com/ioquatix)
|
|
122
|
+
|
|
123
|
+
* Fixed warning when using async-http adapter
|
|
124
|
+
|
|
125
|
+
Thanks to [Bruno Sutic](https://github.com/bruno-)
|
|
126
|
+
|
|
127
|
+
* Dropped support for Ruby 2.3 - EOL date: 2019-03-31
|
|
128
|
+
|
|
129
|
+
* Dropped support for Ruby 2.4 - EOL date: 2020-03-31
|
|
130
|
+
|
|
131
|
+
* Handling matching of Addressable::Template patterns that have an ip address without port and patterns that have ip address and don’t have schema and path.
|
|
132
|
+
|
|
133
|
+
Thanks to [Rafael França](https://github.com/rafaelfranca) and [guppy0356](https://github.com/guppy0356)
|
|
134
|
+
|
|
135
|
+
## 3.8.3
|
|
136
|
+
|
|
137
|
+
* Fixed problem introduced in version 3.4.2, which caused matching against Addressable::Template representing host part of the URI to raise an error.
|
|
138
|
+
|
|
139
|
+
Thanks to [Vesa Laakso](https://github.com/valscion)
|
|
140
|
+
|
|
141
|
+
## 3.8.2
|
|
142
|
+
|
|
143
|
+
* Support correct encoding parameter for HTTP.rb 2.x and earlier
|
|
144
|
+
|
|
145
|
+
Thanks to [Alex Coomans](https://github.com/drcapulet)
|
|
146
|
+
|
|
147
|
+
## 3.8.1
|
|
148
|
+
|
|
149
|
+
* Added support for mocking non-ASCII bodies when making requests with HTTP.rb
|
|
150
|
+
|
|
151
|
+
Thanks to [Patrik Ragnarsson](https://github.com/dentarg)
|
|
152
|
+
|
|
153
|
+
## 3.8.0
|
|
154
|
+
|
|
155
|
+
* Fixed options handling when initialising Async::HTTP::Client
|
|
156
|
+
|
|
157
|
+
Thanks to [Samuel Williams](https://github.com/ioquatix)
|
|
158
|
+
|
|
159
|
+
* Ruby 2.7 support.
|
|
160
|
+
|
|
161
|
+
Thanks to [Ryan Davis](https://github.com/zenspider) and [Brandur](https://github.com/brandur)
|
|
162
|
+
|
|
163
|
+
## 3.7.6
|
|
164
|
+
|
|
165
|
+
* Suppressed keyword argument warnings in Ruby 2.7 in async-http adapter.
|
|
166
|
+
|
|
167
|
+
Thanks to [Koichi ITO](https://github.com/koic)
|
|
168
|
+
|
|
169
|
+
## 3.7.5
|
|
170
|
+
|
|
171
|
+
* Suppress Excon warning generated by extra key
|
|
172
|
+
|
|
173
|
+
Thanks to [Marco Costa](https://github.com/marcotc)
|
|
174
|
+
|
|
175
|
+
## 3.7.4
|
|
176
|
+
|
|
177
|
+
* Resetting memoized response fields in Curb adapter.
|
|
178
|
+
|
|
179
|
+
Thanks to [Andrei Sidorov](https://github.com/heretge)
|
|
180
|
+
|
|
181
|
+
## 3.7.3
|
|
182
|
+
|
|
183
|
+
* Fix for http.rb. Allow passing an output buffer to HTTP::Response::Body#readpartial
|
|
184
|
+
|
|
185
|
+
Thanks to [George Claghorn](https://github.com/georgeclaghorn)
|
|
186
|
+
|
|
187
|
+
* Fixed Manticore adapter to invoke Manticore failure handler on stubbed timeout
|
|
188
|
+
|
|
189
|
+
Thanks to [Alex Junger](https://github.com/alexJunger)
|
|
190
|
+
|
|
191
|
+
* Added project metadata to the gemspec
|
|
192
|
+
|
|
193
|
+
Thanks to [Orien Madgwick](https://github.com/orien)
|
|
194
|
+
|
|
195
|
+
## 3.7.2
|
|
196
|
+
|
|
197
|
+
* Fixed handling of non UTF-8 encoded urls
|
|
198
|
+
|
|
199
|
+
Thanks to [Rafael França](https://github.com/rafaelfranca)
|
|
200
|
+
|
|
201
|
+
* Fixed "shadowing outer local variable" warning
|
|
202
|
+
|
|
203
|
+
Thanks to [y-yagi](https://github.com/y-yagi)
|
|
204
|
+
|
|
205
|
+
## 3.7.1
|
|
206
|
+
|
|
207
|
+
* Fixed Async::HTTP::Client adapter code to not cause Ruby warning
|
|
208
|
+
|
|
209
|
+
Thanks to [y-yagi](https://github.com/y-yagi)
|
|
210
|
+
|
|
211
|
+
## 3.7.0
|
|
212
|
+
|
|
213
|
+
* Support for Async::HTTP::Client
|
|
214
|
+
|
|
215
|
+
Thanks to [Andriy Yanko](https://github.com/ayanko)
|
|
216
|
+
|
|
217
|
+
## 3.6.2
|
|
218
|
+
|
|
219
|
+
* Fixed Patron adapter to handle HTTP/2 status line.
|
|
220
|
+
|
|
221
|
+
Thanks to [Fábio D. Batista](https://github.com/fabiob)
|
|
222
|
+
|
|
223
|
+
## 3.6.1
|
|
224
|
+
|
|
225
|
+
* Fixed issue with matching Addressable::Template without a period in the domain
|
|
226
|
+
|
|
227
|
+
Thanks to [Eike Send](https://github.com/eikes)
|
|
228
|
+
|
|
229
|
+
* Support for `write_timeout` in Net::HTTP
|
|
230
|
+
|
|
231
|
+
Thanks to [Claudio Poli](https://github.com/masterkain)
|
|
232
|
+
|
|
233
|
+
* Fixed issue with handling urls with ":80" or ":443" in the path.
|
|
234
|
+
|
|
235
|
+
Thanks to [Csaba Apagyi](https://github.com/thisismydesign) for reporting and to [Frederick Cheung](https://github.com/fcheung) for fixing the issue.
|
|
236
|
+
|
|
237
|
+
## 3.6.0
|
|
238
|
+
|
|
239
|
+
* Compatibility with the latest version of hashdiff gem, with constant changed from HashDiff to Hashdiff
|
|
240
|
+
|
|
241
|
+
Thanks to [Jeff Felchner](https://github.com/jfelchner)
|
|
242
|
+
|
|
243
|
+
* Added a hint to the error message raised when `with` method is called without args or a block.
|
|
244
|
+
|
|
245
|
+
Thanks to [Adam Sokolnicki](https://github.com/asok)
|
|
246
|
+
|
|
247
|
+
* Resetting configured HTTP method in Curb adapter after each request
|
|
248
|
+
|
|
249
|
+
Thanks to [tiendo1011](https://github.com/tiendo1011)
|
|
250
|
+
|
|
251
|
+
* Added `WebMock.enable_net_connect!` as an alias for `WebMock.allow_net_connect!`
|
|
252
|
+
and `WebMock.disallow_net_connect!` as an alias for `WebMock.disable_net_connect!`
|
|
253
|
+
|
|
254
|
+
Thanks to [SoonKhen OwYong](https://github.com/owyongsk)
|
|
255
|
+
|
|
256
|
+
* Fixed handling of empty arrays as query params when using Faraday
|
|
257
|
+
|
|
258
|
+
Thanks to [Ryan Moret](https://github.com/rcmoret)
|
|
259
|
+
|
|
260
|
+
## 3.5.1
|
|
261
|
+
|
|
262
|
+
* Disabling TracePoint defined in Net::BufferedIO in case of exception being raised.
|
|
263
|
+
|
|
264
|
+
Thanks to [Koichi Sasada](https://github.com/ko1)
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
## 3.5.0
|
|
268
|
+
|
|
269
|
+
* Ruby 2.6.0 support
|
|
270
|
+
|
|
271
|
+
Thanks to [Arkadiy Tetelman](https://github.com/arkadiyt)
|
|
272
|
+
|
|
273
|
+
* Added `WebMock.reset_executed_requests!` method.
|
|
274
|
+
|
|
275
|
+
stub_get = stub_request(:get, "www.example.com")
|
|
276
|
+
Net::HTTP.get('www.example.com', '/')
|
|
277
|
+
WebMock::RequestRegistry.instance.times_executed(stub_get.request_pattern) # => 1
|
|
278
|
+
reset_executed_requests!
|
|
279
|
+
WebMock::RequestRegistry.instance.times_executed(stub_get.request_pattern) # => 0
|
|
280
|
+
|
|
281
|
+
Thanks to [Olia Kremmyda](https://github.com/oliakremmyda)
|
|
282
|
+
|
|
283
|
+
* Performance improvements
|
|
284
|
+
|
|
285
|
+
Thanks to [Pavel Rosický](https://github.com/ahorek)
|
|
286
|
+
|
|
287
|
+
## 3.4.2
|
|
288
|
+
|
|
289
|
+
* Fixed `rbuf_fill` in Net::HTTP adapter to be thread-safe
|
|
290
|
+
|
|
291
|
+
Thanks to [Arkadiy Tetelman](https://github.com/arkadiyt)
|
|
292
|
+
|
|
293
|
+
* Fix invalid scheme error with Addressable::Template
|
|
294
|
+
|
|
295
|
+
Thanks to [Kazato Sugimoto](https://github.com/uiureo)
|
|
296
|
+
|
|
297
|
+
## 3.4.1
|
|
298
|
+
|
|
299
|
+
* When comparing url encoded body to a body from request stub, which was declared as hash, only String, Numeric and boolean hash values are stringified before the comparison.
|
|
300
|
+
|
|
301
|
+
Thanks to [Lukas Pokorny](https://github.com/luk4s)
|
|
302
|
+
|
|
303
|
+
## 3.4.0
|
|
304
|
+
|
|
305
|
+
* Ruby 2.6 support. Prevent `Net/ReadTimeout` error in Ruby 2.6
|
|
306
|
+
|
|
307
|
+
Thanks to [Koichi ITO](https://github.com/koic)
|
|
308
|
+
|
|
309
|
+
* Handling query params, which represent nested hashes with keys starting with non word characters.
|
|
310
|
+
|
|
311
|
+
Thanks to [rapides](https://github.com/rapides) for reporting the issue.
|
|
312
|
+
|
|
313
|
+
* Patron adapter handles PATCH requests with body.
|
|
314
|
+
|
|
315
|
+
Thanks to [Mattia](https://github.com/iMacTia) for reporting the issue.
|
|
316
|
+
|
|
317
|
+
* Allowing requests with url encoded body to be matched by request stubs declared with hash body with non-string values.
|
|
318
|
+
|
|
319
|
+
stub_request(:post, "www.example.com").with(body: {"a" => 1, "b" => false})
|
|
320
|
+
|
|
321
|
+
RestClient.post('www.example.com', 'a=1&b=false', :content_type => 'application/x-www-form-urlencoded') # ===> Success
|
|
322
|
+
|
|
323
|
+
Thanks to [Kenny Ortmann](https://github.com/yairgo) for suggesting this feature.
|
|
324
|
+
|
|
325
|
+
* When request headers contain 'Accept'=>'application/json' and no registered stub matches the request, WebMock prints a suggested stub code with to_return body set to '{}'.
|
|
326
|
+
|
|
327
|
+
Thanks to [redbar0n](https://github.com/redbar0n)
|
|
328
|
+
|
|
329
|
+
* Improved suggested stub output when the request stub only contains headers declaration.
|
|
330
|
+
|
|
331
|
+
Thanks to [Olia Kremmyda](https://github.com/oliakremmyda)
|
|
332
|
+
|
|
333
|
+
* Fixed Curb adapter to handle `reset` method.
|
|
334
|
+
|
|
335
|
+
Thanks tp [dinhhuydh](https://github.com/dinhhuydh) for reporting the issue.
|
|
336
|
+
Thanks to [Olia Kremmyda](https://github.com/oliakremmyda) for fixing it.
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
## 3.3.0
|
|
340
|
+
|
|
341
|
+
* Better formatting of outputted request stub snippets, displayed on failures due to unstubbed requests.
|
|
342
|
+
|
|
343
|
+
Thanks to [Olia Kremmyda](https://github.com/oliakremmyda)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
## 3.2.1
|
|
347
|
+
|
|
348
|
+
* Fixed Ruby warning under Ruby 2.5
|
|
349
|
+
|
|
350
|
+
Thanks to [Matt Brictson](https://github.com/mattbrictson)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
## 3.2.0
|
|
354
|
+
|
|
355
|
+
* Automatically disable WebMock after Rspec suite
|
|
356
|
+
|
|
357
|
+
Thanks to [Michał Matyas](https://github.com/d4rky-pl)
|
|
358
|
+
|
|
359
|
+
* Fixed bug when handling redirection using Curb.
|
|
360
|
+
|
|
361
|
+
Thanks to [Olia Kremmyda](https://github.com/oliakremmyda)
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
## 3.1.1
|
|
365
|
+
|
|
366
|
+
* Warning message is displayed only once when adding query params to URIAddressablePattern.
|
|
367
|
+
|
|
368
|
+
## 3.1.0
|
|
369
|
+
|
|
370
|
+
* http.rb 3.0.0 compatibility
|
|
371
|
+
|
|
372
|
+
Thanks to [Piotr Boniecki](https://github.com/Bonias)
|
|
373
|
+
|
|
374
|
+
* Typhoeus 1.3.0 support
|
|
375
|
+
|
|
376
|
+
Thanks to [NARUSE, Yui](https://github.com/nurse)
|
|
377
|
+
|
|
378
|
+
* Added support for matching partial query params using hash_excluding
|
|
379
|
+
|
|
380
|
+
stub_request(:get, "www.example.com").
|
|
381
|
+
with(query: hash_excluding({"a" => "b"}))
|
|
382
|
+
|
|
383
|
+
RestClient.get("http://www.example.com/?a=b") # ===> Failure
|
|
384
|
+
RestClient.get("http://www.example.com/?a=c") # ===> Success
|
|
385
|
+
|
|
386
|
+
Thanks to [Olexandr Hoshylyk](https://github.com/Warrior109)
|
|
387
|
+
|
|
388
|
+
* Added MRI 2.3+ frozen string literal compatibility
|
|
389
|
+
|
|
390
|
+
Thanks to [Pat Allan](https://github.com/pat)
|
|
391
|
+
|
|
392
|
+
* Ensured that HTTPClient adapter does not yield block on empty response body if a block is provided
|
|
393
|
+
|
|
394
|
+
Thanks to [NARUSE, Yui](https://github.com/nurse)
|
|
395
|
+
|
|
396
|
+
* Fixed issue with `to_timeout` incorrectly raising `HTTP::ConnectionError` instead of `HTTP::TimeoutError` when using http.rb
|
|
397
|
+
|
|
398
|
+
Thanks to [Rick Song](https://github.com/RickCSong)
|
|
399
|
+
|
|
400
|
+
* Fixed problem with `response.connection.close` method being undefined when using http.rb
|
|
401
|
+
|
|
402
|
+
Thanks to [Janko Marohnić](https://github.com/janko-m)
|
|
403
|
+
|
|
404
|
+
* Fixed problem with matching Net::HTTP request header values assigned as numbers.
|
|
405
|
+
|
|
406
|
+
Thanks to [Felipe Constantino de Oliveira](https://github.com/felipecdo) for reporting the issue.
|
|
407
|
+
|
|
408
|
+
* Fixed problem with Net::HTTP adapter converting empty response body to nil for non 204 responses.
|
|
409
|
+
|
|
410
|
+
Thanks to [Jeffrey Charles](https://github.com/jeffcharles) for reporting the issue.
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
## 3.0.1
|
|
414
|
+
|
|
415
|
+
* Suppressed \`warning: \`&' interpreted as argument prefix\`
|
|
416
|
+
|
|
417
|
+
Thanks to [Koichi ITO](https://github.com/koic)
|
|
418
|
+
|
|
3
419
|
## 3.0.0
|
|
4
420
|
|
|
5
421
|
* Dropped support for Ruby 1.9.3
|
data/Gemfile
CHANGED