webmock 3.14.0 → 3.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +207 -3
- data/README.md +65 -20
- data/lib/webmock/api.rb +2 -0
- data/lib/webmock/assertion_failure.rb +2 -0
- data/lib/webmock/callback_registry.rb +2 -0
- data/lib/webmock/config.rb +2 -0
- data/lib/webmock/cucumber.rb +2 -0
- data/lib/webmock/deprecation.rb +2 -0
- data/lib/webmock/errors.rb +2 -0
- data/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +16 -4
- data/lib/webmock/http_lib_adapters/curb_adapter.rb +4 -2
- data/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +17 -7
- data/lib/webmock/http_lib_adapters/excon_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/http_lib_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +2 -0
- data/lib/webmock/http_lib_adapters/http_rb/client.rb +3 -3
- data/lib/webmock/http_lib_adapters/http_rb/request.rb +17 -5
- data/lib/webmock/http_lib_adapters/http_rb/response.rb +32 -9
- data/lib/webmock/http_lib_adapters/http_rb/streamer.rb +10 -2
- data/lib/webmock/http_lib_adapters/http_rb/webmock.rb +8 -2
- data/lib/webmock/http_lib_adapters/http_rb_adapter.rb +7 -5
- data/lib/webmock/http_lib_adapters/httpclient_adapter.rb +26 -25
- data/lib/webmock/http_lib_adapters/manticore_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/net_http.rb +28 -117
- data/lib/webmock/http_lib_adapters/net_http_response.rb +2 -0
- data/lib/webmock/http_lib_adapters/patron_adapter.rb +3 -1
- data/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +18 -2
- data/lib/webmock/matchers/any_arg_matcher.rb +2 -0
- data/lib/webmock/matchers/hash_argument_matcher.rb +2 -0
- data/lib/webmock/matchers/hash_excluding_matcher.rb +2 -0
- data/lib/webmock/matchers/hash_including_matcher.rb +2 -0
- data/lib/webmock/minitest.rb +2 -0
- data/lib/webmock/rack_response.rb +5 -1
- data/lib/webmock/request_body_diff.rb +2 -0
- data/lib/webmock/request_execution_verifier.rb +2 -0
- data/lib/webmock/request_pattern.rb +35 -12
- data/lib/webmock/request_registry.rb +2 -0
- data/lib/webmock/request_signature.rb +4 -2
- data/lib/webmock/request_signature_snippet.rb +2 -0
- data/lib/webmock/request_stub.rb +34 -0
- data/lib/webmock/response.rb +15 -13
- data/lib/webmock/responses_sequence.rb +2 -0
- data/lib/webmock/rspec/matchers/request_pattern_matcher.rb +2 -0
- data/lib/webmock/rspec/matchers/webmock_matcher.rb +2 -0
- data/lib/webmock/rspec/matchers.rb +2 -0
- data/lib/webmock/rspec.rb +2 -0
- data/lib/webmock/stub_registry.rb +2 -0
- data/lib/webmock/stub_request_snippet.rb +2 -0
- data/lib/webmock/test_unit.rb +2 -0
- data/lib/webmock/util/hash_counter.rb +12 -6
- data/lib/webmock/util/hash_keys_stringifier.rb +2 -0
- data/lib/webmock/util/hash_validator.rb +2 -0
- data/lib/webmock/util/headers.rb +23 -10
- data/lib/webmock/util/parsers/json.rb +72 -0
- data/lib/webmock/util/parsers/parse_error.rb +7 -0
- data/lib/webmock/util/parsers/xml.rb +16 -0
- data/lib/webmock/util/query_mapper.rb +2 -0
- data/lib/webmock/util/uri.rb +3 -1
- data/lib/webmock/util/values_stringifier.rb +2 -0
- data/lib/webmock/util/version_checker.rb +7 -5
- data/lib/webmock/version.rb +3 -1
- data/lib/webmock/webmock.rb +12 -0
- data/lib/webmock.rb +4 -2
- metadata +66 -182
- data/.gemtest +0 -0
- data/.github/workflows/CI.yml +0 -37
- data/.gitignore +0 -34
- data/.rspec-tm +0 -2
- data/Gemfile +0 -9
- data/Rakefile +0 -38
- data/lib/webmock/util/json.rb +0 -67
- data/minitest/test_helper.rb +0 -34
- data/minitest/test_webmock.rb +0 -9
- data/minitest/webmock_spec.rb +0 -60
- data/spec/acceptance/async_http_client/async_http_client_spec.rb +0 -375
- data/spec/acceptance/async_http_client/async_http_client_spec_helper.rb +0 -73
- data/spec/acceptance/curb/curb_spec.rb +0 -499
- data/spec/acceptance/curb/curb_spec_helper.rb +0 -147
- data/spec/acceptance/em_http_request/em_http_request_spec.rb +0 -462
- data/spec/acceptance/em_http_request/em_http_request_spec_helper.rb +0 -77
- data/spec/acceptance/excon/excon_spec.rb +0 -77
- data/spec/acceptance/excon/excon_spec_helper.rb +0 -52
- data/spec/acceptance/http_rb/http_rb_spec.rb +0 -93
- data/spec/acceptance/http_rb/http_rb_spec_helper.rb +0 -54
- data/spec/acceptance/httpclient/httpclient_spec.rb +0 -217
- data/spec/acceptance/httpclient/httpclient_spec_helper.rb +0 -57
- data/spec/acceptance/manticore/manticore_spec.rb +0 -107
- data/spec/acceptance/manticore/manticore_spec_helper.rb +0 -35
- data/spec/acceptance/net_http/net_http_shared.rb +0 -153
- data/spec/acceptance/net_http/net_http_spec.rb +0 -369
- data/spec/acceptance/net_http/net_http_spec_helper.rb +0 -64
- data/spec/acceptance/net_http/real_net_http_spec.rb +0 -20
- data/spec/acceptance/patron/patron_spec.rb +0 -125
- data/spec/acceptance/patron/patron_spec_helper.rb +0 -54
- data/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +0 -313
- data/spec/acceptance/shared/callbacks.rb +0 -148
- data/spec/acceptance/shared/complex_cross_concern_behaviors.rb +0 -36
- data/spec/acceptance/shared/enabling_and_disabling_webmock.rb +0 -95
- data/spec/acceptance/shared/precedence_of_stubs.rb +0 -15
- data/spec/acceptance/shared/request_expectations.rb +0 -930
- data/spec/acceptance/shared/returning_declared_responses.rb +0 -409
- data/spec/acceptance/shared/stubbing_requests.rb +0 -678
- data/spec/acceptance/typhoeus/typhoeus_hydra_spec.rb +0 -135
- data/spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb +0 -60
- data/spec/acceptance/webmock_shared.rb +0 -41
- data/spec/fixtures/test.txt +0 -1
- data/spec/quality_spec.rb +0 -84
- data/spec/spec_helper.rb +0 -48
- data/spec/support/example_curl_output.txt +0 -22
- data/spec/support/failures.rb +0 -9
- data/spec/support/my_rack_app.rb +0 -53
- data/spec/support/network_connection.rb +0 -19
- data/spec/support/webmock_server.rb +0 -70
- data/spec/unit/api_spec.rb +0 -175
- data/spec/unit/errors_spec.rb +0 -129
- data/spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb +0 -17
- data/spec/unit/http_lib_adapters/http_lib_adapter_spec.rb +0 -12
- data/spec/unit/matchers/hash_excluding_matcher_spec.rb +0 -61
- data/spec/unit/matchers/hash_including_matcher_spec.rb +0 -87
- data/spec/unit/rack_response_spec.rb +0 -112
- data/spec/unit/request_body_diff_spec.rb +0 -90
- data/spec/unit/request_execution_verifier_spec.rb +0 -208
- data/spec/unit/request_pattern_spec.rb +0 -736
- data/spec/unit/request_registry_spec.rb +0 -95
- data/spec/unit/request_signature_snippet_spec.rb +0 -89
- data/spec/unit/request_signature_spec.rb +0 -155
- data/spec/unit/request_stub_spec.rb +0 -199
- data/spec/unit/response_spec.rb +0 -286
- data/spec/unit/stub_registry_spec.rb +0 -103
- data/spec/unit/stub_request_snippet_spec.rb +0 -115
- data/spec/unit/util/hash_counter_spec.rb +0 -39
- data/spec/unit/util/hash_keys_stringifier_spec.rb +0 -27
- data/spec/unit/util/headers_spec.rb +0 -28
- data/spec/unit/util/json_spec.rb +0 -33
- data/spec/unit/util/query_mapper_spec.rb +0 -157
- data/spec/unit/util/uri_spec.rb +0 -371
- data/spec/unit/util/version_checker_spec.rb +0 -65
- data/spec/unit/webmock_spec.rb +0 -60
- data/test/http_request.rb +0 -24
- data/test/shared_test.rb +0 -108
- data/test/test_helper.rb +0 -23
- data/test/test_webmock.rb +0 -12
- data/webmock.gemspec +0 -54
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webmock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bartosz Blimke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -101,117 +101,131 @@ dependencies:
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: 0.5.0
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
|
-
name: http
|
104
|
+
name: em-http-request
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 0.
|
109
|
+
version: 1.0.2
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 0.
|
116
|
+
version: 1.0.2
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
118
|
+
name: em-synchrony
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- - "
|
121
|
+
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
123
|
+
version: 1.0.0
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- - "
|
128
|
+
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
130
|
+
version: 1.0.0
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
132
|
+
name: async-http
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
135
|
- - ">="
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
137
|
+
version: 0.48.0
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
144
|
+
version: 0.48.0
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
|
-
name:
|
146
|
+
name: http
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - ">="
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
151
|
+
version: 0.8.0
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - ">="
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version:
|
158
|
+
version: 0.8.0
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
|
-
name:
|
160
|
+
name: rack
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">"
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '1.6'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '1.6'
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: rspec
|
161
175
|
requirement: !ruby/object:Gem::Requirement
|
162
176
|
requirements:
|
163
177
|
- - ">="
|
164
178
|
- !ruby/object:Gem::Version
|
165
|
-
version: 1.0
|
179
|
+
version: 3.1.0
|
166
180
|
type: :development
|
167
181
|
prerelease: false
|
168
182
|
version_requirements: !ruby/object:Gem::Requirement
|
169
183
|
requirements:
|
170
184
|
- - ">="
|
171
185
|
- !ruby/object:Gem::Version
|
172
|
-
version: 1.0
|
186
|
+
version: 3.1.0
|
173
187
|
- !ruby/object:Gem::Dependency
|
174
|
-
name:
|
188
|
+
name: httpclient
|
175
189
|
requirement: !ruby/object:Gem::Requirement
|
176
190
|
requirements:
|
177
191
|
- - ">="
|
178
192
|
- !ruby/object:Gem::Version
|
179
|
-
version:
|
193
|
+
version: 2.2.4
|
180
194
|
type: :development
|
181
195
|
prerelease: false
|
182
196
|
version_requirements: !ruby/object:Gem::Requirement
|
183
197
|
requirements:
|
184
198
|
- - ">="
|
185
199
|
- !ruby/object:Gem::Version
|
186
|
-
version:
|
200
|
+
version: 2.2.4
|
187
201
|
- !ruby/object:Gem::Dependency
|
188
|
-
name:
|
202
|
+
name: mutex_m
|
189
203
|
requirement: !ruby/object:Gem::Requirement
|
190
204
|
requirements:
|
191
205
|
- - ">="
|
192
206
|
- !ruby/object:Gem::Version
|
193
|
-
version: 0
|
207
|
+
version: '0'
|
194
208
|
type: :development
|
195
209
|
prerelease: false
|
196
210
|
version_requirements: !ruby/object:Gem::Requirement
|
197
211
|
requirements:
|
198
212
|
- - ">="
|
199
213
|
- !ruby/object:Gem::Version
|
200
|
-
version: 0
|
214
|
+
version: '0'
|
201
215
|
- !ruby/object:Gem::Dependency
|
202
|
-
name:
|
216
|
+
name: excon
|
203
217
|
requirement: !ruby/object:Gem::Requirement
|
204
218
|
requirements:
|
205
219
|
- - ">="
|
206
220
|
- !ruby/object:Gem::Version
|
207
|
-
version: 0.
|
221
|
+
version: 0.27.5
|
208
222
|
type: :development
|
209
223
|
prerelease: false
|
210
224
|
version_requirements: !ruby/object:Gem::Requirement
|
211
225
|
requirements:
|
212
226
|
- - ">="
|
213
227
|
- !ruby/object:Gem::Version
|
214
|
-
version: 0.
|
228
|
+
version: 0.27.5
|
215
229
|
- !ruby/object:Gem::Dependency
|
216
230
|
name: minitest
|
217
231
|
requirement: !ruby/object:Gem::Requirement
|
@@ -268,6 +282,20 @@ dependencies:
|
|
268
282
|
- - ">="
|
269
283
|
- !ruby/object:Gem::Version
|
270
284
|
version: '0'
|
285
|
+
- !ruby/object:Gem::Dependency
|
286
|
+
name: rspec-retry
|
287
|
+
requirement: !ruby/object:Gem::Requirement
|
288
|
+
requirements:
|
289
|
+
- - ">="
|
290
|
+
- !ruby/object:Gem::Version
|
291
|
+
version: '0'
|
292
|
+
type: :development
|
293
|
+
prerelease: false
|
294
|
+
version_requirements: !ruby/object:Gem::Requirement
|
295
|
+
requirements:
|
296
|
+
- - ">="
|
297
|
+
- !ruby/object:Gem::Version
|
298
|
+
version: '0'
|
271
299
|
description: WebMock allows stubbing HTTP requests and setting expectations on HTTP
|
272
300
|
requests.
|
273
301
|
email:
|
@@ -276,15 +304,9 @@ executables: []
|
|
276
304
|
extensions: []
|
277
305
|
extra_rdoc_files: []
|
278
306
|
files:
|
279
|
-
- ".gemtest"
|
280
|
-
- ".github/workflows/CI.yml"
|
281
|
-
- ".gitignore"
|
282
|
-
- ".rspec-tm"
|
283
307
|
- CHANGELOG.md
|
284
|
-
- Gemfile
|
285
308
|
- LICENSE
|
286
309
|
- README.md
|
287
|
-
- Rakefile
|
288
310
|
- lib/webmock.rb
|
289
311
|
- lib/webmock/api.rb
|
290
312
|
- lib/webmock/assertion_failure.rb
|
@@ -337,93 +359,23 @@ files:
|
|
337
359
|
- lib/webmock/util/hash_keys_stringifier.rb
|
338
360
|
- lib/webmock/util/hash_validator.rb
|
339
361
|
- lib/webmock/util/headers.rb
|
340
|
-
- lib/webmock/util/json.rb
|
362
|
+
- lib/webmock/util/parsers/json.rb
|
363
|
+
- lib/webmock/util/parsers/parse_error.rb
|
364
|
+
- lib/webmock/util/parsers/xml.rb
|
341
365
|
- lib/webmock/util/query_mapper.rb
|
342
366
|
- lib/webmock/util/uri.rb
|
343
367
|
- lib/webmock/util/values_stringifier.rb
|
344
368
|
- lib/webmock/util/version_checker.rb
|
345
369
|
- lib/webmock/version.rb
|
346
370
|
- lib/webmock/webmock.rb
|
347
|
-
|
348
|
-
- minitest/test_webmock.rb
|
349
|
-
- minitest/webmock_spec.rb
|
350
|
-
- spec/acceptance/async_http_client/async_http_client_spec.rb
|
351
|
-
- spec/acceptance/async_http_client/async_http_client_spec_helper.rb
|
352
|
-
- spec/acceptance/curb/curb_spec.rb
|
353
|
-
- spec/acceptance/curb/curb_spec_helper.rb
|
354
|
-
- spec/acceptance/em_http_request/em_http_request_spec.rb
|
355
|
-
- spec/acceptance/em_http_request/em_http_request_spec_helper.rb
|
356
|
-
- spec/acceptance/excon/excon_spec.rb
|
357
|
-
- spec/acceptance/excon/excon_spec_helper.rb
|
358
|
-
- spec/acceptance/http_rb/http_rb_spec.rb
|
359
|
-
- spec/acceptance/http_rb/http_rb_spec_helper.rb
|
360
|
-
- spec/acceptance/httpclient/httpclient_spec.rb
|
361
|
-
- spec/acceptance/httpclient/httpclient_spec_helper.rb
|
362
|
-
- spec/acceptance/manticore/manticore_spec.rb
|
363
|
-
- spec/acceptance/manticore/manticore_spec_helper.rb
|
364
|
-
- spec/acceptance/net_http/net_http_shared.rb
|
365
|
-
- spec/acceptance/net_http/net_http_spec.rb
|
366
|
-
- spec/acceptance/net_http/net_http_spec_helper.rb
|
367
|
-
- spec/acceptance/net_http/real_net_http_spec.rb
|
368
|
-
- spec/acceptance/patron/patron_spec.rb
|
369
|
-
- spec/acceptance/patron/patron_spec_helper.rb
|
370
|
-
- spec/acceptance/shared/allowing_and_disabling_net_connect.rb
|
371
|
-
- spec/acceptance/shared/callbacks.rb
|
372
|
-
- spec/acceptance/shared/complex_cross_concern_behaviors.rb
|
373
|
-
- spec/acceptance/shared/enabling_and_disabling_webmock.rb
|
374
|
-
- spec/acceptance/shared/precedence_of_stubs.rb
|
375
|
-
- spec/acceptance/shared/request_expectations.rb
|
376
|
-
- spec/acceptance/shared/returning_declared_responses.rb
|
377
|
-
- spec/acceptance/shared/stubbing_requests.rb
|
378
|
-
- spec/acceptance/typhoeus/typhoeus_hydra_spec.rb
|
379
|
-
- spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
|
380
|
-
- spec/acceptance/webmock_shared.rb
|
381
|
-
- spec/fixtures/test.txt
|
382
|
-
- spec/quality_spec.rb
|
383
|
-
- spec/spec_helper.rb
|
384
|
-
- spec/support/example_curl_output.txt
|
385
|
-
- spec/support/failures.rb
|
386
|
-
- spec/support/my_rack_app.rb
|
387
|
-
- spec/support/network_connection.rb
|
388
|
-
- spec/support/webmock_server.rb
|
389
|
-
- spec/unit/api_spec.rb
|
390
|
-
- spec/unit/errors_spec.rb
|
391
|
-
- spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb
|
392
|
-
- spec/unit/http_lib_adapters/http_lib_adapter_spec.rb
|
393
|
-
- spec/unit/matchers/hash_excluding_matcher_spec.rb
|
394
|
-
- spec/unit/matchers/hash_including_matcher_spec.rb
|
395
|
-
- spec/unit/rack_response_spec.rb
|
396
|
-
- spec/unit/request_body_diff_spec.rb
|
397
|
-
- spec/unit/request_execution_verifier_spec.rb
|
398
|
-
- spec/unit/request_pattern_spec.rb
|
399
|
-
- spec/unit/request_registry_spec.rb
|
400
|
-
- spec/unit/request_signature_snippet_spec.rb
|
401
|
-
- spec/unit/request_signature_spec.rb
|
402
|
-
- spec/unit/request_stub_spec.rb
|
403
|
-
- spec/unit/response_spec.rb
|
404
|
-
- spec/unit/stub_registry_spec.rb
|
405
|
-
- spec/unit/stub_request_snippet_spec.rb
|
406
|
-
- spec/unit/util/hash_counter_spec.rb
|
407
|
-
- spec/unit/util/hash_keys_stringifier_spec.rb
|
408
|
-
- spec/unit/util/headers_spec.rb
|
409
|
-
- spec/unit/util/json_spec.rb
|
410
|
-
- spec/unit/util/query_mapper_spec.rb
|
411
|
-
- spec/unit/util/uri_spec.rb
|
412
|
-
- spec/unit/util/version_checker_spec.rb
|
413
|
-
- spec/unit/webmock_spec.rb
|
414
|
-
- test/http_request.rb
|
415
|
-
- test/shared_test.rb
|
416
|
-
- test/test_helper.rb
|
417
|
-
- test/test_webmock.rb
|
418
|
-
- webmock.gemspec
|
419
|
-
homepage: http://github.com/bblimke/webmock
|
371
|
+
homepage: https://github.com/bblimke/webmock
|
420
372
|
licenses:
|
421
373
|
- MIT
|
422
374
|
metadata:
|
423
375
|
bug_tracker_uri: https://github.com/bblimke/webmock/issues
|
424
|
-
changelog_uri: https://github.com/bblimke/webmock/blob/v3.
|
425
|
-
documentation_uri: https://www.rubydoc.info/gems/webmock/3.
|
426
|
-
source_code_uri: https://github.com/bblimke/webmock/tree/v3.
|
376
|
+
changelog_uri: https://github.com/bblimke/webmock/blob/v3.24.0/CHANGELOG.md
|
377
|
+
documentation_uri: https://www.rubydoc.info/gems/webmock/3.24.0
|
378
|
+
source_code_uri: https://github.com/bblimke/webmock/tree/v3.24.0
|
427
379
|
wiki_uri: https://github.com/bblimke/webmock/wiki
|
428
380
|
post_install_message:
|
429
381
|
rdoc_options: []
|
@@ -433,83 +385,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
433
385
|
requirements:
|
434
386
|
- - ">="
|
435
387
|
- !ruby/object:Gem::Version
|
436
|
-
version: '2.
|
388
|
+
version: '2.5'
|
437
389
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
438
390
|
requirements:
|
439
391
|
- - ">="
|
440
392
|
- !ruby/object:Gem::Version
|
441
393
|
version: '0'
|
442
394
|
requirements: []
|
443
|
-
rubygems_version: 3.
|
395
|
+
rubygems_version: 3.5.16
|
444
396
|
signing_key:
|
445
397
|
specification_version: 4
|
446
398
|
summary: Library for stubbing HTTP requests in Ruby.
|
447
|
-
test_files:
|
448
|
-
- spec/acceptance/async_http_client/async_http_client_spec.rb
|
449
|
-
- spec/acceptance/async_http_client/async_http_client_spec_helper.rb
|
450
|
-
- spec/acceptance/curb/curb_spec.rb
|
451
|
-
- spec/acceptance/curb/curb_spec_helper.rb
|
452
|
-
- spec/acceptance/em_http_request/em_http_request_spec.rb
|
453
|
-
- spec/acceptance/em_http_request/em_http_request_spec_helper.rb
|
454
|
-
- spec/acceptance/excon/excon_spec.rb
|
455
|
-
- spec/acceptance/excon/excon_spec_helper.rb
|
456
|
-
- spec/acceptance/http_rb/http_rb_spec.rb
|
457
|
-
- spec/acceptance/http_rb/http_rb_spec_helper.rb
|
458
|
-
- spec/acceptance/httpclient/httpclient_spec.rb
|
459
|
-
- spec/acceptance/httpclient/httpclient_spec_helper.rb
|
460
|
-
- spec/acceptance/manticore/manticore_spec.rb
|
461
|
-
- spec/acceptance/manticore/manticore_spec_helper.rb
|
462
|
-
- spec/acceptance/net_http/net_http_shared.rb
|
463
|
-
- spec/acceptance/net_http/net_http_spec.rb
|
464
|
-
- spec/acceptance/net_http/net_http_spec_helper.rb
|
465
|
-
- spec/acceptance/net_http/real_net_http_spec.rb
|
466
|
-
- spec/acceptance/patron/patron_spec.rb
|
467
|
-
- spec/acceptance/patron/patron_spec_helper.rb
|
468
|
-
- spec/acceptance/shared/allowing_and_disabling_net_connect.rb
|
469
|
-
- spec/acceptance/shared/callbacks.rb
|
470
|
-
- spec/acceptance/shared/complex_cross_concern_behaviors.rb
|
471
|
-
- spec/acceptance/shared/enabling_and_disabling_webmock.rb
|
472
|
-
- spec/acceptance/shared/precedence_of_stubs.rb
|
473
|
-
- spec/acceptance/shared/request_expectations.rb
|
474
|
-
- spec/acceptance/shared/returning_declared_responses.rb
|
475
|
-
- spec/acceptance/shared/stubbing_requests.rb
|
476
|
-
- spec/acceptance/typhoeus/typhoeus_hydra_spec.rb
|
477
|
-
- spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
|
478
|
-
- spec/acceptance/webmock_shared.rb
|
479
|
-
- spec/fixtures/test.txt
|
480
|
-
- spec/quality_spec.rb
|
481
|
-
- spec/spec_helper.rb
|
482
|
-
- spec/support/example_curl_output.txt
|
483
|
-
- spec/support/failures.rb
|
484
|
-
- spec/support/my_rack_app.rb
|
485
|
-
- spec/support/network_connection.rb
|
486
|
-
- spec/support/webmock_server.rb
|
487
|
-
- spec/unit/api_spec.rb
|
488
|
-
- spec/unit/errors_spec.rb
|
489
|
-
- spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb
|
490
|
-
- spec/unit/http_lib_adapters/http_lib_adapter_spec.rb
|
491
|
-
- spec/unit/matchers/hash_excluding_matcher_spec.rb
|
492
|
-
- spec/unit/matchers/hash_including_matcher_spec.rb
|
493
|
-
- spec/unit/rack_response_spec.rb
|
494
|
-
- spec/unit/request_body_diff_spec.rb
|
495
|
-
- spec/unit/request_execution_verifier_spec.rb
|
496
|
-
- spec/unit/request_pattern_spec.rb
|
497
|
-
- spec/unit/request_registry_spec.rb
|
498
|
-
- spec/unit/request_signature_snippet_spec.rb
|
499
|
-
- spec/unit/request_signature_spec.rb
|
500
|
-
- spec/unit/request_stub_spec.rb
|
501
|
-
- spec/unit/response_spec.rb
|
502
|
-
- spec/unit/stub_registry_spec.rb
|
503
|
-
- spec/unit/stub_request_snippet_spec.rb
|
504
|
-
- spec/unit/util/hash_counter_spec.rb
|
505
|
-
- spec/unit/util/hash_keys_stringifier_spec.rb
|
506
|
-
- spec/unit/util/headers_spec.rb
|
507
|
-
- spec/unit/util/json_spec.rb
|
508
|
-
- spec/unit/util/query_mapper_spec.rb
|
509
|
-
- spec/unit/util/uri_spec.rb
|
510
|
-
- spec/unit/util/version_checker_spec.rb
|
511
|
-
- spec/unit/webmock_spec.rb
|
512
|
-
- test/http_request.rb
|
513
|
-
- test/shared_test.rb
|
514
|
-
- test/test_helper.rb
|
515
|
-
- test/test_webmock.rb
|
399
|
+
test_files: []
|
data/.gemtest
DELETED
File without changes
|
data/.github/workflows/CI.yml
DELETED
@@ -1,37 +0,0 @@
|
|
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/.gitignore
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
## MAC OS
|
2
|
-
.DS_Store
|
3
|
-
|
4
|
-
## TEXTMATE
|
5
|
-
*.tmproj
|
6
|
-
tmtags
|
7
|
-
|
8
|
-
## EMACS
|
9
|
-
*~
|
10
|
-
\#*
|
11
|
-
.\#*
|
12
|
-
|
13
|
-
## VIM
|
14
|
-
.*.sw[a-z]
|
15
|
-
|
16
|
-
## RubyMine and related
|
17
|
-
.idea
|
18
|
-
|
19
|
-
## PROJECT::GENERAL
|
20
|
-
coverage
|
21
|
-
rdoc
|
22
|
-
pkg
|
23
|
-
|
24
|
-
## PROJECT::SPECIFIC
|
25
|
-
*.gem
|
26
|
-
.bundle
|
27
|
-
Gemfile.lock
|
28
|
-
gemfiles/*.gemfile.lock
|
29
|
-
pkg/*
|
30
|
-
tmp/*
|
31
|
-
*.rbc
|
32
|
-
*.rbx
|
33
|
-
.ruby-gemset
|
34
|
-
.ruby-version
|
data/.rspec-tm
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
Bundler::GemHelper.install_tasks
|
3
|
-
|
4
|
-
require "rspec/core/rake_task"
|
5
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
6
|
-
t.rspec_opts = %w[
|
7
|
-
--force-color
|
8
|
-
--format progress
|
9
|
-
--require ./spec/spec_helper.rb
|
10
|
-
]
|
11
|
-
t.pattern = 'spec/**/*_spec.rb'
|
12
|
-
end
|
13
|
-
|
14
|
-
RSpec::Core::RakeTask.new(:spec_http_without_webmock) do |t|
|
15
|
-
t.rspec_opts = %w[
|
16
|
-
--force-color
|
17
|
-
--format progress
|
18
|
-
--require ./spec/acceptance/net_http/real_net_http_spec.rb
|
19
|
-
]
|
20
|
-
t.pattern = 'spec/acceptance/net_http/real_net_http_spec.rb'
|
21
|
-
end
|
22
|
-
|
23
|
-
require 'rake/testtask'
|
24
|
-
Rake::TestTask.new(:test) do |test|
|
25
|
-
test.test_files = FileList["test/**/*.rb"].exclude("test/test_helper.rb")
|
26
|
-
test.options = "--use-color"
|
27
|
-
test.verbose = false
|
28
|
-
test.warning = false
|
29
|
-
end
|
30
|
-
|
31
|
-
Rake::TestTask.new(:minitest) do |test|
|
32
|
-
test.test_files = FileList["minitest/**/*.rb"].exclude("test/test_helper.rb")
|
33
|
-
test.options = "--pride"
|
34
|
-
test.verbose = false
|
35
|
-
test.warning = false
|
36
|
-
end
|
37
|
-
|
38
|
-
task default: [:spec, :spec_http_without_webmock, :test, :minitest]
|
data/lib/webmock/util/json.rb
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
# This is a copy of https://github.com/jnunemaker/crack/blob/master/lib/crack/json.rb
|
2
|
-
# with date parsing removed
|
3
|
-
# Copyright (c) 2004-2008 David Heinemeier Hansson
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
5
|
-
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
7
|
-
|
8
|
-
module WebMock
|
9
|
-
module Util
|
10
|
-
class JSON
|
11
|
-
class ParseError < StandardError; end
|
12
|
-
|
13
|
-
def self.parse(json)
|
14
|
-
yaml = unescape(convert_json_to_yaml(json))
|
15
|
-
YAML.load(yaml)
|
16
|
-
rescue ArgumentError => e
|
17
|
-
raise ParseError, "Invalid JSON string: #{yaml}, Error: #{e.inspect}"
|
18
|
-
end
|
19
|
-
|
20
|
-
protected
|
21
|
-
def self.unescape(str)
|
22
|
-
str.gsub(/\\u([0-9a-f]{4})/) { [$1.hex].pack("U") }
|
23
|
-
end
|
24
|
-
|
25
|
-
# Ensure that ":" and "," are always followed by a space
|
26
|
-
def self.convert_json_to_yaml(json) #:nodoc:
|
27
|
-
scanner, quoting, marks, times = StringScanner.new(json), false, [], []
|
28
|
-
while scanner.scan_until(/(\\['"]|['":,\\]|\\.)/)
|
29
|
-
case char = scanner[1]
|
30
|
-
when '"', "'"
|
31
|
-
if !quoting
|
32
|
-
quoting = char
|
33
|
-
elsif quoting == char
|
34
|
-
quoting = false
|
35
|
-
end
|
36
|
-
when ":",","
|
37
|
-
marks << scanner.pos - 1 unless quoting
|
38
|
-
when "\\"
|
39
|
-
scanner.skip(/\\/)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
if marks.empty?
|
44
|
-
json.gsub(/\\\//, '/')
|
45
|
-
else
|
46
|
-
left_pos = [-1].push(*marks)
|
47
|
-
right_pos = marks << json.bytesize
|
48
|
-
output = []
|
49
|
-
|
50
|
-
left_pos.each_with_index do |left, i|
|
51
|
-
if json.respond_to?(:byteslice)
|
52
|
-
output << json.byteslice(left.succ..right_pos[i])
|
53
|
-
else
|
54
|
-
output << json[left.succ..right_pos[i]]
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
output = output * " "
|
59
|
-
|
60
|
-
times.each { |i| output[i-1] = ' ' }
|
61
|
-
output.gsub!(/\\\//, '/')
|
62
|
-
output
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
data/minitest/test_helper.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
4
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
5
|
-
|
6
|
-
require File.expand_path(File.dirname(__FILE__) + '/../test/http_request')
|
7
|
-
|
8
|
-
gem 'minitest'
|
9
|
-
|
10
|
-
require 'minitest/autorun'
|
11
|
-
require 'webmock/minitest'
|
12
|
-
|
13
|
-
test_class = defined?(MiniTest::Test) ? MiniTest::Test : MiniTest::Unit::TestCase
|
14
|
-
|
15
|
-
test_class.class_eval do
|
16
|
-
|
17
|
-
def assert_raise(*exp, &block)
|
18
|
-
assert_raises(*exp, &block)
|
19
|
-
end
|
20
|
-
|
21
|
-
def assert_raise_with_message(e, message, &block)
|
22
|
-
e = assert_raises(e, &block)
|
23
|
-
if message.is_a?(Regexp)
|
24
|
-
assert_match(message, e.message)
|
25
|
-
else
|
26
|
-
assert_equal(message, e.message)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def assert_fail(message, &block)
|
31
|
-
assert_raise_with_message(MiniTest::Assertion, message, &block)
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
data/minitest/test_webmock.rb
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/test_helper')
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../test/shared_test')
|
3
|
-
|
4
|
-
test_class = defined?(MiniTest::Test) ? MiniTest::Test : MiniTest::Unit::TestCase
|
5
|
-
|
6
|
-
|
7
|
-
class MiniTestWebMock < test_class
|
8
|
-
include SharedTest
|
9
|
-
end
|