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