parking_ticket 1.0.47 → 1.0.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -0
  3. data/.vscode/settings.json +3 -0
  4. data/Gemfile +0 -15
  5. data/Gemfile.lock +72 -4
  6. data/Rakefile +2 -2
  7. data/bin/console +3 -3
  8. data/bin/tapioca +29 -0
  9. data/lib/clients/models/payment_method.rb +15 -0
  10. data/lib/clients/models/quote.rb +16 -0
  11. data/lib/clients/models/rate_option.rb +19 -0
  12. data/lib/clients/models/structuraly_comparable.rb +14 -0
  13. data/lib/clients/models/ticket.rb +19 -0
  14. data/lib/clients/models/vehicle.rb +17 -0
  15. data/lib/clients/pay_by_phone/adapter.rb +106 -50
  16. data/lib/clients/pay_by_phone/client.rb +101 -38
  17. data/lib/parking_ticket/configuration.rb +3 -0
  18. data/lib/parking_ticket/version.rb +2 -1
  19. data/lib/parking_ticket.rb +79 -54
  20. data/sorbet/config +4 -0
  21. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  22. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  23. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  24. data/sorbet/rbi/gems/addressable@2.8.1.rbi +2000 -0
  25. data/sorbet/rbi/gems/amazing_print@1.4.0.rbi +872 -0
  26. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  27. data/sorbet/rbi/gems/crack@0.4.5.rbi +144 -0
  28. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  29. data/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi +146 -0
  30. data/sorbet/rbi/gems/faraday@2.7.2.rbi +2518 -0
  31. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +350 -0
  32. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  33. data/sorbet/rbi/gems/json_matchers@0.11.1.rbi +133 -0
  34. data/sorbet/rbi/gems/json_schema@0.21.0.rbi +1165 -0
  35. data/sorbet/rbi/gems/netrc@0.11.0.rbi +161 -0
  36. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  37. data/sorbet/rbi/gems/parser@3.2.2.0.rbi +7207 -0
  38. data/sorbet/rbi/gems/public_suffix@5.0.1.rbi +940 -0
  39. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  40. data/sorbet/rbi/gems/rake@13.0.6.rbi +2881 -0
  41. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  42. data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +3600 -0
  43. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4823 -0
  44. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10826 -0
  45. data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +8118 -0
  46. data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +5300 -0
  47. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1615 -0
  48. data/sorbet/rbi/gems/rspec@3.12.0.rbi +82 -0
  49. data/sorbet/rbi/gems/rubocop-ast@1.28.0.rbi +6985 -0
  50. data/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi +1043 -0
  51. data/sorbet/rbi/gems/rubocop@1.48.1.rbi +54934 -0
  52. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  53. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  54. data/sorbet/rbi/gems/spoom@1.2.1.rbi +2503 -0
  55. data/sorbet/rbi/gems/tapioca@0.11.4.rbi +3212 -0
  56. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  57. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +65 -0
  58. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
  59. data/sorbet/rbi/gems/vcr@6.1.0.rbi +3023 -0
  60. data/sorbet/rbi/gems/webmock@3.18.1.rbi +1728 -0
  61. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2584 -0
  62. data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +441 -0
  63. data/sorbet/rbi/gems/yard@0.9.28.rbi +17802 -0
  64. data/sorbet/tapioca/config.yml +13 -0
  65. data/sorbet/tapioca/require.rb +4 -0
  66. metadata +241 -4
  67. data/lib/clients/adapter.rb +0 -75
@@ -0,0 +1,3023 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `vcr` gem.
5
+ # Please instead update this file by running `bin/tapioca gem vcr`.
6
+
7
+ # The main entry point for VCR.
8
+ #
9
+ # @note This module is extended onto itself; thus, the methods listed
10
+ # here as instance methods are available directly off of VCR.
11
+ #
12
+ # source://vcr//lib/vcr/util/logger.rb#1
13
+ module VCR
14
+ include ::VCR::VariableArgsBlockCaller
15
+ include ::VCR::Errors
16
+ extend ::VCR::VariableArgsBlockCaller
17
+ extend ::VCR::Errors
18
+ extend ::VCR
19
+
20
+ # @private
21
+ #
22
+ # source://vcr//lib/vcr.rb#385
23
+ def cassette_persisters; end
24
+
25
+ # @private
26
+ #
27
+ # source://vcr//lib/vcr.rb#380
28
+ def cassette_serializers; end
29
+
30
+ # @return [Enumerable] list of all cassettes currently being used
31
+ #
32
+ # source://vcr//lib/vcr.rb#362
33
+ def cassettes(context = T.unsafe(nil)); end
34
+
35
+ # @deprecated Use #configure instead.
36
+ # @see #configure
37
+ #
38
+ # source://vcr//lib/vcr/deprecations.rb#4
39
+ def config; end
40
+
41
+ # @return [VCR::Configuration] the VCR configuration.
42
+ #
43
+ # source://vcr//lib/vcr.rb#239
44
+ def configuration; end
45
+
46
+ # Used to configure VCR.
47
+ #
48
+ # @example
49
+ # VCR.configure do |c|
50
+ # c.some_config_option = true
51
+ # end
52
+ # @return [void]
53
+ # @yield the configuration block
54
+ # @yieldparam config [VCR::Configuration] the configuration object
55
+ #
56
+ # source://vcr//lib/vcr.rb#234
57
+ def configure; end
58
+
59
+ # Sets up `Before` and `After` cucumber hooks in order to
60
+ # use VCR with particular cucumber tags.
61
+ #
62
+ # @example
63
+ # VCR.cucumber_tags do |t|
64
+ # t.tags "tag1", "tag2"
65
+ # t.tag "@some_other_tag", :record => :new_episodes
66
+ # end
67
+ # @return [void]
68
+ # @see VCR::CucumberTags#tags
69
+ # @yield the cucumber tags configuration block
70
+ # @yieldparam t [VCR::CucumberTags] Cucumber tags config object
71
+ #
72
+ # source://vcr//lib/vcr.rb#256
73
+ def cucumber_tags(&block); end
74
+
75
+ # The currently active cassette.
76
+ #
77
+ # @return [nil, VCR::Cassette] The current cassette or nil if there is
78
+ # no current cassette.
79
+ #
80
+ # source://vcr//lib/vcr.rb#48
81
+ def current_cassette; end
82
+
83
+ # Ejects the current cassette. The cassette will no longer be used.
84
+ # In addition, any newly recorded HTTP interactions will be written to
85
+ # disk.
86
+ #
87
+ # @option options
88
+ # @param options [Hash] Eject options.
89
+ # @return [VCR::Cassette, nil] the ejected cassette if there was one
90
+ #
91
+ # source://vcr//lib/vcr.rb#159
92
+ def eject_cassette(options = T.unsafe(nil)); end
93
+
94
+ # @private
95
+ # @return [Boolean]
96
+ #
97
+ # source://vcr//lib/vcr.rb#408
98
+ def fibers_available?; end
99
+
100
+ # @private
101
+ #
102
+ # source://vcr//lib/vcr.rb#345
103
+ def http_interactions; end
104
+
105
+ # Inserts the named cassette using the given cassette options.
106
+ # New HTTP interactions, if allowed by the cassette's `:record` option, will
107
+ # be recorded to the cassette. The cassette's existing HTTP interactions
108
+ # will be used to stub requests, unless prevented by the cassette's
109
+ # `:record` option.
110
+ #
111
+ # @example
112
+ # VCR.insert_cassette('twitter', :record => :new_episodes)
113
+ #
114
+ # # ...later, after making an HTTP request:
115
+ #
116
+ # VCR.eject_cassette
117
+ # @note If you use this method you _must_ call `eject_cassette` when you
118
+ # are done. It is generally recommended that you use {#use_cassette}
119
+ # unless your code-under-test cannot be run as a block.
120
+ # @option options
121
+ # @option options
122
+ # @option options
123
+ # @option options
124
+ # @option options
125
+ # @option options
126
+ # @option options
127
+ # @option options
128
+ # @option options
129
+ # @option options
130
+ # @option options
131
+ # @option options
132
+ # @option options
133
+ # @option options
134
+ # @option options
135
+ # @param name [#to_s] The name of the cassette. VCR will sanitize
136
+ # this to ensure it is a valid file name.
137
+ # @param options [Hash] The cassette options. The given options will
138
+ # be merged with the configured default_cassette_options.
139
+ # @raise [ArgumentError] when the given cassette is already being used.
140
+ # @raise [VCR::Errors::TurnedOffError] when VCR has been turned off
141
+ # without using the :ignore_cassettes option.
142
+ # @raise [VCR::Errors::MissingERBVariableError] when the `:erb` option
143
+ # is used and the ERB template requires variables that you did not provide.
144
+ # @return [VCR::Cassette] the inserted cassette
145
+ #
146
+ # source://vcr//lib/vcr.rb#132
147
+ def insert_cassette(name, options = T.unsafe(nil)); end
148
+
149
+ # @private
150
+ #
151
+ # source://vcr//lib/vcr.rb#375
152
+ def library_hooks; end
153
+
154
+ # @private
155
+ #
156
+ # source://vcr//lib/vcr.rb#398
157
+ def link_context(from_thread, to_key); end
158
+
159
+ # @private
160
+ # @return [Boolean]
161
+ #
162
+ # source://vcr//lib/vcr.rb#351
163
+ def real_http_connections_allowed?; end
164
+
165
+ # @private
166
+ #
167
+ # source://vcr//lib/vcr.rb#390
168
+ def record_http_interaction(interaction); end
169
+
170
+ # @private
171
+ #
172
+ # source://vcr//lib/vcr.rb#370
173
+ def request_ignorer; end
174
+
175
+ # @return [RequestMatcherRegistry] the request matcher registry
176
+ #
177
+ # source://vcr//lib/vcr.rb#357
178
+ def request_matchers; end
179
+
180
+ # Turns VCR off, so that it no longer handles every HTTP request.
181
+ #
182
+ # @option options
183
+ # @param options [Hash] hash of options
184
+ # @raise [VCR::Errors::CassetteInUseError] if there is currently a cassette in use
185
+ # @raise [ArgumentError] if you pass an invalid option
186
+ # @return [void]
187
+ #
188
+ # source://vcr//lib/vcr.rb#290
189
+ def turn_off!(options = T.unsafe(nil)); end
190
+
191
+ # Turns on VCR, if it has previously been turned off.
192
+ #
193
+ # @return [void]
194
+ # @see #turn_off!
195
+ # @see #turned_off
196
+ # @see #turned_on?
197
+ # @see #turned_on
198
+ #
199
+ # source://vcr//lib/vcr.rb#327
200
+ def turn_on!; end
201
+
202
+ # Turns VCR off for the duration of a block.
203
+ #
204
+ # @param options [Hash] hash of options
205
+ # @raise [VCR::Errors::CassetteInUseError] if there is currently a cassette in use
206
+ # @raise [ArgumentError] if you pass an invalid option
207
+ # @return [void]
208
+ # @see #turned_on
209
+ # @see #turn_off!
210
+ # @see #turn_on!
211
+ # @see #turned_on?
212
+ #
213
+ # source://vcr//lib/vcr.rb#270
214
+ def turned_off(options = T.unsafe(nil)); end
215
+
216
+ # Turns on VCR, for the duration of a block.
217
+ #
218
+ # @param options [Hash] hash of options
219
+ # @return [void]
220
+ # @see #turn_off!
221
+ # @see #turned_off
222
+ # @see #turned_on?
223
+ #
224
+ # source://vcr//lib/vcr.rb#311
225
+ def turned_on(options = T.unsafe(nil)); end
226
+
227
+ # @note Normally VCR is _always_ turned on; it will only be off if you have
228
+ # explicitly turned it off.
229
+ # @return [Boolean] whether or not VCR is turned on
230
+ # @see #turn_on!
231
+ # @see #turn_off!
232
+ # @see #turned_off
233
+ #
234
+ # source://vcr//lib/vcr.rb#337
235
+ def turned_on?; end
236
+
237
+ # @private
238
+ #
239
+ # source://vcr//lib/vcr.rb#403
240
+ def unlink_context(key); end
241
+
242
+ # Inserts a cassette using the given name and options, runs the given
243
+ # block, and ejects the cassette.
244
+ #
245
+ # @example
246
+ # VCR.use_cassette('twitter', :record => :new_episodes) do
247
+ # # make an HTTP request
248
+ # end
249
+ # @option options
250
+ # @option options
251
+ # @option options
252
+ # @option options
253
+ # @option options
254
+ # @option options
255
+ # @option options
256
+ # @option options
257
+ # @option options
258
+ # @option options
259
+ # @option options
260
+ # @option options
261
+ # @option options
262
+ # @option options
263
+ # @option options
264
+ # @param name [#to_s] The name of the cassette. VCR will sanitize
265
+ # this to ensure it is a valid file name.
266
+ # @param options [Hash] The cassette options. The given options will
267
+ # be merged with the configured default_cassette_options.
268
+ # @raise [ArgumentError] when the given cassette is already being used.
269
+ # @raise [VCR::Errors::TurnedOffError] when VCR has been turned off
270
+ # without using the :ignore_cassettes option.
271
+ # @raise [VCR::Errors::MissingERBVariableError] when the `:erb` option
272
+ # is used and the ERB template requires variables that you did not provide.
273
+ # @return [void]
274
+ # @see #insert_cassette
275
+ # @see #eject_cassette
276
+ # @yield Block to run while this cassette is in use.
277
+ # @yieldparam cassette [(optional) VCR::Cassette] the cassette that has
278
+ # been inserted.
279
+ #
280
+ # source://vcr//lib/vcr.rb#184
281
+ def use_cassette(name, options = T.unsafe(nil), &block); end
282
+
283
+ # Inserts multiple cassettes the given names
284
+ #
285
+ # @example
286
+ # cassettes = [
287
+ # { name: 'github' },
288
+ # { name: 'apple', options: { erb: true } }
289
+ # ]
290
+ # VCR.use_cassettes(cassettes) do
291
+ # # make multiple HTTP requests
292
+ # end
293
+ #
294
+ # source://vcr//lib/vcr.rb#213
295
+ def use_cassettes(cassettes, &block); end
296
+
297
+ # @note This string also has singleton methods:
298
+ #
299
+ # * `major` [Integer] The major version.
300
+ # * `minor` [Integer] The minor version.
301
+ # * `patch` [Integer] The patch version.
302
+ # * `parts` [Array<Integer>] List of the version parts.
303
+ # @return [String] the current VCR version.
304
+ #
305
+ # source://vcr//lib/vcr/version.rb#11
306
+ def version; end
307
+
308
+ private
309
+
310
+ # source://vcr//lib/vcr.rb#448
311
+ def context_cassettes; end
312
+
313
+ # source://vcr//lib/vcr.rb#427
314
+ def context_value(name); end
315
+
316
+ # source://vcr//lib/vcr.rb#413
317
+ def current_context; end
318
+
319
+ # source://vcr//lib/vcr.rb#435
320
+ def dup_context(context); end
321
+
322
+ # source://vcr//lib/vcr.rb#417
323
+ def get_context(thread_key, fiber_key = T.unsafe(nil)); end
324
+
325
+ # @return [Boolean]
326
+ #
327
+ # source://vcr//lib/vcr.rb#444
328
+ def ignore_cassettes?; end
329
+
330
+ # source://vcr//lib/vcr.rb#452
331
+ def initialize_fibers; end
332
+
333
+ # source://vcr//lib/vcr.rb#461
334
+ def initialize_ivars; end
335
+
336
+ # source://vcr//lib/vcr.rb#431
337
+ def set_context_value(name, value); end
338
+
339
+ class << self
340
+ # @private
341
+ #
342
+ # source://vcr//lib/vcr/deprecations.rb#10
343
+ def const_missing(const); end
344
+ end
345
+ end
346
+
347
+ # The media VCR uses to store HTTP interactions for later re-use.
348
+ #
349
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#2
350
+ class VCR::Cassette
351
+ include ::VCR::Logger::Mixin
352
+
353
+ # @param name [#to_s] The name of the cassette. VCR will sanitize
354
+ # this to ensure it is a valid file name.
355
+ # @param options [Hash] The cassette options. The given options will
356
+ # be merged with the configured default_cassette_options.
357
+ # @return [Cassette] a new instance of Cassette
358
+ # @see VCR#insert_cassette
359
+ #
360
+ # source://vcr//lib/vcr/cassette.rb#55
361
+ def initialize(name, options = T.unsafe(nil)); end
362
+
363
+ # @return [Boolean, nil] Should outdated interactions be recorded back to file
364
+ #
365
+ # source://vcr//lib/vcr/cassette.rb#47
366
+ def clean_outdated_http_interactions; end
367
+
368
+ # Ejects the current cassette. The cassette will no longer be used.
369
+ # In addition, any newly recorded HTTP interactions will be written to
370
+ # disk.
371
+ #
372
+ # @note This is not intended to be called directly. Use `VCR.eject_cassette` instead.
373
+ # @see VCR#eject_cassette
374
+ #
375
+ # source://vcr//lib/vcr/cassette.rb#75
376
+ def eject(options = T.unsafe(nil)); end
377
+
378
+ # @return [Boolean, Hash] The cassette's ERB option. The file will be treated as an
379
+ # ERB template if this has a truthy value. A hash, if provided, will be used as local
380
+ # variables for the ERB template.
381
+ #
382
+ # source://vcr//lib/vcr/cassette.rb#41
383
+ def erb; end
384
+
385
+ # @note VCR will take care of sanitizing the cassette name to make it a valid file name.
386
+ # @raise [NotImplementedError] if the configured cassette persister
387
+ # does not support resolving file paths.
388
+ # @return [String] The file for this cassette.
389
+ #
390
+ # source://vcr//lib/vcr/cassette.rb#129
391
+ def file; end
392
+
393
+ # @private
394
+ #
395
+ # source://vcr//lib/vcr/cassette.rb#99
396
+ def http_interactions; end
397
+
398
+ # @return [Boolean] false unless wrapped with LinkedCassette
399
+ #
400
+ # source://vcr//lib/vcr/cassette.rb#168
401
+ def linked?; end
402
+
403
+ # @return [Array<Symbol, #call>] List of request matchers. Used to find a response from an
404
+ # existing HTTP interaction to play back.
405
+ #
406
+ # source://vcr//lib/vcr/cassette.rb#36
407
+ def match_requests_on; end
408
+
409
+ # @return [#to_s] The name of the cassette. Used to determine the cassette's file name.
410
+ # @see #file
411
+ #
412
+ # source://vcr//lib/vcr/cassette.rb#21
413
+ def name; end
414
+
415
+ # @private
416
+ #
417
+ # source://vcr//lib/vcr/cassette.rb#121
418
+ def new_recorded_interactions; end
419
+
420
+ # @example
421
+ #
422
+ # VCR.use_cassette("some cassette") do |cassette|
423
+ # Timecop.freeze(cassette.originally_recorded_at || Time.now) do
424
+ # # ...
425
+ # end
426
+ # end
427
+ # @return [Time, nil] The `recorded_at` time of the first HTTP interaction
428
+ # or nil if the cassette has no prior HTTP interactions.
429
+ #
430
+ # source://vcr//lib/vcr/cassette.rb#163
431
+ def originally_recorded_at; end
432
+
433
+ # @return [Integer, nil] How frequently (in seconds) the cassette should be re-recorded.
434
+ #
435
+ # source://vcr//lib/vcr/cassette.rb#44
436
+ def re_record_interval; end
437
+
438
+ # @private
439
+ #
440
+ # source://vcr//lib/vcr/cassette.rb#113
441
+ def record_http_interaction(interaction); end
442
+
443
+ # @return [Symbol] The record mode. Determines whether the cassette records HTTP interactions,
444
+ # plays them back, or does both.
445
+ #
446
+ # source://vcr//lib/vcr/cassette.rb#25
447
+ def record_mode; end
448
+
449
+ # @return [Boolean] The cassette's record_on_error mode. When the code that uses the cassette
450
+ # raises an error (for example a test failure) and record_on_error is set to false, no
451
+ # cassette will be recorded. This is useful when you are TDD'ing an API integration: when
452
+ # an error is raised that often means your request is invalid, so you don't want the cassette
453
+ # to be recorded.
454
+ #
455
+ # source://vcr//lib/vcr/cassette.rb#32
456
+ def record_on_error; end
457
+
458
+ # @return [Boolean] Whether or not the cassette is recording.
459
+ #
460
+ # source://vcr//lib/vcr/cassette.rb#137
461
+ def recording?; end
462
+
463
+ # @private
464
+ #
465
+ # source://vcr//lib/vcr/cassette.rb#84
466
+ def run_failed!; end
467
+
468
+ # @private
469
+ # @return [Boolean]
470
+ #
471
+ # source://vcr//lib/vcr/cassette.rb#89
472
+ def run_failed?; end
473
+
474
+ # @return [Hash] The hash that will be serialized when the cassette is written to disk.
475
+ #
476
+ # source://vcr//lib/vcr/cassette.rb#146
477
+ def serializable_hash; end
478
+
479
+ # @return [Boolean]
480
+ #
481
+ # source://vcr//lib/vcr/cassette.rb#94
482
+ def should_write_recorded_interactions_to_disk?; end
483
+
484
+ # @return [Array<Symbol>] If set, {VCR::Configuration#before_record} and
485
+ # {VCR::Configuration#before_playback} hooks with a corresponding tag will apply.
486
+ #
487
+ # source://vcr//lib/vcr/cassette.rb#51
488
+ def tags; end
489
+
490
+ private
491
+
492
+ # source://vcr//lib/vcr/cassette.rb#174
493
+ def assert_valid_options!; end
494
+
495
+ # source://vcr//lib/vcr/cassette.rb#201
496
+ def assign_tags; end
497
+
498
+ # source://vcr//lib/vcr/cassette.rb#312
499
+ def deserialized_hash; end
500
+
501
+ # source://vcr//lib/vcr/cassette.rb#187
502
+ def extract_options; end
503
+
504
+ # source://vcr//lib/vcr/cassette.rb#288
505
+ def interactions_to_record; end
506
+
507
+ # source://vcr//lib/vcr/cassette.rb#304
508
+ def invoke_hook(type, interactions); end
509
+
510
+ # source://vcr//lib/vcr/cassette.rb#325
511
+ def log_prefix; end
512
+
513
+ # source://vcr//lib/vcr/cassette.rb#270
514
+ def merged_interactions; end
515
+
516
+ # source://vcr//lib/vcr/cassette.rb#209
517
+ def previously_recorded_interactions; end
518
+
519
+ # source://vcr//lib/vcr/cassette.rb#227
520
+ def raise_error_unless_valid_record_mode; end
521
+
522
+ # source://vcr//lib/vcr/cassette.rb#266
523
+ def raw_cassette_bytes; end
524
+
525
+ # source://vcr//lib/vcr/cassette.rb#329
526
+ def request_summary(request); end
527
+
528
+ # @return [Boolean]
529
+ #
530
+ # source://vcr//lib/vcr/cassette.rb#262
531
+ def should_assert_no_unused_interactions?; end
532
+
533
+ # @return [Boolean]
534
+ #
535
+ # source://vcr//lib/vcr/cassette.rb#233
536
+ def should_re_record?(record_mode); end
537
+
538
+ # @return [Boolean]
539
+ #
540
+ # source://vcr//lib/vcr/cassette.rb#258
541
+ def should_remove_matching_existing_interactions?; end
542
+
543
+ # @return [Boolean]
544
+ #
545
+ # source://vcr//lib/vcr/cassette.rb#254
546
+ def should_stub_requests?; end
547
+
548
+ # source://vcr//lib/vcr/cassette.rb#223
549
+ def storage_key; end
550
+
551
+ # source://vcr//lib/vcr/cassette.rb#283
552
+ def up_to_date_interactions(interactions); end
553
+
554
+ # source://vcr//lib/vcr/cassette.rb#296
555
+ def write_recorded_interactions_to_disk; end
556
+
557
+ class << self
558
+ # @private
559
+ #
560
+ # source://vcr//lib/vcr/deprecations.rb#17
561
+ def const_missing(const); end
562
+ end
563
+ end
564
+
565
+ # @private
566
+ #
567
+ # source://vcr//lib/vcr/cassette/erb_renderer.rb#6
568
+ class VCR::Cassette::ERBRenderer
569
+ # @return [ERBRenderer] a new instance of ERBRenderer
570
+ #
571
+ # source://vcr//lib/vcr/cassette/erb_renderer.rb#7
572
+ def initialize(raw_template, erb, cassette_name = T.unsafe(nil)); end
573
+
574
+ # source://vcr//lib/vcr/cassette/erb_renderer.rb#11
575
+ def render; end
576
+
577
+ private
578
+
579
+ # source://vcr//lib/vcr/cassette/erb_renderer.rb#52
580
+ def binding_for_variables; end
581
+
582
+ # source://vcr//lib/vcr/cassette/erb_renderer.rb#34
583
+ def erb_variables; end
584
+
585
+ # @raise [Errors::MissingERBVariableError]
586
+ #
587
+ # source://vcr//lib/vcr/cassette/erb_renderer.rb#21
588
+ def handle_name_error(e); end
589
+
590
+ # source://vcr//lib/vcr/cassette/erb_renderer.rb#38
591
+ def template; end
592
+
593
+ # @return [Boolean]
594
+ #
595
+ # source://vcr//lib/vcr/cassette/erb_renderer.rb#30
596
+ def use_erb?; end
597
+
598
+ # source://vcr//lib/vcr/cassette/erb_renderer.rb#48
599
+ def variables_object; end
600
+ end
601
+
602
+ # @private
603
+ #
604
+ # source://vcr//lib/vcr/cassette/serializers.rb#49
605
+ module VCR::Cassette::EncodingErrorHandling
606
+ # source://vcr//lib/vcr/cassette/serializers.rb#50
607
+ def handle_encoding_errors; end
608
+ end
609
+
610
+ # @private
611
+ #
612
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#4
613
+ class VCR::Cassette::HTTPInteractionList
614
+ include ::VCR::Logger::Mixin
615
+
616
+ # @return [HTTPInteractionList] a new instance of HTTPInteractionList
617
+ #
618
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#18
619
+ def initialize(interactions, request_matchers, allow_playback_repeats = T.unsafe(nil), parent_list = T.unsafe(nil), log_prefix = T.unsafe(nil)); end
620
+
621
+ # Returns the value of attribute allow_playback_repeats.
622
+ #
623
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16
624
+ def allow_playback_repeats; end
625
+
626
+ # Checks if there are no unused interactions left.
627
+ #
628
+ # @raise [VCR::Errors::UnusedHTTPInteractionError] if not all interactions were played back.
629
+ #
630
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#65
631
+ def assert_no_unused_interactions!; end
632
+
633
+ # @return [Boolean]
634
+ #
635
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#48
636
+ def has_interaction_matching?(request); end
637
+
638
+ # @return [Boolean]
639
+ #
640
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#54
641
+ def has_used_interaction_matching?(request); end
642
+
643
+ # Returns the value of attribute interactions.
644
+ #
645
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16
646
+ def interactions; end
647
+
648
+ # Returns the value of attribute parent_list.
649
+ #
650
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16
651
+ def parent_list; end
652
+
653
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#58
654
+ def remaining_unused_interaction_count; end
655
+
656
+ # Returns the value of attribute request_matchers.
657
+ #
658
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16
659
+ def request_matchers; end
660
+
661
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#31
662
+ def response_for(request); end
663
+
664
+ private
665
+
666
+ # @return [Boolean] Whether or not there are unused interactions left in the list.
667
+ #
668
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#79
669
+ def has_unused_interactions?; end
670
+
671
+ # @return [Boolean]
672
+ #
673
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#96
674
+ def interaction_matches_request?(request, interaction); end
675
+
676
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#107
677
+ def log_prefix; end
678
+
679
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#87
680
+ def matching_interaction_index_for(request); end
681
+
682
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#91
683
+ def matching_used_interaction_for(request); end
684
+
685
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#83
686
+ def request_summary(request); end
687
+ end
688
+
689
+ # @private
690
+ #
691
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#8
692
+ module VCR::Cassette::HTTPInteractionList::NullList
693
+ extend ::VCR::Cassette::HTTPInteractionList::NullList
694
+
695
+ # @return [Boolean]
696
+ #
697
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#11
698
+ def has_interaction_matching?(*a); end
699
+
700
+ # @return [Boolean]
701
+ #
702
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#12
703
+ def has_used_interaction_matching?(*a); end
704
+
705
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#13
706
+ def remaining_unused_interaction_count(*a); end
707
+
708
+ # source://vcr//lib/vcr/cassette/http_interaction_list.rb#10
709
+ def response_for(*a); end
710
+ end
711
+
712
+ # Keeps track of the cassette persisters in a hash-like object.
713
+ #
714
+ # source://vcr//lib/vcr/cassette/persisters.rb#4
715
+ class VCR::Cassette::Persisters
716
+ # @private
717
+ # @return [Persisters] a new instance of Persisters
718
+ #
719
+ # source://vcr//lib/vcr/cassette/persisters.rb#8
720
+ def initialize; end
721
+
722
+ # Gets the named persister.
723
+ #
724
+ # @param name [Symbol] the name of the persister
725
+ # @raise [ArgumentError] if there is not a persister for the given name
726
+ # @return the named persister
727
+ #
728
+ # source://vcr//lib/vcr/cassette/persisters.rb#17
729
+ def [](name); end
730
+
731
+ # Registers a persister.
732
+ #
733
+ # @param name [Symbol] the name of the persister
734
+ # @param value [#[], #[]=] the persister object. It must implement `[]` and `[]=`.
735
+ #
736
+ # source://vcr//lib/vcr/cassette/persisters.rb#31
737
+ def []=(name, value); end
738
+ end
739
+
740
+ # The only built-in cassette persister. Persists cassettes to the file system.
741
+ #
742
+ # source://vcr//lib/vcr/cassette/persisters/file_system.rb#7
743
+ module VCR::Cassette::Persisters::FileSystem
744
+ extend ::VCR::Cassette::Persisters::FileSystem
745
+
746
+ # Gets the cassette for the given storage key (file name).
747
+ #
748
+ # @param file_name [String] the file name
749
+ # @return [String] the cassette content
750
+ #
751
+ # source://vcr//lib/vcr/cassette/persisters/file_system.rb#23
752
+ def [](file_name); end
753
+
754
+ # Sets the cassette for the given storage key (file name).
755
+ #
756
+ # @param file_name [String] the file name
757
+ # @param content [String] the content to store
758
+ #
759
+ # source://vcr//lib/vcr/cassette/persisters/file_system.rb#33
760
+ def []=(file_name, content); end
761
+
762
+ # @private
763
+ #
764
+ # source://vcr//lib/vcr/cassette/persisters/file_system.rb#41
765
+ def absolute_path_to_file(file_name); end
766
+
767
+ # @private
768
+ #
769
+ # source://vcr//lib/vcr/cassette/persisters/file_system.rb#11
770
+ def storage_location; end
771
+
772
+ # @private
773
+ #
774
+ # source://vcr//lib/vcr/cassette/persisters/file_system.rb#14
775
+ def storage_location=(dir); end
776
+
777
+ private
778
+
779
+ # source://vcr//lib/vcr/cassette/persisters/file_system.rb#47
780
+ def absolute_path_for(path); end
781
+
782
+ # @return [Boolean]
783
+ #
784
+ # source://vcr//lib/vcr/cassette/persisters/file_system.rb#63
785
+ def downcase_cassette_names?; end
786
+
787
+ # source://vcr//lib/vcr/cassette/persisters/file_system.rb#51
788
+ def sanitized_file_name_from(file_name); end
789
+ end
790
+
791
+ # Keeps track of the cassette serializers in a hash-like object.
792
+ #
793
+ # source://vcr//lib/vcr/cassette/serializers.rb#4
794
+ class VCR::Cassette::Serializers
795
+ # @private
796
+ # @return [Serializers] a new instance of Serializers
797
+ #
798
+ # source://vcr//lib/vcr/cassette/serializers.rb#12
799
+ def initialize; end
800
+
801
+ # Gets the named serializer.
802
+ #
803
+ # @param name [Symbol] the name of the serializer
804
+ # @raise [ArgumentError] if there is not a serializer for the given name
805
+ # @return the named serializer
806
+ #
807
+ # source://vcr//lib/vcr/cassette/serializers.rb#21
808
+ def [](name); end
809
+
810
+ # Registers a serializer.
811
+ #
812
+ # @param name [Symbol] the name of the serializer
813
+ # @param value [#file_extension, #serialize, #deserialize] the serializer object. It must implement
814
+ # `file_extension()`, `serialize(Hash)` and `deserialize(String)`.
815
+ #
816
+ # source://vcr//lib/vcr/cassette/serializers.rb#39
817
+ def []=(name, value); end
818
+ end
819
+
820
+ # The compressed serializer. This serializer wraps the YAML serializer
821
+ # to write compressed cassettes to disk.
822
+ #
823
+ # Cassettes containing responses with JSON data often compress at greater
824
+ # than 10:1. The tradeoff is that cassettes will not diff nicely or be
825
+ # easily inspectable or editable.
826
+ #
827
+ # @see YAML
828
+ #
829
+ # source://vcr//lib/vcr/cassette/serializers/compressed.rb#15
830
+ module VCR::Cassette::Serializers::Compressed
831
+ extend ::VCR::Cassette::Serializers::Compressed
832
+
833
+ # Deserializes the given compressed cassette data.
834
+ #
835
+ # @param string [String] the compressed YAML cassette data
836
+ # @return [Hash] the deserialized object
837
+ #
838
+ # source://vcr//lib/vcr/cassette/serializers/compressed.rb#38
839
+ def deserialize(string); end
840
+
841
+ # The file extension to use for this serializer.
842
+ #
843
+ # @return [String] "zz"
844
+ #
845
+ # source://vcr//lib/vcr/cassette/serializers/compressed.rb#21
846
+ def file_extension; end
847
+
848
+ # Serializes the given hash using YAML and Zlib.
849
+ #
850
+ # @param hash [Hash] the object to serialize
851
+ # @return [String] the compressed cassette data
852
+ #
853
+ # source://vcr//lib/vcr/cassette/serializers/compressed.rb#29
854
+ def serialize(hash); end
855
+ end
856
+
857
+ # The JSON serializer.
858
+ #
859
+ # @see Psych
860
+ # @see Syck
861
+ # @see YAML
862
+ #
863
+ # source://vcr//lib/vcr/cassette/serializers/json.rb#11
864
+ module VCR::Cassette::Serializers::JSON
865
+ extend ::VCR::Cassette::Serializers::JSON
866
+ extend ::VCR::Cassette::EncodingErrorHandling
867
+ extend ::VCR::Cassette::SyntaxErrorHandling
868
+
869
+ # Deserializes the given string using `JSON`.
870
+ #
871
+ # @param string [String] the JSON string
872
+ # @return [Hash] the deserialized object
873
+ #
874
+ # source://vcr//lib/vcr/cassette/serializers/json.rb#44
875
+ def deserialize(string); end
876
+
877
+ # The file extension to use for this serializer.
878
+ #
879
+ # @return [String] "json"
880
+ #
881
+ # source://vcr//lib/vcr/cassette/serializers/json.rb#26
882
+ def file_extension; end
883
+
884
+ # Serializes the given hash using `JSON`.
885
+ #
886
+ # @param hash [Hash] the object to serialize
887
+ # @return [String] the JSON string
888
+ #
889
+ # source://vcr//lib/vcr/cassette/serializers/json.rb#34
890
+ def serialize(hash); end
891
+ end
892
+
893
+ # @private
894
+ #
895
+ # source://vcr//lib/vcr/cassette/serializers/json.rb#17
896
+ VCR::Cassette::Serializers::JSON::ENCODING_ERRORS = T.let(T.unsafe(nil), Array)
897
+
898
+ # @private
899
+ #
900
+ # source://vcr//lib/vcr/cassette/serializers/json.rb#21
901
+ VCR::Cassette::Serializers::JSON::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array)
902
+
903
+ # The Psych serializer. Psych is the new YAML engine in ruby 1.9.
904
+ #
905
+ # @see JSON
906
+ # @see Syck
907
+ # @see YAML
908
+ #
909
+ # source://vcr//lib/vcr/cassette/serializers/psych.rb#11
910
+ module VCR::Cassette::Serializers::Psych
911
+ extend ::VCR::Cassette::Serializers::Psych
912
+ extend ::VCR::Cassette::EncodingErrorHandling
913
+ extend ::VCR::Cassette::SyntaxErrorHandling
914
+
915
+ # Deserializes the given string using Psych.
916
+ #
917
+ # @param string [String] the YAML string
918
+ # @return [Hash] the deserialized object
919
+ #
920
+ # source://vcr//lib/vcr/cassette/serializers/psych.rb#45
921
+ def deserialize(string); end
922
+
923
+ # The file extension to use for this serializer.
924
+ #
925
+ # @return [String] "yml"
926
+ #
927
+ # source://vcr//lib/vcr/cassette/serializers/psych.rb#25
928
+ def file_extension; end
929
+
930
+ # Serializes the given hash using Psych.
931
+ #
932
+ # @param hash [Hash] the object to serialize
933
+ # @return [String] the YAML string
934
+ #
935
+ # source://vcr//lib/vcr/cassette/serializers/psych.rb#33
936
+ def serialize(hash); end
937
+ end
938
+
939
+ # @private
940
+ #
941
+ # source://vcr//lib/vcr/cassette/serializers/psych.rb#17
942
+ VCR::Cassette::Serializers::Psych::ENCODING_ERRORS = T.let(T.unsafe(nil), Array)
943
+
944
+ # @private
945
+ #
946
+ # source://vcr//lib/vcr/cassette/serializers/psych.rb#20
947
+ VCR::Cassette::Serializers::Psych::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array)
948
+
949
+ # The Syck serializer. Syck is the legacy YAML engine in ruby 1.8 and 1.9.
950
+ #
951
+ # @see JSON
952
+ # @see Psych
953
+ # @see YAML
954
+ #
955
+ # source://vcr//lib/vcr/cassette/serializers/syck.rb#11
956
+ module VCR::Cassette::Serializers::Syck
957
+ extend ::VCR::Cassette::Serializers::Syck
958
+ extend ::VCR::Cassette::EncodingErrorHandling
959
+ extend ::VCR::Cassette::SyntaxErrorHandling
960
+
961
+ # Deserializes the given string using Syck.
962
+ #
963
+ # @param string [String] the YAML string
964
+ # @return [Hash] the deserialized object
965
+ #
966
+ # source://vcr//lib/vcr/cassette/serializers/syck.rb#43
967
+ def deserialize(string); end
968
+
969
+ # The file extension to use for this serializer.
970
+ #
971
+ # @return [String] "yml"
972
+ #
973
+ # source://vcr//lib/vcr/cassette/serializers/syck.rb#25
974
+ def file_extension; end
975
+
976
+ # Serializes the given hash using Syck.
977
+ #
978
+ # @param hash [Hash] the object to serialize
979
+ # @return [String] the YAML string
980
+ #
981
+ # source://vcr//lib/vcr/cassette/serializers/syck.rb#33
982
+ def serialize(hash); end
983
+
984
+ private
985
+
986
+ # source://vcr//lib/vcr/cassette/serializers/syck.rb#53
987
+ def using_syck; end
988
+ end
989
+
990
+ # @private
991
+ #
992
+ # source://vcr//lib/vcr/cassette/serializers/syck.rb#17
993
+ VCR::Cassette::Serializers::Syck::ENCODING_ERRORS = T.let(T.unsafe(nil), Array)
994
+
995
+ # @private
996
+ #
997
+ # source://vcr//lib/vcr/cassette/serializers/syck.rb#20
998
+ VCR::Cassette::Serializers::Syck::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array)
999
+
1000
+ # The YAML serializer. This will use either Psych or Syck, which ever your
1001
+ # ruby interpreter defaults to. You can also force VCR to use Psych or Syck by
1002
+ # using one of those serializers.
1003
+ #
1004
+ # @see JSON
1005
+ # @see Psych
1006
+ # @see Syck
1007
+ #
1008
+ # source://vcr//lib/vcr/cassette/serializers/yaml.rb#13
1009
+ module VCR::Cassette::Serializers::YAML
1010
+ extend ::VCR::Cassette::Serializers::YAML
1011
+ extend ::VCR::Cassette::EncodingErrorHandling
1012
+ extend ::VCR::Cassette::SyntaxErrorHandling
1013
+
1014
+ # Deserializes the given string using YAML.
1015
+ #
1016
+ # @param string [String] the YAML string
1017
+ # @return [Hash] the deserialized object
1018
+ #
1019
+ # source://vcr//lib/vcr/cassette/serializers/yaml.rb#47
1020
+ def deserialize(string); end
1021
+
1022
+ # The file extension to use for this serializer.
1023
+ #
1024
+ # @return [String] "yml"
1025
+ #
1026
+ # source://vcr//lib/vcr/cassette/serializers/yaml.rb#27
1027
+ def file_extension; end
1028
+
1029
+ # Serializes the given hash using YAML.
1030
+ #
1031
+ # @param hash [Hash] the object to serialize
1032
+ # @return [String] the YAML string
1033
+ #
1034
+ # source://vcr//lib/vcr/cassette/serializers/yaml.rb#35
1035
+ def serialize(hash); end
1036
+ end
1037
+
1038
+ # @private
1039
+ #
1040
+ # source://vcr//lib/vcr/cassette/serializers/yaml.rb#19
1041
+ VCR::Cassette::Serializers::YAML::ENCODING_ERRORS = T.let(T.unsafe(nil), Array)
1042
+
1043
+ # @private
1044
+ #
1045
+ # source://vcr//lib/vcr/cassette/serializers/yaml.rb#22
1046
+ VCR::Cassette::Serializers::YAML::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array)
1047
+
1048
+ # @private
1049
+ #
1050
+ # source://vcr//lib/vcr/cassette/serializers.rb#59
1051
+ module VCR::Cassette::SyntaxErrorHandling
1052
+ # source://vcr//lib/vcr/cassette/serializers.rb#60
1053
+ def handle_syntax_errors; end
1054
+ end
1055
+
1056
+ # The supported record modes.
1057
+ #
1058
+ # * :all -- Record every HTTP interactions; do not play any back.
1059
+ # * :none -- Do not record any HTTP interactions; play them back.
1060
+ # * :new_episodes -- Playback previously recorded HTTP interactions and record new ones.
1061
+ # * :once -- Record the HTTP interactions if the cassette has not already been recorded;
1062
+ # otherwise, playback the HTTP interactions.
1063
+ #
1064
+ # source://vcr//lib/vcr/cassette.rb#17
1065
+ VCR::Cassette::VALID_RECORD_MODES = T.let(T.unsafe(nil), Array)
1066
+
1067
+ # Mutex to synchronize access to cassettes in a threaded environment
1068
+ #
1069
+ # source://vcr//lib/vcr.rb#27
1070
+ VCR::CassetteMutex = T.let(T.unsafe(nil), Thread::Mutex)
1071
+
1072
+ # Stores the VCR configuration.
1073
+ #
1074
+ # source://vcr//lib/vcr/configuration.rb#7
1075
+ class VCR::Configuration
1076
+ include ::VCR::VariableArgsBlockCaller
1077
+ include ::VCR::Hooks
1078
+ include ::VCR::Configuration::DefinedHooks
1079
+ include ::VCR::Logger::Mixin
1080
+ extend ::VCR::Hooks::ClassMethods
1081
+
1082
+ # @return [Configuration] a new instance of Configuration
1083
+ #
1084
+ # source://vcr//lib/vcr/configuration.rb#490
1085
+ def initialize; end
1086
+
1087
+ # Adds a callback that will be called with each HTTP request after it is complete.
1088
+ #
1089
+ # @example
1090
+ # VCR.configure do |c|
1091
+ # c.after_http_request(:ignored?) do |request, response|
1092
+ # puts "Request: #{request.method} #{request.uri}"
1093
+ # puts "Response: #{response.status.code}"
1094
+ # end
1095
+ # end
1096
+ # @param filters [optional splat of #to_proc] one or more filters to apply.
1097
+ # The objects provided will be converted to procs using `#to_proc`. If provided,
1098
+ # the callback will only be invoked if these procs all return `true`.
1099
+ # @see #before_http_request
1100
+ # @see #around_http_request
1101
+ # @yield the callback
1102
+ # @yieldparam request [VCR::Request::Typed] the request that is being made
1103
+ # @yieldparam response [VCR::Response] the response from the request
1104
+ #
1105
+ # source://vcr//lib/vcr/configuration.rb#366
1106
+ def after_http_request(*filters); end
1107
+
1108
+ # Determines how VCR treats HTTP requests that are made when
1109
+ # no VCR cassette is in use. When set to `true`, requests made
1110
+ # when there is no VCR cassette in use will be allowed. When set
1111
+ # to `false` (the default), an {VCR::Errors::UnhandledHTTPRequestError}
1112
+ # will be raised for any HTTP request made when there is no
1113
+ # cassette in use.
1114
+ #
1115
+ # @overload allow_http_connections_when_no_cassette?
1116
+ # @overload allow_http_connections_when_no_cassette=
1117
+ #
1118
+ # source://vcr//lib/vcr/configuration.rb#129
1119
+ def allow_http_connections_when_no_cassette=(_arg0); end
1120
+
1121
+ # @private (documented above)
1122
+ # @return [Boolean]
1123
+ #
1124
+ # source://vcr//lib/vcr/configuration.rb#131
1125
+ def allow_http_connections_when_no_cassette?; end
1126
+
1127
+ # Adds a callback that will be executed around each HTTP request.
1128
+ #
1129
+ # @example
1130
+ # VCR.configure do |c|
1131
+ # c.around_http_request(lambda {|r| r.uri =~ /api.geocoder.com/}) do |request|
1132
+ # # extract an address like "1700 E Pine St, Seattle, WA"
1133
+ # # from a query like "address=1700+E+Pine+St%2C+Seattle%2C+WA"
1134
+ # address = CGI.unescape(URI(request.uri).query.split('=').last)
1135
+ # VCR.use_cassette("geocoding/#{address}", &request)
1136
+ # end
1137
+ # end
1138
+ # @note This method can only be used on ruby interpreters that support
1139
+ # fibers (i.e. 1.9+). On 1.8 you can use separate `before_http_request` and
1140
+ # `after_http_request` hooks.
1141
+ # @note You _must_ call `request.proceed` or pass the request as a proc on to a
1142
+ # method that yields to a block (i.e. `some_method(&request)`).
1143
+ # @param filters [optional splat of #to_proc] one or more filters to apply.
1144
+ # The objects provided will be converted to procs using `#to_proc`. If provided,
1145
+ # the callback will only be invoked if these procs all return `true`.
1146
+ # @raise [VCR::Errors::NotSupportedError] if the fiber library cannot be loaded.
1147
+ # @see #before_http_request
1148
+ # @see #after_http_request
1149
+ # @yield the callback
1150
+ # @yieldparam request [VCR::Request::FiberAware] the request that is being made
1151
+ #
1152
+ # source://vcr//lib/vcr/configuration.rb#395
1153
+ def around_http_request(*filters, &block); end
1154
+
1155
+ # Adds a callback that will be called before a previously recorded
1156
+ # HTTP interaction is loaded for playback.
1157
+ #
1158
+ # @example
1159
+ # VCR.configure do |c|
1160
+ # # Don't playback transient 5xx errors
1161
+ # c.before_playback do |interaction|
1162
+ # interaction.ignore! if interaction.response.status.code >= 500
1163
+ # end
1164
+ #
1165
+ # # Change a response header for playback
1166
+ # c.before_playback(:twilio) do |interaction|
1167
+ # interaction.response.headers['X-Foo-Bar'] = 'Bazz'
1168
+ # end
1169
+ # end
1170
+ # @param tag [(optional) Symbol] Used to apply this hook to only cassettes that match
1171
+ # the given tag.
1172
+ # @see #before_record
1173
+ # @yield the callback
1174
+ # @yieldparam interaction [VCR::HTTPInteraction::HookAware] The interaction that is being
1175
+ # loaded.
1176
+ # @yieldparam cassette [(optional) VCR::Cassette] The current cassette.
1177
+ #
1178
+ # source://vcr//lib/vcr/configuration.rb#325
1179
+ def before_playback(tag = T.unsafe(nil), &block); end
1180
+
1181
+ # Adds a callback that will be called before the recorded HTTP interactions
1182
+ # are serialized and written to disk.
1183
+ #
1184
+ # @example
1185
+ # VCR.configure do |c|
1186
+ # # Don't record transient 5xx errors
1187
+ # c.before_record do |interaction|
1188
+ # interaction.ignore! if interaction.response.status.code >= 500
1189
+ # end
1190
+ #
1191
+ # # Modify the response body for cassettes tagged with :twilio
1192
+ # c.before_record(:twilio) do |interaction|
1193
+ # interaction.response.body.downcase!
1194
+ # end
1195
+ # end
1196
+ # @param tag [(optional) Symbol] Used to apply this hook to only cassettes that match
1197
+ # the given tag.
1198
+ # @see #before_playback
1199
+ # @yield the callback
1200
+ # @yieldparam interaction [VCR::HTTPInteraction::HookAware] The interaction that will be
1201
+ # serialized and written to disk.
1202
+ # @yieldparam cassette [(optional) VCR::Cassette] The current cassette.
1203
+ #
1204
+ # source://vcr//lib/vcr/configuration.rb#297
1205
+ def before_record(tag = T.unsafe(nil), &block); end
1206
+
1207
+ # Gets the directory to read cassettes from and write cassettes to.
1208
+ #
1209
+ # @return [String] the directory to read cassettes from and write cassettes to
1210
+ #
1211
+ # source://vcr//lib/vcr/configuration.rb#15
1212
+ def cassette_library_dir; end
1213
+
1214
+ # Sets the directory to read cassettes from and writes cassettes to.
1215
+ #
1216
+ # @example
1217
+ # VCR.configure do |c|
1218
+ # c.cassette_library_dir = 'spec/cassettes'
1219
+ # end
1220
+ # @note This is only necessary if you use the `:file_system`
1221
+ # cassette persister (the default).
1222
+ # @param dir [String] the directory to read cassettes from and write cassettes to
1223
+ # @return [void]
1224
+ #
1225
+ # source://vcr//lib/vcr/configuration.rb#30
1226
+ def cassette_library_dir=(dir); end
1227
+
1228
+ # Gets the registry of cassette persisters. Use it to register a custom persister.
1229
+ #
1230
+ # @example
1231
+ # VCR.configure do |c|
1232
+ # c.cassette_persisters[:my_custom_persister] = my_custom_persister
1233
+ # end
1234
+ # @note Custom persisters must implement the following interface:
1235
+ #
1236
+ # * `persister[storage_key]` # returns previously persisted content
1237
+ # * `persister[storage_key] = content` # persists given content
1238
+ # @return [VCR::Cassette::Persisters] the cassette persister registry object.
1239
+ #
1240
+ # source://vcr//lib/vcr/configuration.rb#269
1241
+ def cassette_persisters; end
1242
+
1243
+ # Gets the registry of cassette serializers. Use it to register a custom serializer.
1244
+ #
1245
+ # @example
1246
+ # VCR.configure do |c|
1247
+ # c.cassette_serializers[:my_custom_serializer] = my_custom_serializer
1248
+ # end
1249
+ # @note Custom serializers must implement the following interface:
1250
+ #
1251
+ # * `file_extension # => String`
1252
+ # * `serialize(Hash) # => String`
1253
+ # * `deserialize(String) # => Hash`
1254
+ # @return [VCR::Cassette::Serializers] the cassette serializer registry object.
1255
+ #
1256
+ # source://vcr//lib/vcr/configuration.rb#253
1257
+ def cassette_serializers; end
1258
+
1259
+ # Configures RSpec to use a VCR cassette for any example
1260
+ # tagged with `:vcr`.
1261
+ #
1262
+ # source://vcr//lib/vcr/configuration.rb#418
1263
+ def configure_rspec_metadata!; end
1264
+
1265
+ # An object to log debug output to.
1266
+ #
1267
+ # @example
1268
+ # VCR.configure do |c|
1269
+ # c.debug_logger = $stderr
1270
+ # end
1271
+ # @example
1272
+ # VCR.configure do |c|
1273
+ # c.debug_logger = File.open('vcr.log', 'w')
1274
+ # end
1275
+ # @overload debug_logger
1276
+ # @overload debug_logger=
1277
+ #
1278
+ # source://vcr//lib/vcr/configuration.rb#440
1279
+ def debug_logger; end
1280
+
1281
+ # @private (documented above)
1282
+ #
1283
+ # source://vcr//lib/vcr/configuration.rb#442
1284
+ def debug_logger=(value); end
1285
+
1286
+ # Default options to apply to every cassette.
1287
+ #
1288
+ # @example
1289
+ # VCR.configure do |c|
1290
+ # c.default_cassette_options = { :record => :new_episodes }
1291
+ # end
1292
+ # @note {VCR#insert_cassette} for the list of valid options.
1293
+ # @overload default_cassette_options
1294
+ # @overload default_cassette_options=
1295
+ #
1296
+ # source://vcr//lib/vcr/configuration.rb#46
1297
+ def default_cassette_options; end
1298
+
1299
+ # Sets the default options that apply to every cassette.
1300
+ #
1301
+ # source://vcr//lib/vcr/configuration.rb#49
1302
+ def default_cassette_options=(overrides); end
1303
+
1304
+ # Sets up a {#before_record} and a {#before_playback} hook that will
1305
+ # insert a placeholder string in the cassette in place of another string.
1306
+ # You can use this as a generic way to interpolate a variable into the
1307
+ # cassette for a unique string. It's particularly useful for unique
1308
+ # sensitive strings like API keys and passwords.
1309
+ #
1310
+ # @example
1311
+ # VCR.configure do |c|
1312
+ # # Put "<GITHUB_API_KEY>" in place of the actual API key in
1313
+ # # our cassettes so we don't have to commit to source control.
1314
+ # c.filter_sensitive_data('<GITHUB_API_KEY>') { GithubClient.api_key }
1315
+ #
1316
+ # # Put a "<USER_ID>" placeholder variable in our cassettes tagged with
1317
+ # # :user_cassette since it can be different for different test runs.
1318
+ # c.define_cassette_placeholder('<USER_ID>', :user_cassette) { User.last.id }
1319
+ # end
1320
+ # @param placeholder [String] The placeholder string.
1321
+ # @param tag [Symbol] Set this to apply this only to cassettes
1322
+ # with a matching tag; otherwise it will apply to every cassette.
1323
+ # @yield block that determines what string to replace
1324
+ # @yieldparam interaction [(optional) VCR::HTTPInteraction::HookAware] the HTTP interaction
1325
+ # @yieldreturn the string to replace
1326
+ #
1327
+ # source://vcr//lib/vcr/configuration.rb#225
1328
+ def define_cassette_placeholder(placeholder, tag = T.unsafe(nil), &block); end
1329
+
1330
+ # Sets up a {#before_record} and a {#before_playback} hook that will
1331
+ # insert a placeholder string in the cassette in place of another string.
1332
+ # You can use this as a generic way to interpolate a variable into the
1333
+ # cassette for a unique string. It's particularly useful for unique
1334
+ # sensitive strings like API keys and passwords.
1335
+ #
1336
+ # @example
1337
+ # VCR.configure do |c|
1338
+ # # Put "<GITHUB_API_KEY>" in place of the actual API key in
1339
+ # # our cassettes so we don't have to commit to source control.
1340
+ # c.filter_sensitive_data('<GITHUB_API_KEY>') { GithubClient.api_key }
1341
+ #
1342
+ # # Put a "<USER_ID>" placeholder variable in our cassettes tagged with
1343
+ # # :user_cassette since it can be different for different test runs.
1344
+ # c.define_cassette_placeholder('<USER_ID>', :user_cassette) { User.last.id }
1345
+ # end
1346
+ # @param placeholder [String] The placeholder string.
1347
+ # @param tag [Symbol] Set this to apply this only to cassettes
1348
+ # with a matching tag; otherwise it will apply to every cassette.
1349
+ # @yield block that determines what string to replace
1350
+ # @yieldparam interaction [(optional) VCR::HTTPInteraction::HookAware] the HTTP interaction
1351
+ # @yieldreturn the string to replace
1352
+ #
1353
+ # source://vcr//lib/vcr/configuration.rb#225
1354
+ def filter_sensitive_data(placeholder, tag = T.unsafe(nil), &block); end
1355
+
1356
+ # Configures which libraries VCR will hook into to intercept HTTP requests.
1357
+ #
1358
+ # @example
1359
+ # VCR.configure do |c|
1360
+ # c.hook_into :webmock, :typhoeus
1361
+ # end
1362
+ # @param hooks [Array<Symbol>] List of libraries. Valid values are
1363
+ # `:webmock`, `:typhoeus`, `:excon` and `:faraday`.
1364
+ # @raise [ArgumentError] when given an unsupported library name.
1365
+ # @raise [VCR::Errors::LibraryVersionTooLowError] when the version
1366
+ # of a library you are using is too low for VCR to support.
1367
+ #
1368
+ # source://vcr//lib/vcr/configuration.rb#65
1369
+ def hook_into(*hooks); end
1370
+
1371
+ # Specifies host(s) that VCR should ignore.
1372
+ #
1373
+ # @param hosts [Array<String>] List of hosts to ignore
1374
+ # @see #ignore_localhost=
1375
+ # @see #ignore_request
1376
+ #
1377
+ # source://vcr//lib/vcr/configuration.rb#75
1378
+ def ignore_host(*hosts); end
1379
+
1380
+ # Specifies host(s) that VCR should ignore.
1381
+ #
1382
+ # @param hosts [Array<String>] List of hosts to ignore
1383
+ # @see #ignore_localhost=
1384
+ # @see #ignore_request
1385
+ #
1386
+ # source://vcr//lib/vcr/configuration.rb#75
1387
+ def ignore_hosts(*hosts); end
1388
+
1389
+ # Sets whether or not VCR should ignore localhost requests.
1390
+ #
1391
+ # @param value [Boolean] the value to set
1392
+ # @see #ignore_hosts
1393
+ # @see #ignore_request
1394
+ #
1395
+ # source://vcr//lib/vcr/configuration.rb#94
1396
+ def ignore_localhost=(value); end
1397
+
1398
+ # Defines what requests to ignore using a block.
1399
+ #
1400
+ # @example
1401
+ # VCR.configure do |c|
1402
+ # c.ignore_request do |request|
1403
+ # uri = URI(request.uri)
1404
+ # # ignore only localhost requests to port 7500
1405
+ # uri.host == 'localhost' && uri.port == 7500
1406
+ # end
1407
+ # end
1408
+ # @yield the callback
1409
+ # @yieldparam request [VCR::Request] the HTTP request
1410
+ # @yieldreturn [Boolean] whether or not to ignore the request
1411
+ #
1412
+ # source://vcr//lib/vcr/configuration.rb#112
1413
+ def ignore_request(&block); end
1414
+
1415
+ # Logger object that provides logging APIs and helper methods.
1416
+ #
1417
+ # @private
1418
+ #
1419
+ # source://vcr//lib/vcr/configuration.rb#454
1420
+ def logger; end
1421
+
1422
+ # @param http_message [#body, #headers] the `VCR::Request` or `VCR::Response` object being serialized
1423
+ # @return [Boolean] whether or not the body of the given HTTP message should
1424
+ # be base64 encoded during serialization in order to preserve the bytes exactly.
1425
+ # @see #preserve_exact_body_bytes
1426
+ #
1427
+ # source://vcr//lib/vcr/configuration.rb#484
1428
+ def preserve_exact_body_bytes_for?(http_message); end
1429
+
1430
+ # Sets a parser for VCR to use when parsing query strings for request
1431
+ # comparisons. The new parser must implement a method `call` that returns
1432
+ # an object which is both equalivant and consistent when given an HTTP
1433
+ # query string of possibly differing value ordering.
1434
+ #
1435
+ # * `#== # => Boolean`
1436
+ #
1437
+ # The `#==` method must return true if both objects represent the
1438
+ # same query string.
1439
+ #
1440
+ # This defaults to `CGI.parse` from the ruby standard library.
1441
+ #
1442
+ # @overload query_parser
1443
+ # @overload query_parser=
1444
+ #
1445
+ # source://vcr//lib/vcr/configuration.rb#151
1446
+ def query_parser; end
1447
+
1448
+ # Sets a parser for VCR to use when parsing query strings for request
1449
+ # comparisons. The new parser must implement a method `call` that returns
1450
+ # an object which is both equalivant and consistent when given an HTTP
1451
+ # query string of possibly differing value ordering.
1452
+ #
1453
+ # * `#== # => Boolean`
1454
+ #
1455
+ # The `#==` method must return true if both objects represent the
1456
+ # same query string.
1457
+ #
1458
+ # This defaults to `CGI.parse` from the ruby standard library.
1459
+ #
1460
+ # @overload query_parser
1461
+ # @overload query_parser=
1462
+ #
1463
+ # source://vcr//lib/vcr/configuration.rb#151
1464
+ def query_parser=(_arg0); end
1465
+
1466
+ # Registers a request matcher for later use.
1467
+ #
1468
+ # @example
1469
+ # VCR.configure do |c|
1470
+ # c.register_request_matcher :port do |request_1, request_2|
1471
+ # URI(request_1.uri).port == URI(request_2.uri).port
1472
+ # end
1473
+ # end
1474
+ #
1475
+ # VCR.use_cassette("my_cassette", :match_requests_on => [:method, :host, :port]) do
1476
+ # # ...
1477
+ # end
1478
+ # @param name [Symbol] the name of the request matcher
1479
+ # @yield the request matcher
1480
+ # @yieldparam request_1 [VCR::Request] One request
1481
+ # @yieldparam request_2 [VCR::Request] The other request
1482
+ # @yieldreturn [Boolean] whether or not these two requests should be considered
1483
+ # equivalent
1484
+ #
1485
+ # source://vcr//lib/vcr/configuration.rb#198
1486
+ def register_request_matcher(name, &block); end
1487
+
1488
+ # @deprecated Use #hook_into instead.
1489
+ # @see #hook_into
1490
+ #
1491
+ # source://vcr//lib/vcr/deprecations.rb#26
1492
+ def stub_with(*adapters); end
1493
+
1494
+ # Specifies host(s) that VCR should stop ignoring.
1495
+ #
1496
+ # @param hosts [Array<String>] List of hosts to unignore
1497
+ # @see #ignore_hosts
1498
+ #
1499
+ # source://vcr//lib/vcr/configuration.rb#84
1500
+ def unignore_host(*hosts); end
1501
+
1502
+ # Specifies host(s) that VCR should stop ignoring.
1503
+ #
1504
+ # @param hosts [Array<String>] List of hosts to unignore
1505
+ # @see #ignore_hosts
1506
+ #
1507
+ # source://vcr//lib/vcr/configuration.rb#84
1508
+ def unignore_hosts(*hosts); end
1509
+
1510
+ # Sets a parser for VCR to use when parsing URIs. The new parser
1511
+ # must implement a method `parse` that returns an instance of the
1512
+ # URI object. This URI object must implement the following
1513
+ # interface:
1514
+ #
1515
+ # * `scheme # => String`
1516
+ # * `host # => String`
1517
+ # * `port # => Fixnum`
1518
+ # * `path # => String`
1519
+ # * `query # => String`
1520
+ # * `#port=`
1521
+ # * `#query=`
1522
+ # * `#to_s # => String`
1523
+ # * `#== # => Boolean`
1524
+ #
1525
+ # The `#==` method must return true if both URI objects represent the
1526
+ # same URI.
1527
+ #
1528
+ # This defaults to `URI` from the ruby standard library.
1529
+ #
1530
+ # @overload uri_parser
1531
+ # @overload uri_parser=
1532
+ #
1533
+ # source://vcr//lib/vcr/configuration.rb#177
1534
+ def uri_parser; end
1535
+
1536
+ # Sets a parser for VCR to use when parsing URIs. The new parser
1537
+ # must implement a method `parse` that returns an instance of the
1538
+ # URI object. This URI object must implement the following
1539
+ # interface:
1540
+ #
1541
+ # * `scheme # => String`
1542
+ # * `host # => String`
1543
+ # * `port # => Fixnum`
1544
+ # * `path # => String`
1545
+ # * `query # => String`
1546
+ # * `#port=`
1547
+ # * `#query=`
1548
+ # * `#to_s # => String`
1549
+ # * `#== # => Boolean`
1550
+ #
1551
+ # The `#==` method must return true if both URI objects represent the
1552
+ # same URI.
1553
+ #
1554
+ # This defaults to `URI` from the ruby standard library.
1555
+ #
1556
+ # @overload uri_parser
1557
+ # @overload uri_parser=
1558
+ #
1559
+ # source://vcr//lib/vcr/configuration.rb#177
1560
+ def uri_parser=(_arg0); end
1561
+
1562
+ private
1563
+
1564
+ # source://vcr//lib/vcr/configuration.rb#528
1565
+ def create_fiber_for(fiber_errors, hook_declaration, proc); end
1566
+
1567
+ # source://vcr//lib/vcr/configuration.rb#510
1568
+ def load_library_hook(hook); end
1569
+
1570
+ # source://vcr//lib/vcr/configuration.rb#581
1571
+ def log_prefix; end
1572
+
1573
+ # source://vcr//lib/vcr/configuration.rb#563
1574
+ def register_built_in_hooks; end
1575
+
1576
+ # source://vcr//lib/vcr/configuration.rb#558
1577
+ def request_filter_from(object); end
1578
+
1579
+ # source://vcr//lib/vcr/configuration.rb#518
1580
+ def resume_fiber(fiber, fiber_errors, response, hook_declaration); end
1581
+
1582
+ # source://vcr//lib/vcr/configuration.rb#547
1583
+ def start_new_fiber_for(request, fibers, fiber_errors, hook_declaration, proc); end
1584
+
1585
+ # source://vcr//lib/vcr/configuration.rb#553
1586
+ def tag_filter_from(tag); end
1587
+ end
1588
+
1589
+ # source://vcr//lib/vcr/configuration.rb#0
1590
+ module VCR::Configuration::DefinedHooks
1591
+ # source://vcr//lib/vcr/util/hooks.rb#55
1592
+ def after_http_request(*filters, &hook); end
1593
+
1594
+ # source://vcr//lib/vcr/util/hooks.rb#55
1595
+ def after_library_hooks_loaded(*filters, &hook); end
1596
+
1597
+ # source://vcr//lib/vcr/util/hooks.rb#55
1598
+ def before_http_request(*filters, &hook); end
1599
+
1600
+ # source://vcr//lib/vcr/util/hooks.rb#55
1601
+ def before_playback(*filters, &hook); end
1602
+
1603
+ # source://vcr//lib/vcr/util/hooks.rb#55
1604
+ def before_record(*filters, &hook); end
1605
+
1606
+ # source://vcr//lib/vcr/util/hooks.rb#55
1607
+ def preserve_exact_body_bytes(*filters, &hook); end
1608
+ end
1609
+
1610
+ # Provides integration with Cucumber using tags.
1611
+ #
1612
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#3
1613
+ class VCR::CucumberTags
1614
+ # @private
1615
+ # @return [CucumberTags] a new instance of CucumberTags
1616
+ #
1617
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#19
1618
+ def initialize(main_object); end
1619
+
1620
+ # Adds `Before` and `After` cucumber hooks for the named tags that
1621
+ # will cause a VCR cassette to be used for scenarios with matching tags.
1622
+ #
1623
+ # @param tag_names [Array<String,Hash>] the cucumber scenario tags. If
1624
+ # the last argument is a hash it is treated as cassette options.
1625
+ # - `:use_scenario_name => true` to automatically name the
1626
+ # cassette according to the scenario name.
1627
+ #
1628
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#30
1629
+ def tag(*tag_names); end
1630
+
1631
+ # Adds `Before` and `After` cucumber hooks for the named tags that
1632
+ # will cause a VCR cassette to be used for scenarios with matching tags.
1633
+ #
1634
+ # @param tag_names [Array<String,Hash>] the cucumber scenario tags. If
1635
+ # the last argument is a hash it is treated as cassette options.
1636
+ # - `:use_scenario_name => true` to automatically name the
1637
+ # cassette according to the scenario name.
1638
+ #
1639
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#30
1640
+ def tags(*tag_names); end
1641
+
1642
+ class << self
1643
+ # @private
1644
+ #
1645
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#11
1646
+ def add_tag(tag); end
1647
+
1648
+ # @private
1649
+ #
1650
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#6
1651
+ def tags; end
1652
+ end
1653
+ end
1654
+
1655
+ # Constructs a cassette name from a Cucumber 2 scenario outline
1656
+ #
1657
+ # @private
1658
+ #
1659
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#84
1660
+ class VCR::CucumberTags::ScenarioNameBuilder
1661
+ # @return [ScenarioNameBuilder] a new instance of ScenarioNameBuilder
1662
+ #
1663
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#85
1664
+ def initialize(test_case); end
1665
+
1666
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#90
1667
+ def cassette_name; end
1668
+
1669
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#100
1670
+ def examples_table(*_arg0); end
1671
+
1672
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#103
1673
+ def examples_table_row(row); end
1674
+
1675
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#94
1676
+ def feature(feature); end
1677
+
1678
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#100
1679
+ def scenario(*_arg0); end
1680
+
1681
+ # source://vcr//lib/vcr/test_frameworks/cucumber.rb#94
1682
+ def scenario_outline(feature); end
1683
+ end
1684
+
1685
+ # @private
1686
+ #
1687
+ # source://vcr//lib/vcr/deprecations.rb#33
1688
+ module VCR::Deprecations; end
1689
+
1690
+ # source://vcr//lib/vcr/deprecations.rb#34
1691
+ module VCR::Deprecations::Middleware; end
1692
+
1693
+ # @private
1694
+ #
1695
+ # source://vcr//lib/vcr/deprecations.rb#36
1696
+ module VCR::Deprecations::Middleware::Faraday
1697
+ # source://vcr//lib/vcr/deprecations.rb#37
1698
+ def initialize(*args); end
1699
+ end
1700
+
1701
+ # Namespace for VCR errors.
1702
+ #
1703
+ # source://vcr//lib/vcr/errors.rb#3
1704
+ module VCR::Errors; end
1705
+
1706
+ # Error raised when an `around_http_request` hook is used improperly.
1707
+ #
1708
+ # @see VCR::Configuration#around_http_request
1709
+ #
1710
+ # source://vcr//lib/vcr/errors.rb#36
1711
+ class VCR::Errors::AroundHTTPRequestHookError < ::VCR::Errors::Error; end
1712
+
1713
+ # Error raised when VCR is turned off while a cassette is in use.
1714
+ #
1715
+ # @see VCR#turn_off!
1716
+ # @see VCR#turned_off
1717
+ #
1718
+ # source://vcr//lib/vcr/errors.rb#10
1719
+ class VCR::Errors::CassetteInUseError < ::VCR::Errors::Error; end
1720
+
1721
+ # Error raised when you attempt to eject a cassette inserted by another
1722
+ # thread.
1723
+ #
1724
+ # source://vcr//lib/vcr/errors.rb#56
1725
+ class VCR::Errors::EjectLinkedCassetteError < ::VCR::Errors::Error; end
1726
+
1727
+ # Base class for all VCR errors.
1728
+ #
1729
+ # source://vcr//lib/vcr/errors.rb#5
1730
+ class VCR::Errors::Error < ::StandardError; end
1731
+
1732
+ # Error raised when a VCR 1.x cassette is used with VCR 2.
1733
+ #
1734
+ # source://vcr//lib/vcr/errors.rb#32
1735
+ class VCR::Errors::InvalidCassetteFormatError < ::VCR::Errors::Error; end
1736
+
1737
+ # Error raised when the version of one of the libraries that VCR hooks into
1738
+ # is too low for VCR to support.
1739
+ #
1740
+ # @see VCR::Configuration#hook_into
1741
+ #
1742
+ # source://vcr//lib/vcr/errors.rb#26
1743
+ class VCR::Errors::LibraryVersionTooLowError < ::VCR::Errors::Error; end
1744
+
1745
+ # Error raised when an cassette ERB template is rendered and a
1746
+ # variable is missing.
1747
+ #
1748
+ # @see VCR#insert_cassette
1749
+ # @see VCR#use_cassette
1750
+ #
1751
+ # source://vcr//lib/vcr/errors.rb#21
1752
+ class VCR::Errors::MissingERBVariableError < ::VCR::Errors::Error; end
1753
+
1754
+ # Error raised when you attempt to use a VCR feature that is not
1755
+ # supported on your ruby interpreter.
1756
+ #
1757
+ # @see VCR::Configuration#around_http_request
1758
+ #
1759
+ # source://vcr//lib/vcr/errors.rb#41
1760
+ class VCR::Errors::NotSupportedError < ::VCR::Errors::Error; end
1761
+
1762
+ # Error raised when a VCR cassette is inserted while VCR is turned off.
1763
+ #
1764
+ # @see VCR#insert_cassette
1765
+ # @see VCR#use_cassette
1766
+ #
1767
+ # source://vcr//lib/vcr/errors.rb#15
1768
+ class VCR::Errors::TurnedOffError < ::VCR::Errors::Error; end
1769
+
1770
+ # Error raised when an HTTP request is made that VCR is unable to handle.
1771
+ #
1772
+ # @note VCR will raise this to force you to do something about the
1773
+ # HTTP request. The idea is that you want to handle _every_ HTTP
1774
+ # request in your test suite. The error message will give you
1775
+ # suggestions for how to deal with the request.
1776
+ #
1777
+ # source://vcr//lib/vcr/errors.rb#64
1778
+ class VCR::Errors::UnhandledHTTPRequestError < ::VCR::Errors::Error
1779
+ # Constructs the error.
1780
+ #
1781
+ # @param request [VCR::Request] the unhandled request.
1782
+ # @return [UnhandledHTTPRequestError] a new instance of UnhandledHTTPRequestError
1783
+ #
1784
+ # source://vcr//lib/vcr/errors.rb#70
1785
+ def initialize(request); end
1786
+
1787
+ # The HTTP request.
1788
+ #
1789
+ # source://vcr//lib/vcr/errors.rb#65
1790
+ def request; end
1791
+
1792
+ private
1793
+
1794
+ # source://vcr//lib/vcr/errors.rb#136
1795
+ def cassettes_description; end
1796
+
1797
+ # source://vcr//lib/vcr/errors.rb#148
1798
+ def cassettes_list; end
1799
+
1800
+ # source://vcr//lib/vcr/errors.rb#81
1801
+ def construct_message; end
1802
+
1803
+ # source://vcr//lib/vcr/errors.rb#90
1804
+ def current_cassettes; end
1805
+
1806
+ # source://vcr//lib/vcr/errors.rb#118
1807
+ def current_matchers; end
1808
+
1809
+ # source://vcr//lib/vcr/errors.rb#183
1810
+ def format_bullet_point(lines, index); end
1811
+
1812
+ # source://vcr//lib/vcr/errors.rb#189
1813
+ def format_foot_note(url, index); end
1814
+
1815
+ # source://vcr//lib/vcr/errors.rb#128
1816
+ def formatted_headers; end
1817
+
1818
+ # source://vcr//lib/vcr/errors.rb#168
1819
+ def formatted_suggestions; end
1820
+
1821
+ # @return [Boolean]
1822
+ #
1823
+ # source://vcr//lib/vcr/errors.rb#295
1824
+ def has_used_interaction_matching?; end
1825
+
1826
+ # @return [Boolean]
1827
+ #
1828
+ # source://vcr//lib/vcr/errors.rb#114
1829
+ def match_request_on_body?; end
1830
+
1831
+ # @return [Boolean]
1832
+ #
1833
+ # source://vcr//lib/vcr/errors.rb#110
1834
+ def match_request_on_headers?; end
1835
+
1836
+ # source://vcr//lib/vcr/errors.rb#299
1837
+ def match_requests_on_suggestion; end
1838
+
1839
+ # source://vcr//lib/vcr/errors.rb#277
1840
+ def no_cassette_suggestions; end
1841
+
1842
+ # source://vcr//lib/vcr/errors.rb#283
1843
+ def record_mode_suggestion; end
1844
+
1845
+ # source://vcr//lib/vcr/errors.rb#77
1846
+ def relish_version_slug; end
1847
+
1848
+ # source://vcr//lib/vcr/errors.rb#94
1849
+ def request_description; end
1850
+
1851
+ # source://vcr//lib/vcr/errors.rb#259
1852
+ def suggestion_for(key); end
1853
+
1854
+ # source://vcr//lib/vcr/errors.rb#266
1855
+ def suggestions; end
1856
+ end
1857
+
1858
+ # List of suggestions for how to configure VCR to handle the request.
1859
+ #
1860
+ # source://vcr//lib/vcr/errors.rb#194
1861
+ VCR::Errors::UnhandledHTTPRequestError::ALL_SUGGESTIONS = T.let(T.unsafe(nil), Hash)
1862
+
1863
+ # Error raised when you ask VCR to decode a compressed response
1864
+ # body but the content encoding isn't one of the known ones.
1865
+ #
1866
+ # @see VCR::Response#decompress
1867
+ #
1868
+ # source://vcr//lib/vcr/errors.rb#46
1869
+ class VCR::Errors::UnknownContentEncodingError < ::VCR::Errors::Error; end
1870
+
1871
+ # Error raised when a request matcher is requested that is not registered.
1872
+ #
1873
+ # source://vcr//lib/vcr/errors.rb#29
1874
+ class VCR::Errors::UnregisteredMatcherError < ::VCR::Errors::Error; end
1875
+
1876
+ # Error raised when you eject a cassette before all previously
1877
+ # recorded HTTP interactions are played back.
1878
+ #
1879
+ # @note Only applicable when :allow_episode_skipping is false.
1880
+ # @see VCR::HTTPInteractionList#assert_no_unused_interactions!
1881
+ #
1882
+ # source://vcr//lib/vcr/errors.rb#52
1883
+ class VCR::Errors::UnusedHTTPInteractionError < ::VCR::Errors::Error; end
1884
+
1885
+ # Represents a single interaction over HTTP, containing a request and a response.
1886
+ #
1887
+ # @attr request [Request] the request
1888
+ # @attr response [Response] the response
1889
+ # @attr recorded_at [Time] when this HTTP interaction was recorded
1890
+ #
1891
+ # source://vcr//lib/vcr/structs.rb#501
1892
+ class VCR::HTTPInteraction < ::Struct
1893
+ # @return [HTTPInteraction] a new instance of HTTPInteraction
1894
+ #
1895
+ # source://vcr//lib/vcr/structs.rb#502
1896
+ def initialize(*args); end
1897
+
1898
+ # @return [HookAware] an instance with additional capabilities
1899
+ # suitable for use in `before_record` and `before_playback` hooks.
1900
+ #
1901
+ # source://vcr//lib/vcr/structs.rb#532
1902
+ def hook_aware; end
1903
+
1904
+ # Builds a serializable hash from the HTTP interaction data.
1905
+ #
1906
+ # @return [Hash] hash that represents this HTTP interaction
1907
+ # and can be easily serialized.
1908
+ # @see HTTPInteraction.from_hash
1909
+ #
1910
+ # source://vcr//lib/vcr/structs.rb#512
1911
+ def to_hash; end
1912
+
1913
+ class << self
1914
+ # Constructs a new instance from a hash.
1915
+ #
1916
+ # @param hash [Hash] the hash to use to construct the instance.
1917
+ # @return [HTTPInteraction] the HTTP interaction
1918
+ #
1919
+ # source://vcr//lib/vcr/structs.rb#524
1920
+ def from_hash(hash); end
1921
+ end
1922
+ end
1923
+
1924
+ # Decorates an {HTTPInteraction} with additional methods useful
1925
+ # for a `before_record` or `before_playback` hook.
1926
+ #
1927
+ # source://vcr//lib/vcr/structs.rb#538
1928
+ class VCR::HTTPInteraction::HookAware
1929
+ # @return [HookAware] a new instance of HookAware
1930
+ #
1931
+ # source://vcr//lib/vcr/structs.rb#539
1932
+ def initialize(http_interaction); end
1933
+
1934
+ # Replaces a string in any part of the HTTP interaction (headers, request body,
1935
+ # response body, etc) with the given replacement text.
1936
+ #
1937
+ # @param text [#to_s] the text to replace
1938
+ # @param replacement_text [#to_s] the text to put in its place
1939
+ #
1940
+ # source://vcr//lib/vcr/structs.rb#563
1941
+ def filter!(text, replacement_text); end
1942
+
1943
+ # Flags the HTTP interaction so that VCR ignores it. This is useful in
1944
+ # a {VCR::Configuration#before_record} or {VCR::Configuration#before_playback}
1945
+ # hook so that VCR does not record or play it back.
1946
+ #
1947
+ # @see #ignored?
1948
+ #
1949
+ # source://vcr//lib/vcr/structs.rb#548
1950
+ def ignore!; end
1951
+
1952
+ # @return [Boolean] whether or not this HTTP interaction should be ignored.
1953
+ # @see #ignore!
1954
+ #
1955
+ # source://vcr//lib/vcr/structs.rb#554
1956
+ def ignored?; end
1957
+
1958
+ private
1959
+
1960
+ # source://vcr//lib/vcr/structs.rb#584
1961
+ def filter_hash!(hash, text, replacement_text); end
1962
+
1963
+ # source://vcr//lib/vcr/structs.rb#571
1964
+ def filter_object!(object, text, replacement_text); end
1965
+ end
1966
+
1967
+ # @private
1968
+ #
1969
+ # source://vcr//lib/vcr/util/hooks.rb#5
1970
+ module VCR::Hooks
1971
+ include ::VCR::VariableArgsBlockCaller
1972
+
1973
+ mixes_in_class_methods ::VCR::Hooks::ClassMethods
1974
+
1975
+ # source://vcr//lib/vcr/util/hooks.rb#34
1976
+ def clear_hooks; end
1977
+
1978
+ # @return [Boolean]
1979
+ #
1980
+ # source://vcr//lib/vcr/util/hooks.rb#44
1981
+ def has_hooks_for?(hook_type); end
1982
+
1983
+ # source://vcr//lib/vcr/util/hooks.rb#38
1984
+ def hooks; end
1985
+
1986
+ # source://vcr//lib/vcr/util/hooks.rb#28
1987
+ def invoke_hook(hook_type, *args); end
1988
+
1989
+ class << self
1990
+ # @private
1991
+ #
1992
+ # source://vcr//lib/vcr/util/hooks.rb#19
1993
+ def included(klass); end
1994
+ end
1995
+ end
1996
+
1997
+ # @private
1998
+ #
1999
+ # source://vcr//lib/vcr/util/hooks.rb#49
2000
+ module VCR::Hooks::ClassMethods
2001
+ # source://vcr//lib/vcr/util/hooks.rb#50
2002
+ def define_hook(hook_type, prepend = T.unsafe(nil)); end
2003
+ end
2004
+
2005
+ # @private
2006
+ #
2007
+ # source://vcr//lib/vcr/util/hooks.rb#9
2008
+ class VCR::Hooks::FilteredHook < ::Struct
2009
+ include ::VCR::VariableArgsBlockCaller
2010
+
2011
+ # source://vcr//lib/vcr/util/hooks.rb#12
2012
+ def conditionally_invoke(*args); end
2013
+
2014
+ # Returns the value of attribute filters
2015
+ #
2016
+ # @return [Object] the current value of filters
2017
+ def filters; end
2018
+
2019
+ # Sets the attribute filters
2020
+ #
2021
+ # @param value [Object] the value to set the attribute filters to.
2022
+ # @return [Object] the newly set value
2023
+ #
2024
+ # source://vcr//lib/vcr/util/hooks.rb#9
2025
+ def filters=(_); end
2026
+
2027
+ # Returns the value of attribute hook
2028
+ #
2029
+ # @return [Object] the current value of hook
2030
+ def hook; end
2031
+
2032
+ # Sets the attribute hook
2033
+ #
2034
+ # @param value [Object] the value to set the attribute hook to.
2035
+ # @return [Object] the newly set value
2036
+ #
2037
+ # source://vcr//lib/vcr/util/hooks.rb#9
2038
+ def hook=(_); end
2039
+
2040
+ class << self
2041
+ def [](*_arg0); end
2042
+ def inspect; end
2043
+ def members; end
2044
+ def new(*_arg0); end
2045
+ end
2046
+ end
2047
+
2048
+ # @private
2049
+ #
2050
+ # source://vcr//lib/vcr/util/internet_connection.rb#26
2051
+ module VCR::InternetConnection
2052
+ extend ::VCR::InternetConnection
2053
+
2054
+ # @return [Boolean]
2055
+ #
2056
+ # source://vcr//lib/vcr/util/internet_connection.rb#31
2057
+ def available?; end
2058
+ end
2059
+
2060
+ # source://vcr//lib/vcr/util/internet_connection.rb#29
2061
+ VCR::InternetConnection::EXAMPLE_HOST = T.let(T.unsafe(nil), String)
2062
+
2063
+ # @private
2064
+ #
2065
+ # source://vcr//lib/vcr/library_hooks.rb#3
2066
+ class VCR::LibraryHooks
2067
+ # @return [Boolean]
2068
+ #
2069
+ # source://vcr//lib/vcr/library_hooks.rb#6
2070
+ def disabled?(hook); end
2071
+
2072
+ # Returns the value of attribute exclusive_hook.
2073
+ #
2074
+ # source://vcr//lib/vcr/library_hooks.rb#4
2075
+ def exclusive_hook; end
2076
+
2077
+ # Sets the attribute exclusive_hook
2078
+ #
2079
+ # @param value the value to set the attribute exclusive_hook to.
2080
+ #
2081
+ # source://vcr//lib/vcr/library_hooks.rb#4
2082
+ def exclusive_hook=(_arg0); end
2083
+
2084
+ # source://vcr//lib/vcr/library_hooks.rb#10
2085
+ def exclusively_enabled(hook); end
2086
+ end
2087
+
2088
+ # A Cassette wrapper for linking cassettes from another thread
2089
+ #
2090
+ # source://vcr//lib/vcr/linked_cassette.rb#7
2091
+ class VCR::LinkedCassette < ::SimpleDelegator
2092
+ # Prevents cassette ejection by raising EjectLinkedCassetteError
2093
+ #
2094
+ # @raise [Errors::EjectLinkedCassetteError]
2095
+ #
2096
+ # source://vcr//lib/vcr/linked_cassette.rb#62
2097
+ def eject(*args); end
2098
+
2099
+ # @return [Boolean] true
2100
+ #
2101
+ # source://vcr//lib/vcr/linked_cassette.rb#68
2102
+ def linked?; end
2103
+
2104
+ class << self
2105
+ # Create a new CassetteList
2106
+ #
2107
+ # @param cassettes [Array] context-owned cassettes
2108
+ # @param linked_cassettes [Array] context-unowned (linked) cassettes
2109
+ #
2110
+ # source://vcr//lib/vcr/linked_cassette.rb#57
2111
+ def list(cassettes, linked_cassettes); end
2112
+ end
2113
+ end
2114
+
2115
+ # An enumerable lazily wrapping a list of cassettes that a context is using
2116
+ #
2117
+ # source://vcr//lib/vcr/linked_cassette.rb#8
2118
+ class VCR::LinkedCassette::CassetteList
2119
+ include ::Enumerable
2120
+
2121
+ # Creates a new list of context-owned cassettes and linked cassettes
2122
+ #
2123
+ # @param cassettes [Array] context-owned cassettes
2124
+ # @param linked_cassettes [Array] context-unowned (linked) cassettes
2125
+ # @return [CassetteList] a new instance of CassetteList
2126
+ #
2127
+ # source://vcr//lib/vcr/linked_cassette.rb#14
2128
+ def initialize(cassettes, linked_cassettes); end
2129
+
2130
+ # Yields linked cassettes first, and then context-owned cassettes
2131
+ #
2132
+ # source://vcr//lib/vcr/linked_cassette.rb#20
2133
+ def each; end
2134
+
2135
+ # Provide last implementation, which is not provided by Enumerable
2136
+ #
2137
+ # source://vcr//lib/vcr/linked_cassette.rb#31
2138
+ def last; end
2139
+
2140
+ # Provide size implementation, which is not provided by Enumerable
2141
+ #
2142
+ # source://vcr//lib/vcr/linked_cassette.rb#40
2143
+ def size; end
2144
+
2145
+ protected
2146
+
2147
+ # source://vcr//lib/vcr/linked_cassette.rb#45
2148
+ def wrap(cassette); end
2149
+ end
2150
+
2151
+ # Provides log message formatting helper methods.
2152
+ #
2153
+ # @private
2154
+ #
2155
+ # source://vcr//lib/vcr/util/logger.rb#4
2156
+ class VCR::Logger
2157
+ # @return [Logger] a new instance of Logger
2158
+ #
2159
+ # source://vcr//lib/vcr/util/logger.rb#5
2160
+ def initialize(stream); end
2161
+
2162
+ # source://vcr//lib/vcr/util/logger.rb#9
2163
+ def log(message, log_prefix, indentation_level = T.unsafe(nil)); end
2164
+
2165
+ # source://vcr//lib/vcr/util/logger.rb#15
2166
+ def request_summary(request, request_matchers); end
2167
+
2168
+ # source://vcr//lib/vcr/util/logger.rb#22
2169
+ def response_summary(response); end
2170
+ end
2171
+
2172
+ # Provides common logger helper methods that simply delegate to
2173
+ # the underlying logger object.
2174
+ #
2175
+ # @private
2176
+ #
2177
+ # source://vcr//lib/vcr/util/logger.rb#45
2178
+ module VCR::Logger::Mixin
2179
+ # source://vcr//lib/vcr/util/logger.rb#46
2180
+ def log(message, indentation_level = T.unsafe(nil)); end
2181
+
2182
+ # source://vcr//lib/vcr/util/logger.rb#50
2183
+ def request_summary(*args); end
2184
+
2185
+ # source://vcr//lib/vcr/util/logger.rb#54
2186
+ def response_summary(*args); end
2187
+ end
2188
+
2189
+ # A null-object version of the Logger. Used when
2190
+ # a `debug_logger` has not been set.
2191
+ #
2192
+ # @note We used to use a null object for the `debug_logger` itself,
2193
+ # but some users noticed a negative perf impact from having the
2194
+ # logger formatting logic still executing in that case, so we
2195
+ # moved the null object interface up a layer to here.
2196
+ # @private
2197
+ #
2198
+ # source://vcr//lib/vcr/util/logger.rb#34
2199
+ module VCR::Logger::Null
2200
+ private
2201
+
2202
+ # source://vcr//lib/vcr/util/logger.rb#37
2203
+ def log(*_arg0); end
2204
+
2205
+ # source://vcr//lib/vcr/util/logger.rb#38
2206
+ def request_summary(*_arg0); end
2207
+
2208
+ # source://vcr//lib/vcr/util/logger.rb#39
2209
+ def response_summary(*_arg0); end
2210
+
2211
+ class << self
2212
+ # source://vcr//lib/vcr/util/logger.rb#37
2213
+ def log(*_arg0); end
2214
+
2215
+ # source://vcr//lib/vcr/util/logger.rb#38
2216
+ def request_summary(*_arg0); end
2217
+
2218
+ # source://vcr//lib/vcr/util/logger.rb#39
2219
+ def response_summary(*_arg0); end
2220
+ end
2221
+ end
2222
+
2223
+ # The main thread in which VCR was loaded
2224
+ #
2225
+ # source://vcr//lib/vcr.rb#30
2226
+ VCR::MainThread = T.let(T.unsafe(nil), Thread)
2227
+
2228
+ # Contains middlewares for use with different libraries.
2229
+ #
2230
+ # source://vcr//lib/vcr.rb#39
2231
+ module VCR::Middleware; end
2232
+
2233
+ # Object yielded by VCR's {Rack} middleware that allows you to configure
2234
+ # the cassette dynamically based on the rack env.
2235
+ #
2236
+ # source://vcr//lib/vcr/middleware/rack.rb#5
2237
+ class VCR::Middleware::CassetteArguments
2238
+ # @private
2239
+ # @return [CassetteArguments] a new instance of CassetteArguments
2240
+ #
2241
+ # source://vcr//lib/vcr/middleware/rack.rb#7
2242
+ def initialize; end
2243
+
2244
+ # Sets (and gets) the cassette name.
2245
+ #
2246
+ # @param name [#to_s] the cassette name
2247
+ # @return [#to_s] the cassette name
2248
+ #
2249
+ # source://vcr//lib/vcr/middleware/rack.rb#16
2250
+ def name(name = T.unsafe(nil)); end
2251
+
2252
+ # Sets (and gets) the cassette options.
2253
+ #
2254
+ # @param options [Hash] the cassette options
2255
+ # @return [Hash] the cassette options
2256
+ #
2257
+ # source://vcr//lib/vcr/middleware/rack.rb#25
2258
+ def options(options = T.unsafe(nil)); end
2259
+ end
2260
+
2261
+ # Faraday middleware that VCR uses to record and replay HTTP requests made through
2262
+ # Faraday.
2263
+ #
2264
+ # @note You can either insert this middleware into the Faraday middleware stack
2265
+ # yourself or configure {VCR::Configuration#hook_into} to hook into `:faraday`.
2266
+ #
2267
+ # source://vcr//lib/vcr/middleware/faraday.rb#15
2268
+ class VCR::Middleware::Faraday
2269
+ include ::VCR::Deprecations::Middleware::Faraday
2270
+
2271
+ # Constructs a new instance of the Faraday middleware.
2272
+ #
2273
+ # @param app [#call] the faraday app
2274
+ # @return [Faraday] a new instance of Faraday
2275
+ #
2276
+ # source://vcr//lib/vcr/middleware/faraday.rb#21
2277
+ def initialize(app); end
2278
+
2279
+ # Handles the HTTP request being made through Faraday
2280
+ #
2281
+ # @param env [Hash] the Faraday request env hash
2282
+ #
2283
+ # source://vcr//lib/vcr/middleware/faraday.rb#29
2284
+ def call(env); end
2285
+
2286
+ # Close any persistent connections.
2287
+ #
2288
+ # source://vcr//lib/vcr/middleware/faraday.rb#35
2289
+ def close; end
2290
+ end
2291
+
2292
+ # @private
2293
+ #
2294
+ # source://vcr//lib/vcr/middleware/faraday.rb#40
2295
+ class VCR::Middleware::Faraday::RequestHandler < ::VCR::RequestHandler
2296
+ # @return [RequestHandler] a new instance of RequestHandler
2297
+ #
2298
+ # source://vcr//lib/vcr/middleware/faraday.rb#42
2299
+ def initialize(app, env); end
2300
+
2301
+ # Returns the value of attribute app.
2302
+ #
2303
+ # source://vcr//lib/vcr/middleware/faraday.rb#41
2304
+ def app; end
2305
+
2306
+ # Returns the value of attribute env.
2307
+ #
2308
+ # source://vcr//lib/vcr/middleware/faraday.rb#41
2309
+ def env; end
2310
+
2311
+ # source://vcr//lib/vcr/middleware/faraday.rb#47
2312
+ def handle; end
2313
+
2314
+ private
2315
+
2316
+ # @return [Boolean]
2317
+ #
2318
+ # source://vcr//lib/vcr/middleware/faraday.rb#59
2319
+ def delay_finishing?; end
2320
+
2321
+ # source://vcr//lib/vcr/middleware/faraday.rb#120
2322
+ def invoke_after_request_hook(response); end
2323
+
2324
+ # source://vcr//lib/vcr/middleware/faraday.rb#92
2325
+ def on_ignored_request; end
2326
+
2327
+ # source://vcr//lib/vcr/middleware/faraday.rb#110
2328
+ def on_recordable_request; end
2329
+
2330
+ # source://vcr//lib/vcr/middleware/faraday.rb#98
2331
+ def on_stubbed_by_vcr_request; end
2332
+
2333
+ # source://vcr//lib/vcr/middleware/faraday.rb#71
2334
+ def raw_body_from(body); end
2335
+
2336
+ # source://vcr//lib/vcr/middleware/faraday.rb#79
2337
+ def response_for(response); end
2338
+
2339
+ # source://vcr//lib/vcr/middleware/faraday.rb#63
2340
+ def vcr_request; end
2341
+ end
2342
+
2343
+ # Rack middleware that uses a VCR cassette for each incoming HTTP request.
2344
+ #
2345
+ # @example
2346
+ # app = Rack::Builder.new do
2347
+ # use VCR::Middleware::Rack do |cassette, env|
2348
+ # cassette.name "rack/#{env['SERVER_NAME']}"
2349
+ # cassette.options :record => :new_episodes
2350
+ # end
2351
+ #
2352
+ # run MyRackApp
2353
+ # end
2354
+ # @note This will record/replay _outbound_ HTTP requests made by your rack app.
2355
+ #
2356
+ # source://vcr//lib/vcr/middleware/rack.rb#43
2357
+ class VCR::Middleware::Rack
2358
+ include ::VCR::VariableArgsBlockCaller
2359
+
2360
+ # Constructs a new instance of VCR's rack middleware.
2361
+ #
2362
+ # @param app [#call] the rack app
2363
+ # @raise [ArgumentError] if no configuration block is provided
2364
+ # @return [Rack] a new instance of Rack
2365
+ # @yield the cassette configuration block
2366
+ # @yieldparam cassette [CassetteArguments] the cassette configuration object
2367
+ # @yieldparam env [(optional) Hash] the rack env hash
2368
+ #
2369
+ # source://vcr//lib/vcr/middleware/rack.rb#53
2370
+ def initialize(app, &block); end
2371
+
2372
+ # Implements the rack middleware interface.
2373
+ #
2374
+ # @param env [Hash] the rack env hash
2375
+ # @return [Array(Integer, Hash, #each)] the rack response
2376
+ #
2377
+ # source://vcr//lib/vcr/middleware/rack.rb#62
2378
+ def call(env); end
2379
+
2380
+ private
2381
+
2382
+ # source://vcr//lib/vcr/middleware/rack.rb#72
2383
+ def cassette_arguments(env); end
2384
+ end
2385
+
2386
+ # @private
2387
+ #
2388
+ # source://vcr//lib/vcr/structs.rb#7
2389
+ module VCR::Normalizers; end
2390
+
2391
+ # @private
2392
+ #
2393
+ # source://vcr//lib/vcr/structs.rb#9
2394
+ module VCR::Normalizers::Body
2395
+ mixes_in_class_methods ::VCR::Normalizers::Body::ClassMethods
2396
+
2397
+ # source://vcr//lib/vcr/structs.rb#61
2398
+ def initialize(*args); end
2399
+
2400
+ private
2401
+
2402
+ # source://vcr//lib/vcr/structs.rb#92
2403
+ def base_body_hash(body); end
2404
+
2405
+ # source://vcr//lib/vcr/structs.rb#78
2406
+ def serializable_body; end
2407
+
2408
+ class << self
2409
+ # @private
2410
+ #
2411
+ # source://vcr//lib/vcr/structs.rb#10
2412
+ def included(klass); end
2413
+ end
2414
+ end
2415
+
2416
+ # @private
2417
+ #
2418
+ # source://vcr//lib/vcr/structs.rb#15
2419
+ module VCR::Normalizers::Body::ClassMethods
2420
+ # source://vcr//lib/vcr/structs.rb#16
2421
+ def body_from(hash_or_string); end
2422
+
2423
+ # source://vcr//lib/vcr/structs.rb#29
2424
+ def force_encode_string(string, encoding); end
2425
+
2426
+ # source://vcr//lib/vcr/structs.rb#34
2427
+ def try_encode_string(string, encoding); end
2428
+ end
2429
+
2430
+ # @private
2431
+ #
2432
+ # source://vcr//lib/vcr/structs.rb#103
2433
+ module VCR::Normalizers::Header
2434
+ # source://vcr//lib/vcr/structs.rb#104
2435
+ def initialize(*args); end
2436
+
2437
+ private
2438
+
2439
+ # source://vcr//lib/vcr/structs.rb#153
2440
+ def convert_to_raw_strings(array); end
2441
+
2442
+ # source://vcr//lib/vcr/structs.rb#146
2443
+ def delete_header(key); end
2444
+
2445
+ # source://vcr//lib/vcr/structs.rb#139
2446
+ def edit_header(key, value = T.unsafe(nil)); end
2447
+
2448
+ # source://vcr//lib/vcr/structs.rb#134
2449
+ def get_header(key); end
2450
+
2451
+ # source://vcr//lib/vcr/structs.rb#129
2452
+ def header_key(key); end
2453
+
2454
+ # source://vcr//lib/vcr/structs.rb#111
2455
+ def normalize_headers; end
2456
+ end
2457
+
2458
+ # @private
2459
+ #
2460
+ # source://vcr//lib/vcr/util/internet_connection.rb#8
2461
+ module VCR::Ping
2462
+ private
2463
+
2464
+ # source://vcr//lib/vcr/util/internet_connection.rb#9
2465
+ def pingecho(host, timeout = T.unsafe(nil), service = T.unsafe(nil)); end
2466
+
2467
+ class << self
2468
+ # source://vcr//lib/vcr/util/internet_connection.rb#9
2469
+ def pingecho(host, timeout = T.unsafe(nil), service = T.unsafe(nil)); end
2470
+ end
2471
+ end
2472
+
2473
+ # Integrates VCR with RSpec.
2474
+ #
2475
+ # source://vcr//lib/vcr.rb#35
2476
+ module VCR::RSpec; end
2477
+
2478
+ # @private
2479
+ #
2480
+ # source://vcr//lib/vcr/test_frameworks/rspec.rb#5
2481
+ module VCR::RSpec::Metadata
2482
+ extend ::VCR::RSpec::Metadata
2483
+
2484
+ # source://vcr//lib/vcr/test_frameworks/rspec.rb#30
2485
+ def configure!; end
2486
+
2487
+ # source://vcr//lib/vcr/test_frameworks/rspec.rb#8
2488
+ def vcr_cassette_name_for(metadata); end
2489
+ end
2490
+
2491
+ # The request of an {HTTPInteraction}.
2492
+ #
2493
+ # @attr method [Symbol] the HTTP method (i.e. :head, :options, :get, :post, :put, :patch or :delete)
2494
+ # @attr uri [String] the request URI
2495
+ # @attr body [String, nil] the request body
2496
+ # @attr headers [Hash{String => Array<String>}] the request headers
2497
+ #
2498
+ # source://vcr//lib/vcr/structs.rb#176
2499
+ class VCR::Request < ::Struct
2500
+ include ::VCR::Normalizers::Header
2501
+ include ::VCR::Normalizers::Body
2502
+ extend ::VCR::Normalizers::Body::ClassMethods
2503
+
2504
+ # @return [Request] a new instance of Request
2505
+ #
2506
+ # source://vcr//lib/vcr/structs.rb#180
2507
+ def initialize(*args); end
2508
+
2509
+ # the HTTP method (i.e. :head, :options, :get, :post, :put, :patch or :delete)
2510
+ #
2511
+ # @return [Symbol] the current value of method
2512
+ #
2513
+ # source://vcr//lib/vcr/structs.rb#228
2514
+ def method(*args); end
2515
+
2516
+ # Parses the URI using the configured `uri_parser`.
2517
+ #
2518
+ # @return [#schema, #host, #port, #path, #query] A parsed URI object.
2519
+ #
2520
+ # source://vcr//lib/vcr/structs.rb#223
2521
+ def parsed_uri; end
2522
+
2523
+ # Builds a serializable hash from the request data.
2524
+ #
2525
+ # @return [Hash] hash that represents this request and can be easily
2526
+ # serialized.
2527
+ # @see Request.from_hash
2528
+ #
2529
+ # source://vcr//lib/vcr/structs.rb#197
2530
+ def to_hash; end
2531
+
2532
+ private
2533
+
2534
+ # source://vcr//lib/vcr/structs.rb#315
2535
+ def without_standard_port(uri); end
2536
+
2537
+ class << self
2538
+ # Constructs a new instance from a hash.
2539
+ #
2540
+ # @param hash [Hash] the hash to use to construct the instance.
2541
+ # @return [Request] the request
2542
+ #
2543
+ # source://vcr//lib/vcr/structs.rb#210
2544
+ def from_hash(hash); end
2545
+ end
2546
+ end
2547
+
2548
+ # Provides fiber-awareness for the {VCR::Configuration#around_http_request} hook.
2549
+ #
2550
+ # source://vcr//lib/vcr/structs.rb#296
2551
+ class VCR::Request::FiberAware
2552
+ # Yields the fiber so the request can proceed.
2553
+ #
2554
+ # @return [VCR::Response] the response from the request
2555
+ #
2556
+ # source://vcr//lib/vcr/structs.rb#297
2557
+ def proceed; end
2558
+
2559
+ # Builds a proc that allows the request to proceed when called.
2560
+ # This allows you to treat the request as a proc and pass it on
2561
+ # to a method that yields (at which point the request will proceed).
2562
+ #
2563
+ # @return [Proc] the proc
2564
+ #
2565
+ # source://vcr//lib/vcr/structs.rb#306
2566
+ def to_proc; end
2567
+ end
2568
+
2569
+ # Decorates a {Request} with its current type.
2570
+ #
2571
+ # source://vcr//lib/vcr/structs.rb#235
2572
+ class VCR::Request::Typed
2573
+ # @param request [Request] the request
2574
+ # @param type [Symbol] the type. Should be one of `:ignored`, `:stubbed`, `:recordable` or `:unhandled`.
2575
+ # @return [Typed] a new instance of Typed
2576
+ #
2577
+ # source://vcr//lib/vcr/structs.rb#240
2578
+ def initialize(request, type); end
2579
+
2580
+ # @return [Boolean] whether or not this request is being stubbed by an
2581
+ # external library (such as WebMock).
2582
+ # @see #stubbed_by_vcr?
2583
+ # @see #stubbed?
2584
+ #
2585
+ # source://vcr//lib/vcr/structs.rb#261
2586
+ def externally_stubbed?; end
2587
+
2588
+ # @return [Boolean] whether or not this request is being ignored
2589
+ #
2590
+ # source://vcr//lib/vcr/structs.rb#246
2591
+ def ignored?; end
2592
+
2593
+ # @note VCR allows `:ignored` and `:recordable` requests to be made for real.
2594
+ # @return [Boolean] whether or not this request will be made for real.
2595
+ #
2596
+ # source://vcr//lib/vcr/structs.rb#277
2597
+ def real?; end
2598
+
2599
+ # @return [Boolean] whether or not this request will be recorded.
2600
+ #
2601
+ # source://vcr//lib/vcr/structs.rb#266
2602
+ def recordable?; end
2603
+
2604
+ # @return [Boolean] whether or not this request will be stubbed.
2605
+ # It may be stubbed by an external library or by VCR.
2606
+ # @see #stubbed_by_vcr?
2607
+ # @see #externally_stubbed?
2608
+ #
2609
+ # source://vcr//lib/vcr/structs.rb#285
2610
+ def stubbed?; end
2611
+
2612
+ # @return [Boolean] whether or not this request is being stubbed by VCR
2613
+ # @see #externally_stubbed?
2614
+ # @see #stubbed?
2615
+ #
2616
+ # source://vcr//lib/vcr/structs.rb#253
2617
+ def stubbed_by_vcr?; end
2618
+
2619
+ # @return [Symbol] One of `:ignored`, `:stubbed`, `:recordable` or `:unhandled`.
2620
+ #
2621
+ # source://vcr//lib/vcr/structs.rb#236
2622
+ def type; end
2623
+
2624
+ # @return [Boolean] whether or not VCR knows how to handle this request.
2625
+ #
2626
+ # source://vcr//lib/vcr/structs.rb#271
2627
+ def unhandled?; end
2628
+ end
2629
+
2630
+ # @private
2631
+ #
2632
+ # source://vcr//lib/vcr/request_handler.rb#3
2633
+ class VCR::RequestHandler
2634
+ include ::VCR::Logger::Mixin
2635
+
2636
+ # source://vcr//lib/vcr/request_handler.rb#6
2637
+ def handle; end
2638
+
2639
+ private
2640
+
2641
+ # @return [Boolean]
2642
+ #
2643
+ # source://vcr//lib/vcr/request_handler.rb#62
2644
+ def disabled?; end
2645
+
2646
+ # @return [Boolean]
2647
+ #
2648
+ # source://vcr//lib/vcr/request_handler.rb#54
2649
+ def externally_stubbed?; end
2650
+
2651
+ # @return [Boolean]
2652
+ #
2653
+ # source://vcr//lib/vcr/request_handler.rb#66
2654
+ def has_response_stub?(consume_stub); end
2655
+
2656
+ # source://vcr//lib/vcr/request_handler.rb#49
2657
+ def invoke_after_request_hook(vcr_response); end
2658
+
2659
+ # source://vcr//lib/vcr/request_handler.rb#43
2660
+ def invoke_before_request_hook; end
2661
+
2662
+ # source://vcr//lib/vcr/request_handler.rb#78
2663
+ def library_name; end
2664
+
2665
+ # source://vcr//lib/vcr/request_handler.rb#110
2666
+ def log_prefix; end
2667
+
2668
+ # Subclasses can implement these
2669
+ #
2670
+ # source://vcr//lib/vcr/request_handler.rb#84
2671
+ def on_externally_stubbed_request; end
2672
+
2673
+ # source://vcr//lib/vcr/request_handler.rb#87
2674
+ def on_ignored_request; end
2675
+
2676
+ # source://vcr//lib/vcr/request_handler.rb#93
2677
+ def on_recordable_request; end
2678
+
2679
+ # source://vcr//lib/vcr/request_handler.rb#90
2680
+ def on_stubbed_by_vcr_request; end
2681
+
2682
+ # @raise [VCR::Errors::UnhandledHTTPRequestError]
2683
+ #
2684
+ # source://vcr//lib/vcr/request_handler.rb#96
2685
+ def on_unhandled_request; end
2686
+
2687
+ # source://vcr//lib/vcr/request_handler.rb#100
2688
+ def request_summary; end
2689
+
2690
+ # source://vcr//lib/vcr/request_handler.rb#33
2691
+ def request_type(consume_stub = T.unsafe(nil)); end
2692
+
2693
+ # source://vcr//lib/vcr/request_handler.rb#29
2694
+ def set_typed_request_for_after_hook(request_type); end
2695
+
2696
+ # @return [Boolean]
2697
+ #
2698
+ # source://vcr//lib/vcr/request_handler.rb#58
2699
+ def should_ignore?; end
2700
+
2701
+ # source://vcr//lib/vcr/request_handler.rb#74
2702
+ def stubbed_response; end
2703
+ end
2704
+
2705
+ # @private
2706
+ #
2707
+ # source://vcr//lib/vcr/request_ignorer.rb#6
2708
+ class VCR::RequestIgnorer
2709
+ include ::VCR::VariableArgsBlockCaller
2710
+ include ::VCR::Hooks
2711
+ include ::VCR::RequestIgnorer::DefinedHooks
2712
+ extend ::VCR::Hooks::ClassMethods
2713
+
2714
+ # @return [RequestIgnorer] a new instance of RequestIgnorer
2715
+ #
2716
+ # source://vcr//lib/vcr/request_ignorer.rb#13
2717
+ def initialize; end
2718
+
2719
+ # @return [Boolean]
2720
+ #
2721
+ # source://vcr//lib/vcr/request_ignorer.rb#40
2722
+ def ignore?(request); end
2723
+
2724
+ # source://vcr//lib/vcr/request_ignorer.rb#32
2725
+ def ignore_hosts(*hosts); end
2726
+
2727
+ # source://vcr//lib/vcr/request_ignorer.rb#20
2728
+ def ignore_localhost=(value); end
2729
+
2730
+ # @return [Boolean]
2731
+ #
2732
+ # source://vcr//lib/vcr/request_ignorer.rb#28
2733
+ def localhost_ignored?; end
2734
+
2735
+ # source://vcr//lib/vcr/request_ignorer.rb#36
2736
+ def unignore_hosts(*hosts); end
2737
+
2738
+ private
2739
+
2740
+ # source://vcr//lib/vcr/request_ignorer.rb#46
2741
+ def ignored_hosts; end
2742
+ end
2743
+
2744
+ # source://vcr//lib/vcr/request_ignorer.rb#0
2745
+ module VCR::RequestIgnorer::DefinedHooks
2746
+ # source://vcr//lib/vcr/util/hooks.rb#55
2747
+ def ignore_request(*filters, &hook); end
2748
+ end
2749
+
2750
+ # source://vcr//lib/vcr/request_ignorer.rb#11
2751
+ VCR::RequestIgnorer::LOCALHOST_ALIASES = T.let(T.unsafe(nil), Array)
2752
+
2753
+ # Keeps track of the different request matchers.
2754
+ #
2755
+ # source://vcr//lib/vcr/request_matcher_registry.rb#5
2756
+ class VCR::RequestMatcherRegistry
2757
+ # @private
2758
+ # @return [RequestMatcherRegistry] a new instance of RequestMatcherRegistry
2759
+ #
2760
+ # source://vcr//lib/vcr/request_matcher_registry.rb#49
2761
+ def initialize; end
2762
+
2763
+ # @private
2764
+ #
2765
+ # source://vcr//lib/vcr/request_matcher_registry.rb#64
2766
+ def [](matcher); end
2767
+
2768
+ # @private
2769
+ #
2770
+ # source://vcr//lib/vcr/request_matcher_registry.rb#55
2771
+ def register(name, &block); end
2772
+
2773
+ # Builds a dynamic request matcher that matches on a URI while ignoring the
2774
+ # named query parameters. This is useful for dealing with non-deterministic
2775
+ # URIs (i.e. that have a timestamp or request signature parameter).
2776
+ #
2777
+ # @example
2778
+ # without_timestamp = VCR.request_matchers.uri_without_param(:timestamp)
2779
+ #
2780
+ # # use it directly...
2781
+ # VCR.use_cassette('example', :match_requests_on => [:method, without_timestamp]) { }
2782
+ #
2783
+ # # ...or register it as a named matcher
2784
+ # VCR.configure do |c|
2785
+ # c.register_request_matcher(:uri_without_timestamp, &without_timestamp)
2786
+ # end
2787
+ #
2788
+ # VCR.use_cassette('example', :match_requests_on => [:method, :uri_without_timestamp]) { }
2789
+ # @param ignores [Array<#to_s>] The names of the query parameters to ignore
2790
+ # @return [#call] the request matcher
2791
+ #
2792
+ # source://vcr//lib/vcr/request_matcher_registry.rb#91
2793
+ def uri_without_param(*ignores); end
2794
+
2795
+ # Builds a dynamic request matcher that matches on a URI while ignoring the
2796
+ # named query parameters. This is useful for dealing with non-deterministic
2797
+ # URIs (i.e. that have a timestamp or request signature parameter).
2798
+ #
2799
+ # @example
2800
+ # without_timestamp = VCR.request_matchers.uri_without_param(:timestamp)
2801
+ #
2802
+ # # use it directly...
2803
+ # VCR.use_cassette('example', :match_requests_on => [:method, without_timestamp]) { }
2804
+ #
2805
+ # # ...or register it as a named matcher
2806
+ # VCR.configure do |c|
2807
+ # c.register_request_matcher(:uri_without_timestamp, &without_timestamp)
2808
+ # end
2809
+ #
2810
+ # VCR.use_cassette('example', :match_requests_on => [:method, :uri_without_timestamp]) { }
2811
+ # @param ignores [Array<#to_s>] The names of the query parameters to ignore
2812
+ # @return [#call] the request matcher
2813
+ #
2814
+ # source://vcr//lib/vcr/request_matcher_registry.rb#91
2815
+ def uri_without_params(*ignores); end
2816
+
2817
+ private
2818
+
2819
+ # source://vcr//lib/vcr/request_matcher_registry.rb#105
2820
+ def raise_unregistered_matcher_error(name); end
2821
+
2822
+ # source://vcr//lib/vcr/request_matcher_registry.rb#111
2823
+ def register_built_ins; end
2824
+
2825
+ # source://vcr//lib/vcr/request_matcher_registry.rb#132
2826
+ def try_to_register_body_as_json; end
2827
+
2828
+ # source://vcr//lib/vcr/request_matcher_registry.rb#98
2829
+ def uri_without_param_matchers; end
2830
+ end
2831
+
2832
+ # The default request matchers used for any cassette that does not
2833
+ # specify request matchers.
2834
+ #
2835
+ # source://vcr//lib/vcr/request_matcher_registry.rb#9
2836
+ VCR::RequestMatcherRegistry::DEFAULT_MATCHERS = T.let(T.unsafe(nil), Array)
2837
+
2838
+ # @private
2839
+ #
2840
+ # source://vcr//lib/vcr/request_matcher_registry.rb#12
2841
+ class VCR::RequestMatcherRegistry::Matcher < ::Struct
2842
+ # @return [Boolean]
2843
+ #
2844
+ # source://vcr//lib/vcr/request_matcher_registry.rb#13
2845
+ def matches?(request_1, request_2); end
2846
+ end
2847
+
2848
+ # @private
2849
+ #
2850
+ # source://vcr//lib/vcr/request_matcher_registry.rb#19
2851
+ class VCR::RequestMatcherRegistry::URIWithoutParamsMatcher < ::Struct
2852
+ # source://vcr//lib/vcr/request_matcher_registry.rb#39
2853
+ def call(request_1, request_2); end
2854
+
2855
+ # source://vcr//lib/vcr/request_matcher_registry.rb#20
2856
+ def partial_uri_from(request); end
2857
+
2858
+ # source://vcr//lib/vcr/request_matcher_registry.rb#43
2859
+ def to_proc; end
2860
+ end
2861
+
2862
+ # The response of an {HTTPInteraction}.
2863
+ #
2864
+ # @attr status [ResponseStatus] the status of the response
2865
+ # @attr headers [Hash{String => Array<String>}] the response headers
2866
+ # @attr body [String] the response body
2867
+ # @attr http_version [nil, String] the HTTP version
2868
+ # @attr adapter_metadata [Hash] Additional metadata used by a specific VCR adapter.
2869
+ #
2870
+ # source://vcr//lib/vcr/structs.rb#331
2871
+ class VCR::Response < ::Struct
2872
+ include ::VCR::Normalizers::Header
2873
+ include ::VCR::Normalizers::Body
2874
+ extend ::VCR::Normalizers::Body::ClassMethods
2875
+
2876
+ # @return [Response] a new instance of Response
2877
+ #
2878
+ # source://vcr//lib/vcr/structs.rb#335
2879
+ def initialize(*args); end
2880
+
2881
+ # Checks if the type of encoding is one of "gzip" or "deflate".
2882
+ #
2883
+ # @return [Boolean]
2884
+ #
2885
+ # source://vcr//lib/vcr/structs.rb#382
2886
+ def compressed?; end
2887
+
2888
+ # The type of encoding.
2889
+ #
2890
+ # @return [String] encoding type
2891
+ #
2892
+ # source://vcr//lib/vcr/structs.rb#377
2893
+ def content_encoding; end
2894
+
2895
+ # Decodes the compressed body and deletes evidence that it was ever compressed.
2896
+ #
2897
+ # @raise [VCR::Errors::UnknownContentEncodingError] if the content encoding
2898
+ # is not a known encoding.
2899
+ # @return self
2900
+ #
2901
+ # source://vcr//lib/vcr/structs.rb#396
2902
+ def decompress; end
2903
+
2904
+ # Recompresses the decompressed body according to adapter metadata.
2905
+ #
2906
+ # @raise [VCR::Errors::UnknownContentEncodingError] if the content encoding
2907
+ # stored in the adapter metadata is unknown
2908
+ #
2909
+ # source://vcr//lib/vcr/structs.rb#410
2910
+ def recompress; end
2911
+
2912
+ # Builds a serializable hash from the response data.
2913
+ #
2914
+ # @return [Hash] hash that represents this response
2915
+ # and can be easily serialized.
2916
+ # @see Response.from_hash
2917
+ #
2918
+ # source://vcr//lib/vcr/structs.rb#345
2919
+ def to_hash; end
2920
+
2921
+ # Updates the Content-Length response header so that it is
2922
+ # accurate for the response body.
2923
+ #
2924
+ # source://vcr//lib/vcr/structs.rb#370
2925
+ def update_content_length_header; end
2926
+
2927
+ # Checks if VCR decompressed the response body
2928
+ #
2929
+ # @return [Boolean]
2930
+ #
2931
+ # source://vcr//lib/vcr/structs.rb#387
2932
+ def vcr_decompressed?; end
2933
+
2934
+ class << self
2935
+ # Decode string compressed with gzip or deflate
2936
+ #
2937
+ # @raise [VCR::Errors::UnknownContentEncodingError] if the content encoding
2938
+ # is not a known encoding.
2939
+ #
2940
+ # source://vcr//lib/vcr/structs.rb#449
2941
+ def decompress(body, type); end
2942
+
2943
+ # Constructs a new instance from a hash.
2944
+ #
2945
+ # @param hash [Hash] the hash to use to construct the instance.
2946
+ # @return [Response] the response
2947
+ #
2948
+ # source://vcr//lib/vcr/structs.rb#360
2949
+ def from_hash(hash); end
2950
+ end
2951
+ end
2952
+
2953
+ # source://vcr//lib/vcr/structs.rb#440
2954
+ VCR::Response::HAVE_ZLIB = T.let(T.unsafe(nil), TrueClass)
2955
+
2956
+ # The response status of an {HTTPInteraction}.
2957
+ #
2958
+ # @attr code [Integer] the HTTP status code
2959
+ # @attr message [String] the HTTP status message (e.g. "OK" for a status of 200)
2960
+ #
2961
+ # source://vcr//lib/vcr/structs.rb#480
2962
+ class VCR::ResponseStatus < ::Struct
2963
+ # Builds a serializable hash from the response status data.
2964
+ #
2965
+ # @return [Hash] hash that represents this response status
2966
+ # and can be easily serialized.
2967
+ # @see ResponseStatus.from_hash
2968
+ #
2969
+ # source://vcr//lib/vcr/structs.rb#481
2970
+ def to_hash; end
2971
+
2972
+ class << self
2973
+ # Constructs a new instance from a hash.
2974
+ #
2975
+ # @param hash [Hash] the hash to use to construct the instance.
2976
+ # @return [ResponseStatus] the response status
2977
+ #
2978
+ # source://vcr//lib/vcr/structs.rb#491
2979
+ def from_hash(hash); end
2980
+ end
2981
+ end
2982
+
2983
+ # @private
2984
+ #
2985
+ # source://vcr//lib/vcr/util/variable_args_block_caller.rb#3
2986
+ module VCR::VariableArgsBlockCaller
2987
+ # source://vcr//lib/vcr/util/variable_args_block_caller.rb#4
2988
+ def call_block(block, *args); end
2989
+ end
2990
+
2991
+ # @private
2992
+ #
2993
+ # source://vcr//lib/vcr/util/version_checker.rb#3
2994
+ class VCR::VersionChecker
2995
+ # @return [VersionChecker] a new instance of VersionChecker
2996
+ #
2997
+ # source://vcr//lib/vcr/util/version_checker.rb#4
2998
+ def initialize(library_name, library_version, min_version); end
2999
+
3000
+ # source://vcr//lib/vcr/util/version_checker.rb#13
3001
+ def check_version!; end
3002
+
3003
+ private
3004
+
3005
+ # source://vcr//lib/vcr/util/version_checker.rb#29
3006
+ def compare_version; end
3007
+
3008
+ # source://vcr//lib/vcr/util/version_checker.rb#43
3009
+ def parse_version(version); end
3010
+
3011
+ # @raise [Errors::LibraryVersionTooLowError]
3012
+ #
3013
+ # source://vcr//lib/vcr/util/version_checker.rb#23
3014
+ def raise_too_low_error; end
3015
+
3016
+ # @return [Boolean]
3017
+ #
3018
+ # source://vcr//lib/vcr/util/version_checker.rb#19
3019
+ def too_low?; end
3020
+
3021
+ # source://vcr//lib/vcr/util/version_checker.rb#39
3022
+ def version_requirement; end
3023
+ end