data_plane_api 0.1.2 → 0.2.0

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