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