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