paperback 0.0.4 → 0.0.5

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 (61) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/tests.yml +46 -0
  3. data/.rubocop-disables.yml +26 -9
  4. data/CHANGELOG.md +7 -0
  5. data/README.md +4 -1
  6. data/lib/paperback/cli.rb +17 -0
  7. data/lib/paperback/document.rb +74 -11
  8. data/lib/paperback/preparer.rb +76 -21
  9. data/lib/paperback/version.rb +2 -1
  10. data/lib/paperback.rb +12 -0
  11. data/paperback.gemspec +10 -7
  12. data/sorbet/config +3 -0
  13. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  14. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  15. data/sorbet/rbi/gems/chunky_png@1.4.0.rbi +4498 -0
  16. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  17. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
  18. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  19. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  20. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  21. data/sorbet/rbi/gems/parser@3.2.0.0.rbi +6963 -0
  22. data/sorbet/rbi/gems/pdf-core@0.4.0.rbi +1682 -0
  23. data/sorbet/rbi/gems/prawn@1.3.0.rbi +5567 -0
  24. data/sorbet/rbi/gems/pry@0.14.1.rbi +9990 -0
  25. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +408 -0
  26. data/sorbet/rbi/gems/rake@13.0.6.rbi +3023 -0
  27. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  28. data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +3481 -0
  29. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4717 -0
  30. data/sorbet/rbi/gems/rqrcode@0.10.1.rbi +617 -0
  31. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10791 -0
  32. data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +8106 -0
  33. data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +5305 -0
  34. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
  35. data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
  36. data/sorbet/rbi/gems/rubocop-ast@1.24.1.rbi +6617 -0
  37. data/sorbet/rbi/gems/rubocop@0.93.1.rbi +40848 -0
  38. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1234 -0
  39. data/sorbet/rbi/gems/sixword@0.4.0.rbi +536 -0
  40. data/sorbet/rbi/gems/spoom@1.1.15.rbi +2383 -0
  41. data/sorbet/rbi/gems/subprocess@1.5.6.rbi +391 -0
  42. data/sorbet/rbi/gems/tapioca@0.10.5.rbi +3207 -0
  43. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  44. data/sorbet/rbi/gems/ttfunk@1.4.0.rbi +1951 -0
  45. data/sorbet/rbi/gems/unicode-display_width@1.8.0.rbi +40 -0
  46. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4524 -0
  47. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2555 -0
  48. data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +441 -0
  49. data/sorbet/rbi/gems/yard@0.9.28.rbi +17816 -0
  50. data/sorbet/tapioca/config.yml +13 -0
  51. data/sorbet/tapioca/require.rb +4 -0
  52. data/spec/functional/paperback/cli_spec.rb +54 -25
  53. data/spec/spec_helper.rb +1 -0
  54. data/spec/unit/paperback_spec.rb +1 -0
  55. metadata +89 -13
  56. data/sample/aes.key +0 -1
  57. data/sample/aes.pdf +0 -14413
  58. data/sample/aes.pdf.passphrase.txt +0 -1
  59. data/sample/rsa2048.pdf +0 -106803
  60. data/sample/rsa2048.pdf.passphrase.txt +0 -1
  61. data/sample/rsa2048.pem +0 -27
@@ -0,0 +1,1617 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rspec-support` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rspec-support`.
6
+
7
+ # source://rspec-support//lib/rspec/support.rb#1
8
+ module RSpec
9
+ extend ::RSpec::Support::Warnings
10
+
11
+ class << self
12
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#70
13
+ def clear_examples; end
14
+
15
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#85
16
+ def configuration; end
17
+
18
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#49
19
+ def configuration=(_arg0); end
20
+
21
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#97
22
+ def configure; end
23
+
24
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#194
25
+ def const_missing(name); end
26
+
27
+ # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42
28
+ def context(*args, &example_group_block); end
29
+
30
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#122
31
+ def current_example; end
32
+
33
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#128
34
+ def current_example=(example); end
35
+
36
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#154
37
+ def current_scope; end
38
+
39
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#134
40
+ def current_scope=(scope); end
41
+
42
+ # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42
43
+ def describe(*args, &example_group_block); end
44
+
45
+ # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42
46
+ def example_group(*args, &example_group_block); end
47
+
48
+ # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42
49
+ def fcontext(*args, &example_group_block); end
50
+
51
+ # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42
52
+ def fdescribe(*args, &example_group_block); end
53
+
54
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#58
55
+ def reset; end
56
+
57
+ # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110
58
+ def shared_context(name, *args, &block); end
59
+
60
+ # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110
61
+ def shared_examples(name, *args, &block); end
62
+
63
+ # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110
64
+ def shared_examples_for(name, *args, &block); end
65
+
66
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#160
67
+ def world; end
68
+
69
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#49
70
+ def world=(_arg0); end
71
+
72
+ # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42
73
+ def xcontext(*args, &example_group_block); end
74
+
75
+ # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42
76
+ def xdescribe(*args, &example_group_block); end
77
+ end
78
+ end
79
+
80
+ # Consistent implementation for "cleaning" the caller method to strip out
81
+ # non-rspec lines. This enables errors to be reported at the call site in
82
+ # the code using the library, which is far more useful than the particular
83
+ # internal method that raised an error.
84
+ #
85
+ # source://rspec-support//lib/rspec/support/caller_filter.rb#8
86
+ class RSpec::CallerFilter
87
+ class << self
88
+ # Earlier rubies do not support the two argument form of `caller`. This
89
+ # fallback is logically the same, but slower.
90
+ #
91
+ # source://rspec-support//lib/rspec/support/caller_filter.rb#47
92
+ def first_non_rspec_line(skip_frames = T.unsafe(nil), increment = T.unsafe(nil)); end
93
+ end
94
+ end
95
+
96
+ # source://rspec-support//lib/rspec/support/caller_filter.rb#18
97
+ RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array)
98
+
99
+ # rubygems/core_ext/kernel_require.rb isn't actually part of rspec (obviously) but we want
100
+ # it ignored when we are looking for the first meaningful line of the backtrace outside
101
+ # of RSpec. It can show up in the backtrace as the immediate first caller
102
+ # when `CallerFilter.first_non_rspec_line` is called from the top level of a required
103
+ # file, but it depends on if rubygems is loaded or not. We don't want to have to deal
104
+ # with this complexity in our `RSpec.deprecate` calls, so we ignore it here.
105
+ #
106
+ # source://rspec-support//lib/rspec/support/caller_filter.rb#28
107
+ RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp)
108
+
109
+ # source://rspec-support//lib/rspec/support/caller_filter.rb#20
110
+ RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp)
111
+
112
+ # source://rspec-support//lib/rspec/support/caller_filter.rb#9
113
+ RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array)
114
+
115
+ # source://rspec-core/3.12.0/lib/rspec/core.rb#187
116
+ RSpec::MODULES_TO_AUTOLOAD = T.let(T.unsafe(nil), Hash)
117
+
118
+ # source://rspec-core/3.12.0/lib/rspec/core/shared_context.rb#54
119
+ RSpec::SharedContext = RSpec::Core::SharedContext
120
+
121
+ # source://rspec-support//lib/rspec/support.rb#2
122
+ module RSpec::Support
123
+ class << self
124
+ # Used internally to get a class of a given object, even if it does not respond to #class.
125
+ #
126
+ # @api private
127
+ #
128
+ # source://rspec-support//lib/rspec/support.rb#84
129
+ def class_of(object); end
130
+
131
+ # Defines a helper method that is optimized to require files from the
132
+ # named lib. The passed block MUST be `{ |f| require_relative f }`
133
+ # because for `require_relative` to work properly from within the named
134
+ # lib the line of code must be IN that lib.
135
+ #
136
+ # `require_relative` is preferred when available because it is always O(1),
137
+ # regardless of the number of dirs in $LOAD_PATH. `require`, on the other
138
+ # hand, does a linear O(N) search over the dirs in the $LOAD_PATH until
139
+ # it can resolve the file relative to one of the dirs.
140
+ #
141
+ # @api private
142
+ #
143
+ # source://rspec-support//lib/rspec/support.rb#14
144
+ def define_optimized_require_for_rspec(lib, &require_relative); end
145
+
146
+ # Remove a previously registered matcher. Useful for cleaning up after
147
+ # yourself in specs.
148
+ #
149
+ # @private
150
+ #
151
+ # source://rspec-support//lib/rspec/support/matcher_definition.rb#22
152
+ def deregister_matcher_definition(&block); end
153
+
154
+ # @api private
155
+ #
156
+ # source://rspec-support//lib/rspec/support.rb#105
157
+ def failure_notifier; end
158
+
159
+ # @api private
160
+ #
161
+ # source://rspec-support//lib/rspec/support.rb#97
162
+ def failure_notifier=(callable); end
163
+
164
+ # @private
165
+ # @return [Boolean]
166
+ #
167
+ # source://rspec-support//lib/rspec/support/matcher_definition.rb#27
168
+ def is_a_matcher?(object); end
169
+
170
+ # @private
171
+ #
172
+ # source://rspec-support//lib/rspec/support/matcher_definition.rb#4
173
+ def matcher_definitions; end
174
+
175
+ # source://rspec-support//lib/rspec/support.rb#52
176
+ def method_handle_for(object, method_name); end
177
+
178
+ # @api private
179
+ #
180
+ # source://rspec-support//lib/rspec/support.rb#110
181
+ def notify_failure(failure, options = T.unsafe(nil)); end
182
+
183
+ # Used internally to break cyclic dependency between mocks, expectations,
184
+ # and support. We don't currently have a consistent implementation of our
185
+ # matchers, though we are considering changing that:
186
+ # https://github.com/rspec/rspec-mocks/issues/513
187
+ #
188
+ # @private
189
+ #
190
+ # source://rspec-support//lib/rspec/support/matcher_definition.rb#14
191
+ def register_matcher_definition(&block); end
192
+
193
+ # source://rspec-support//lib/rspec/support.rb#23
194
+ def require_rspec_core(f); end
195
+
196
+ # source://rspec-support//lib/rspec/support.rb#23
197
+ def require_rspec_support(f); end
198
+
199
+ # gives a string representation of an object for use in RSpec descriptions
200
+ #
201
+ # @api private
202
+ #
203
+ # source://rspec-support//lib/rspec/support/matcher_definition.rb#34
204
+ def rspec_description_for_object(object); end
205
+
206
+ # A single thread local variable so we don't excessively pollute that namespace.
207
+ #
208
+ # source://rspec-support//lib/rspec/support.rb#92
209
+ def thread_local_data; end
210
+
211
+ # @api private
212
+ #
213
+ # source://rspec-support//lib/rspec/support.rb#132
214
+ def warning_notifier; end
215
+
216
+ # @api private
217
+ #
218
+ # source://rspec-support//lib/rspec/support.rb#125
219
+ def warning_notifier=(_arg0); end
220
+
221
+ # @api private
222
+ #
223
+ # source://rspec-support//lib/rspec/support.rb#115
224
+ def with_failure_notifier(callable); end
225
+ end
226
+ end
227
+
228
+ # @private
229
+ #
230
+ # source://rspec-support//lib/rspec/support.rb#137
231
+ module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue
232
+ class << self
233
+ # source://rspec-support//lib/rspec/support.rb#142
234
+ def ===(exception); end
235
+ end
236
+ end
237
+
238
+ # These exceptions are dangerous to rescue as rescuing them
239
+ # would interfere with things we should not interfere with.
240
+ #
241
+ # source://rspec-support//lib/rspec/support.rb#140
242
+ RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T.unsafe(nil), Array)
243
+
244
+ # Deals with the slightly different semantics of block arguments.
245
+ # For methods, arguments are required unless a default value is provided.
246
+ # For blocks, arguments are optional, even if no default value is provided.
247
+ #
248
+ # However, we want to treat block args as required since you virtually
249
+ # always want to pass a value for each received argument and our
250
+ # `and_yield` has treated block args as required for many years.
251
+ #
252
+ # @api private
253
+ #
254
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#266
255
+ class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature
256
+ # @api private
257
+ #
258
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#268
259
+ def classify_parameters; end
260
+ end
261
+
262
+ # @private
263
+ #
264
+ # source://rspec-support//lib/rspec/support/comparable_version.rb#4
265
+ class RSpec::Support::ComparableVersion
266
+ include ::Comparable
267
+
268
+ # @return [ComparableVersion] a new instance of ComparableVersion
269
+ #
270
+ # source://rspec-support//lib/rspec/support/comparable_version.rb#9
271
+ def initialize(string); end
272
+
273
+ # source://rspec-support//lib/rspec/support/comparable_version.rb#13
274
+ def <=>(other); end
275
+
276
+ # source://rspec-support//lib/rspec/support/comparable_version.rb#35
277
+ def segments; end
278
+
279
+ # Returns the value of attribute string.
280
+ #
281
+ # source://rspec-support//lib/rspec/support/comparable_version.rb#7
282
+ def string; end
283
+ end
284
+
285
+ # @private
286
+ #
287
+ # source://rspec-support//lib/rspec/support.rb#102
288
+ RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc)
289
+
290
+ # @private
291
+ #
292
+ # source://rspec-support//lib/rspec/support.rb#129
293
+ RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc)
294
+
295
+ # source://rspec-support//lib/rspec/support/differ.rb#10
296
+ class RSpec::Support::Differ
297
+ # @return [Differ] a new instance of Differ
298
+ #
299
+ # source://rspec-support//lib/rspec/support/differ.rb#67
300
+ def initialize(opts = T.unsafe(nil)); end
301
+
302
+ # @return [Boolean]
303
+ #
304
+ # source://rspec-support//lib/rspec/support/differ.rb#63
305
+ def color?; end
306
+
307
+ # source://rspec-support//lib/rspec/support/differ.rb#11
308
+ def diff(actual, expected); end
309
+
310
+ # source://rspec-support//lib/rspec/support/differ.rb#57
311
+ def diff_as_object(actual, expected); end
312
+
313
+ # source://rspec-support//lib/rspec/support/differ.rb#28
314
+ def diff_as_string(actual, expected); end
315
+
316
+ private
317
+
318
+ # source://rspec-support//lib/rspec/support/differ.rb#128
319
+ def add_old_hunk_to_hunk(hunk, oldhunk); end
320
+
321
+ # source://rspec-support//lib/rspec/support/differ.rb#124
322
+ def add_to_output(output, string); end
323
+
324
+ # @return [Boolean]
325
+ #
326
+ # source://rspec-support//lib/rspec/support/differ.rb#78
327
+ def all_strings?(*args); end
328
+
329
+ # @return [Boolean]
330
+ #
331
+ # source://rspec-support//lib/rspec/support/differ.rb#82
332
+ def any_multiline_strings?(*args); end
333
+
334
+ # source://rspec-support//lib/rspec/support/differ.rb#153
335
+ def blue(text); end
336
+
337
+ # source://rspec-support//lib/rspec/support/differ.rb#115
338
+ def build_hunks(actual, expected); end
339
+
340
+ # source://rspec-support//lib/rspec/support/differ.rb#90
341
+ def coerce_to_string(string_or_array); end
342
+
343
+ # source://rspec-support//lib/rspec/support/differ.rb#141
344
+ def color(text, color_code); end
345
+
346
+ # source://rspec-support//lib/rspec/support/differ.rb#161
347
+ def color_diff(diff); end
348
+
349
+ # source://rspec-support//lib/rspec/support/differ.rb#95
350
+ def diffably_stringify(array); end
351
+
352
+ # source://rspec-support//lib/rspec/support/differ.rb#119
353
+ def finalize_output(output, final_line); end
354
+
355
+ # source://rspec-support//lib/rspec/support/differ.rb#137
356
+ def format_type; end
357
+
358
+ # source://rspec-support//lib/rspec/support/differ.rb#149
359
+ def green(text); end
360
+
361
+ # source://rspec-support//lib/rspec/support/differ.rb#202
362
+ def handle_encoding_errors(actual, expected); end
363
+
364
+ # source://rspec-support//lib/rspec/support/differ.rb#192
365
+ def hash_to_string(hash); end
366
+
367
+ # @return [Boolean]
368
+ #
369
+ # source://rspec-support//lib/rspec/support/differ.rb#106
370
+ def multiline?(string); end
371
+
372
+ # @return [Boolean]
373
+ #
374
+ # source://rspec-support//lib/rspec/support/differ.rb#86
375
+ def no_numbers?(*args); end
376
+
377
+ # @return [Boolean]
378
+ #
379
+ # source://rspec-support//lib/rspec/support/differ.rb#74
380
+ def no_procs?(*args); end
381
+
382
+ # source://rspec-support//lib/rspec/support/differ.rb#157
383
+ def normal(text); end
384
+
385
+ # source://rspec-support//lib/rspec/support/differ.rb#178
386
+ def object_to_string(object); end
387
+
388
+ # source://rspec-support//lib/rspec/support/differ.rb#145
389
+ def red(text); end
390
+
391
+ # source://rspec-support//lib/rspec/support/differ.rb#132
392
+ def safely_flatten(array); end
393
+ end
394
+
395
+ # Replacement for fileutils#mkdir_p because we don't want to require parts
396
+ # of stdlib in RSpec.
397
+ #
398
+ # @api private
399
+ #
400
+ # source://rspec-support//lib/rspec/support/directory_maker.rb#9
401
+ class RSpec::Support::DirectoryMaker
402
+ class << self
403
+ # Implements nested directory construction
404
+ #
405
+ # @api private
406
+ #
407
+ # source://rspec-support//lib/rspec/support/directory_maker.rb#13
408
+ def mkdir_p(path); end
409
+
410
+ private
411
+
412
+ # @api private
413
+ # @return [Boolean]
414
+ #
415
+ # source://rspec-support//lib/rspec/support/directory_maker.rb#55
416
+ def directory_exists?(dirname); end
417
+
418
+ # @api private
419
+ #
420
+ # source://rspec-support//lib/rspec/support/directory_maker.rb#50
421
+ def generate_path(stack, part); end
422
+
423
+ # @api private
424
+ #
425
+ # source://rspec-support//lib/rspec/support/directory_maker.rb#47
426
+ def generate_stack(path); end
427
+ end
428
+ end
429
+
430
+ # @private
431
+ #
432
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#4
433
+ class RSpec::Support::EncodedString
434
+ # @return [EncodedString] a new instance of EncodedString
435
+ #
436
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#14
437
+ def initialize(string, encoding = T.unsafe(nil)); end
438
+
439
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#26
440
+ def <<(string); end
441
+
442
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#23
443
+ def ==(*args, &block); end
444
+
445
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#23
446
+ def empty?(*args, &block); end
447
+
448
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#23
449
+ def encoding(*args, &block); end
450
+
451
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#23
452
+ def eql?(*args, &block); end
453
+
454
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#23
455
+ def lines(*args, &block); end
456
+
457
+ # Returns the value of attribute source_encoding.
458
+ #
459
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#19
460
+ def source_encoding; end
461
+
462
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#39
463
+ def split(regex_or_string); end
464
+
465
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#44
466
+ def to_s; end
467
+
468
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#44
469
+ def to_str; end
470
+
471
+ private
472
+
473
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#137
474
+ def detect_source_encoding(string); end
475
+
476
+ # Encoding Exceptions:
477
+ #
478
+ # Raised by Encoding and String methods:
479
+ # Encoding::UndefinedConversionError:
480
+ # when a transcoding operation fails
481
+ # if the String contains characters invalid for the target encoding
482
+ # e.g. "\x80".encode('UTF-8','ASCII-8BIT')
483
+ # vs "\x80".encode('UTF-8','ASCII-8BIT', undef: :replace, replace: '<undef>')
484
+ # # => '<undef>'
485
+ # Encoding::CompatibilityError
486
+ # when Encoding.compatible?(str1, str2) is nil
487
+ # e.g. utf_16le_emoji_string.split("\n")
488
+ # e.g. valid_unicode_string.encode(utf8_encoding) << ascii_string
489
+ # Encoding::InvalidByteSequenceError:
490
+ # when the string being transcoded contains a byte invalid for
491
+ # either the source or target encoding
492
+ # e.g. "\x80".encode('UTF-8','US-ASCII')
493
+ # vs "\x80".encode('UTF-8','US-ASCII', invalid: :replace, replace: '<byte>')
494
+ # # => '<byte>'
495
+ # ArgumentError
496
+ # when operating on a string with invalid bytes
497
+ # e.g."\x80".split("\n")
498
+ # TypeError
499
+ # when a symbol is passed as an encoding
500
+ # Encoding.find(:"UTF-8")
501
+ # when calling force_encoding on an object
502
+ # that doesn't respond to #to_str
503
+ #
504
+ # Raised by transcoding methods:
505
+ # Encoding::ConverterNotFoundError:
506
+ # when a named encoding does not correspond with a known converter
507
+ # e.g. 'abc'.force_encoding('UTF-8').encode('foo')
508
+ # or a converter path cannot be found
509
+ # e.g. "\x80".force_encoding('ASCII-8BIT').encode('Emacs-Mule')
510
+ #
511
+ # Raised by byte <-> char conversions
512
+ # RangeError: out of char range
513
+ # e.g. the UTF-16LE emoji: 128169.chr
514
+ #
515
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#91
516
+ def matching_encoding(string); end
517
+
518
+ # http://stackoverflow.com/a/8711118/879854
519
+ # Loop over chars in a string replacing chars
520
+ # with invalid encoding, which is a pretty good proxy
521
+ # for the invalid byte sequence that causes an ArgumentError
522
+ #
523
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#122
524
+ def remove_invalid_bytes(string); end
525
+
526
+ class << self
527
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#141
528
+ def pick_encoding(source_a, source_b); end
529
+ end
530
+ end
531
+
532
+ # Ruby's default replacement string is:
533
+ # U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else
534
+ # ? ("\x3F")
535
+ #
536
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#12
537
+ RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String)
538
+
539
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#7
540
+ RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String)
541
+
542
+ # Reduce allocations by storing constants.
543
+ #
544
+ # source://rspec-support//lib/rspec/support/encoded_string.rb#6
545
+ RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String)
546
+
547
+ # @private
548
+ #
549
+ # source://rspec-support//lib/rspec/support/hunk_generator.rb#7
550
+ class RSpec::Support::HunkGenerator
551
+ # @return [HunkGenerator] a new instance of HunkGenerator
552
+ #
553
+ # source://rspec-support//lib/rspec/support/hunk_generator.rb#8
554
+ def initialize(actual, expected); end
555
+
556
+ # source://rspec-support//lib/rspec/support/hunk_generator.rb#13
557
+ def hunks; end
558
+
559
+ private
560
+
561
+ # source://rspec-support//lib/rspec/support/hunk_generator.rb#30
562
+ def actual_lines; end
563
+
564
+ # source://rspec-support//lib/rspec/support/hunk_generator.rb#34
565
+ def build_hunk(piece); end
566
+
567
+ # source://rspec-support//lib/rspec/support/hunk_generator.rb#42
568
+ def context_lines; end
569
+
570
+ # source://rspec-support//lib/rspec/support/hunk_generator.rb#22
571
+ def diffs; end
572
+
573
+ # source://rspec-support//lib/rspec/support/hunk_generator.rb#26
574
+ def expected_lines; end
575
+ end
576
+
577
+ # @api private
578
+ #
579
+ # source://rspec-support//lib/rspec/support.rb#38
580
+ RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod)
581
+
582
+ # Allows matchers to be used instead of providing keyword arguments. In
583
+ # practice, when this happens only the arity of the method is verified.
584
+ #
585
+ # @private
586
+ #
587
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#391
588
+ class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier
589
+ private
590
+
591
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#394
592
+ def split_args(*args); end
593
+ end
594
+
595
+ # If a matcher is used in a signature in place of keyword arguments, all
596
+ # keyword argument validation needs to be skipped since the matcher is
597
+ # opaque.
598
+ #
599
+ # Instead, keyword arguments will be validated when the method is called
600
+ # and they are actually known.
601
+ #
602
+ # @private
603
+ #
604
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#411
605
+ class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
606
+ # @return [SignatureWithKeywordArgumentsMatcher] a new instance of SignatureWithKeywordArgumentsMatcher
607
+ #
608
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#412
609
+ def initialize(signature); end
610
+
611
+ # @return [Boolean]
612
+ #
613
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#432
614
+ def has_kw_args_in?(args); end
615
+
616
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#420
617
+ def invalid_kw_args_from(_kw_args); end
618
+
619
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#416
620
+ def missing_kw_args_from(_kw_args); end
621
+
622
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#424
623
+ def non_kw_args_arity_description; end
624
+
625
+ # @return [Boolean]
626
+ #
627
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#428
628
+ def valid_non_kw_args?(*args); end
629
+ end
630
+
631
+ # Extracts info about the number of arguments and allowed/required
632
+ # keyword args of a given method.
633
+ #
634
+ # @private
635
+ #
636
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#11
637
+ class RSpec::Support::MethodSignature
638
+ # @return [MethodSignature] a new instance of MethodSignature
639
+ #
640
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14
641
+ def initialize(method); end
642
+
643
+ # @return [Boolean]
644
+ #
645
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#96
646
+ def arbitrary_kw_args?; end
647
+
648
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#36
649
+ def classify_arity(arity = T.unsafe(nil)); end
650
+
651
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#104
652
+ def classify_parameters; end
653
+
654
+ # Without considering what the last arg is, could it
655
+ # contain keyword arguments?
656
+ #
657
+ # @return [Boolean]
658
+ #
659
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#90
660
+ def could_contain_kw_args?(args); end
661
+
662
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#49
663
+ def description; end
664
+
665
+ # If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments
666
+ # the rest will be grouped in another Hash and passed as positional argument.
667
+ #
668
+ # @return [Boolean]
669
+ #
670
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#82
671
+ def has_kw_args_in?(args); end
672
+
673
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#75
674
+ def invalid_kw_args_from(given_kw_args); end
675
+
676
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12
677
+ def max_non_kw_args; end
678
+
679
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12
680
+ def min_non_kw_args; end
681
+
682
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#71
683
+ def missing_kw_args_from(given_kw_args); end
684
+
685
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#21
686
+ def non_kw_args_arity_description; end
687
+
688
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12
689
+ def optional_kw_args; end
690
+
691
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12
692
+ def required_kw_args; end
693
+
694
+ # @return [Boolean]
695
+ #
696
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#100
697
+ def unlimited_args?; end
698
+
699
+ # @return [Boolean]
700
+ #
701
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#29
702
+ def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = T.unsafe(nil)); end
703
+ end
704
+
705
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#160
706
+ RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float)
707
+
708
+ # Encapsulates expectations about the number of arguments and
709
+ # allowed/required keyword args of a given method.
710
+ #
711
+ # @api private
712
+ #
713
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#217
714
+ class RSpec::Support::MethodSignatureExpectation
715
+ # @api private
716
+ # @return [MethodSignatureExpectation] a new instance of MethodSignatureExpectation
717
+ #
718
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#218
719
+ def initialize; end
720
+
721
+ # @api private
722
+ # @return [Boolean]
723
+ #
724
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#245
725
+ def empty?; end
726
+
727
+ # @api private
728
+ #
729
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229
730
+ def expect_arbitrary_keywords; end
731
+
732
+ # @api private
733
+ #
734
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229
735
+ def expect_arbitrary_keywords=(_arg0); end
736
+
737
+ # @api private
738
+ #
739
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229
740
+ def expect_unlimited_arguments; end
741
+
742
+ # @api private
743
+ #
744
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229
745
+ def expect_unlimited_arguments=(_arg0); end
746
+
747
+ # @api private
748
+ #
749
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227
750
+ def keywords; end
751
+
752
+ # @api private
753
+ #
754
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#252
755
+ def keywords=(values); end
756
+
757
+ # @api private
758
+ #
759
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227
760
+ def max_count; end
761
+
762
+ # @api private
763
+ # @raise [ArgumentError]
764
+ #
765
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231
766
+ def max_count=(number); end
767
+
768
+ # @api private
769
+ #
770
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227
771
+ def min_count; end
772
+
773
+ # @api private
774
+ # @raise [ArgumentError]
775
+ #
776
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#238
777
+ def min_count=(number); end
778
+ end
779
+
780
+ # Abstract base class for signature verifiers.
781
+ #
782
+ # @api private
783
+ #
784
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#278
785
+ class RSpec::Support::MethodSignatureVerifier
786
+ # @api private
787
+ # @return [MethodSignatureVerifier] a new instance of MethodSignatureVerifier
788
+ #
789
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281
790
+ def initialize(signature, args = T.unsafe(nil)); end
791
+
792
+ # @api private
793
+ #
794
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#324
795
+ def error_message; end
796
+
797
+ # @api private
798
+ #
799
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279
800
+ def kw_args; end
801
+
802
+ # @api private
803
+ #
804
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279
805
+ def max_non_kw_args; end
806
+
807
+ # @api private
808
+ #
809
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279
810
+ def min_non_kw_args; end
811
+
812
+ # @api private
813
+ #
814
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279
815
+ def non_kw_args; end
816
+
817
+ # @api private
818
+ # @return [Boolean]
819
+ #
820
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#316
821
+ def valid?; end
822
+
823
+ # @api private
824
+ #
825
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#288
826
+ def with_expectation(expectation); end
827
+
828
+ private
829
+
830
+ # @api private
831
+ # @return [Boolean]
832
+ #
833
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#355
834
+ def arbitrary_kw_args?; end
835
+
836
+ # @api private
837
+ #
838
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#351
839
+ def invalid_kw_args; end
840
+
841
+ # @api private
842
+ #
843
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#347
844
+ def missing_kw_args; end
845
+
846
+ # @api private
847
+ #
848
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#363
849
+ def split_args(*args); end
850
+
851
+ # @api private
852
+ # @return [Boolean]
853
+ #
854
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#359
855
+ def unlimited_args?; end
856
+
857
+ # @api private
858
+ # @return [Boolean]
859
+ #
860
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#343
861
+ def valid_non_kw_args?; end
862
+ end
863
+
864
+ # On 1.9 and up, this is in core, so we just use the real one
865
+ #
866
+ # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#65
867
+ class RSpec::Support::Mutex < ::Thread::Mutex
868
+ class << self
869
+ # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#68
870
+ def new; end
871
+ end
872
+ end
873
+
874
+ # If you mock Mutex.new you break our usage of Mutex, so
875
+ # instead we capture the original method to return Mutexs.
876
+ #
877
+ # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#66
878
+ RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method)
879
+
880
+ # Provides query methods for different OS or OS features.
881
+ #
882
+ # @api private
883
+ #
884
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#9
885
+ module RSpec::Support::OS
886
+ private
887
+
888
+ # @api private
889
+ #
890
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#12
891
+ def windows?; end
892
+
893
+ # @api private
894
+ #
895
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#16
896
+ def windows_file_path?; end
897
+
898
+ class << self
899
+ # @api private
900
+ # @return [Boolean]
901
+ #
902
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#12
903
+ def windows?; end
904
+
905
+ # @api private
906
+ # @return [Boolean]
907
+ #
908
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#16
909
+ def windows_file_path?; end
910
+ end
911
+ end
912
+
913
+ # Provide additional output details beyond what `inspect` provides when
914
+ # printing Time, DateTime, or BigDecimal
915
+ #
916
+ # @api private
917
+ #
918
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#8
919
+ class RSpec::Support::ObjectFormatter
920
+ # @api private
921
+ # @return [ObjectFormatter] a new instance of ObjectFormatter
922
+ #
923
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#27
924
+ def initialize(max_formatted_output_length = T.unsafe(nil)); end
925
+
926
+ # @api private
927
+ #
928
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#32
929
+ def format(object); end
930
+
931
+ # @api private
932
+ #
933
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#11
934
+ def max_formatted_output_length; end
935
+
936
+ # @api private
937
+ #
938
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#11
939
+ def max_formatted_output_length=(_arg0); end
940
+
941
+ # @api private
942
+ #
943
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#68
944
+ def prepare_array(array); end
945
+
946
+ # @api private
947
+ #
948
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#92
949
+ def prepare_element(element); end
950
+
951
+ # Prepares the provided object to be formatted by wrapping it as needed
952
+ # in something that, when `inspect` is called on it, will produce the
953
+ # desired output.
954
+ #
955
+ # This allows us to apply the desired formatting to hash/array data structures
956
+ # at any level of nesting, simply by walking that structure and replacing items
957
+ # with custom items that have `inspect` defined to return the desired output
958
+ # for that item. Then we can just use `Array#inspect` or `Hash#inspect` to
959
+ # format the entire thing.
960
+ #
961
+ # @api private
962
+ #
963
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#56
964
+ def prepare_for_inspection(object); end
965
+
966
+ # @api private
967
+ #
968
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#74
969
+ def prepare_hash(input_hash); end
970
+
971
+ # @api private
972
+ # @return [Boolean]
973
+ #
974
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#111
975
+ def recursive_structure?(object); end
976
+
977
+ # @api private
978
+ #
979
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#84
980
+ def sort_hash_keys(input_hash); end
981
+
982
+ # @api private
983
+ #
984
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#104
985
+ def with_entering_structure(structure); end
986
+
987
+ private
988
+
989
+ # Returns the substring defined by the start_index and end_index
990
+ # If the string ends with a partial ANSI code code then that
991
+ # will be removed as printing partial ANSI
992
+ # codes to the terminal can lead to corruption
993
+ #
994
+ # @api private
995
+ #
996
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#266
997
+ def truncate_string(str, start_index, end_index); end
998
+
999
+ class << self
1000
+ # Methods are deferred to a default instance of the class to maintain the interface
1001
+ # For example, calling ObjectFormatter.format is still possible
1002
+ #
1003
+ # @api private
1004
+ #
1005
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#15
1006
+ def default_instance; end
1007
+
1008
+ # @api private
1009
+ #
1010
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#19
1011
+ def format(object); end
1012
+
1013
+ # @api private
1014
+ #
1015
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#23
1016
+ def prepare_for_inspection(object); end
1017
+ end
1018
+ end
1019
+
1020
+ # @api private
1021
+ #
1022
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#125
1023
+ class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct
1024
+ # Returns the value of attribute formatter
1025
+ #
1026
+ # @return [Object] the current value of formatter
1027
+ def formatter; end
1028
+
1029
+ # Sets the attribute formatter
1030
+ #
1031
+ # @param value [Object] the value to set the attribute formatter to.
1032
+ # @return [Object] the newly set value
1033
+ def formatter=(_); end
1034
+
1035
+ # @api private
1036
+ # @raise [NotImplementedError]
1037
+ #
1038
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#130
1039
+ def inspect; end
1040
+
1041
+ # Returns the value of attribute object
1042
+ #
1043
+ # @return [Object] the current value of object
1044
+ def object; end
1045
+
1046
+ # Sets the attribute object
1047
+ #
1048
+ # @param value [Object] the value to set the attribute object to.
1049
+ # @return [Object] the newly set value
1050
+ def object=(_); end
1051
+
1052
+ # @api private
1053
+ #
1054
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#134
1055
+ def pretty_print(pp); end
1056
+
1057
+ class << self
1058
+ def [](*_arg0); end
1059
+
1060
+ # @api private
1061
+ # @raise [NotImplementedError]
1062
+ # @return [Boolean]
1063
+ #
1064
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#126
1065
+ def can_inspect?(_object); end
1066
+
1067
+ def inspect; end
1068
+ def keyword_init?; end
1069
+ def members; end
1070
+ def new(*_arg0); end
1071
+ end
1072
+ end
1073
+
1074
+ # @api private
1075
+ #
1076
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#175
1077
+ class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
1078
+ # @api private
1079
+ #
1080
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#180
1081
+ def inspect; end
1082
+
1083
+ class << self
1084
+ # @api private
1085
+ # @return [Boolean]
1086
+ #
1087
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#176
1088
+ def can_inspect?(object); end
1089
+ end
1090
+ end
1091
+
1092
+ # @api private
1093
+ #
1094
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#157
1095
+ class RSpec::Support::ObjectFormatter::DateTimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
1096
+ # ActiveSupport sometimes overrides inspect. If `ActiveSupport` is
1097
+ # defined use a custom format string that includes more time precision.
1098
+ #
1099
+ # @api private
1100
+ #
1101
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#166
1102
+ def inspect; end
1103
+
1104
+ class << self
1105
+ # @api private
1106
+ # @return [Boolean]
1107
+ #
1108
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#160
1109
+ def can_inspect?(object); end
1110
+ end
1111
+ end
1112
+
1113
+ # @api private
1114
+ #
1115
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#158
1116
+ RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String)
1117
+
1118
+ # @api private
1119
+ #
1120
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#222
1121
+ class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
1122
+ # @api private
1123
+ #
1124
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#227
1125
+ def inspect; end
1126
+
1127
+ class << self
1128
+ # @api private
1129
+ # @return [Boolean]
1130
+ #
1131
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#223
1132
+ def can_inspect?(object); end
1133
+ end
1134
+ end
1135
+
1136
+ # @api private
1137
+ #
1138
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#185
1139
+ class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
1140
+ # @api private
1141
+ #
1142
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#190
1143
+ def inspect; end
1144
+
1145
+ class << self
1146
+ # @api private
1147
+ # @return [Boolean]
1148
+ #
1149
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#186
1150
+ def can_inspect?(object); end
1151
+ end
1152
+ end
1153
+
1154
+ # @api private
1155
+ #
1156
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#9
1157
+ RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String)
1158
+
1159
+ # @api private
1160
+ #
1161
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#245
1162
+ RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array)
1163
+
1164
+ # @api private
1165
+ #
1166
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#115
1167
+ class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct
1168
+ # @api private
1169
+ #
1170
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#116
1171
+ def inspect; end
1172
+
1173
+ # @api private
1174
+ #
1175
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#120
1176
+ def pretty_print(pp); end
1177
+
1178
+ # Returns the value of attribute text
1179
+ #
1180
+ # @return [Object] the current value of text
1181
+ def text; end
1182
+
1183
+ # Sets the attribute text
1184
+ #
1185
+ # @param value [Object] the value to set the attribute text to.
1186
+ # @return [Object] the newly set value
1187
+ def text=(_); end
1188
+
1189
+ class << self
1190
+ def [](*_arg0); end
1191
+ def inspect; end
1192
+ def keyword_init?; end
1193
+ def members; end
1194
+ def new(*_arg0); end
1195
+ end
1196
+ end
1197
+
1198
+ # @api private
1199
+ #
1200
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#232
1201
+ class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
1202
+ # @api private
1203
+ #
1204
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#240
1205
+ def inspect; end
1206
+
1207
+ class << self
1208
+ # @api private
1209
+ # @return [Boolean]
1210
+ #
1211
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#233
1212
+ def can_inspect?(object); end
1213
+ end
1214
+ end
1215
+
1216
+ # @api private
1217
+ #
1218
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#139
1219
+ class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
1220
+ # for 1.8.7
1221
+ #
1222
+ # @api private
1223
+ #
1224
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#147
1225
+ def inspect; end
1226
+
1227
+ class << self
1228
+ # @api private
1229
+ # @return [Boolean]
1230
+ #
1231
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#142
1232
+ def can_inspect?(object); end
1233
+ end
1234
+ end
1235
+
1236
+ # @api private
1237
+ #
1238
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#140
1239
+ RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String)
1240
+
1241
+ # @api private
1242
+ #
1243
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#195
1244
+ class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
1245
+ # @api private
1246
+ #
1247
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#205
1248
+ def inspect; end
1249
+
1250
+ # @api private
1251
+ #
1252
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#209
1253
+ def klass; end
1254
+
1255
+ # http://stackoverflow.com/a/2818916
1256
+ #
1257
+ # @api private
1258
+ #
1259
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#214
1260
+ def native_object_id; end
1261
+
1262
+ class << self
1263
+ # @api private
1264
+ # @return [Boolean]
1265
+ #
1266
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#198
1267
+ def can_inspect?(object); end
1268
+ end
1269
+ end
1270
+
1271
+ # @api private
1272
+ #
1273
+ # source://rspec-support//lib/rspec/support/object_formatter.rb#196
1274
+ RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String)
1275
+
1276
+ # Provides recursive constant lookup methods useful for
1277
+ # constant stubbing.
1278
+ #
1279
+ # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#5
1280
+ module RSpec::Support::RecursiveConstMethods
1281
+ # @return [Boolean]
1282
+ #
1283
+ # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#43
1284
+ def const_defined_on?(mod, const_name); end
1285
+
1286
+ # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#51
1287
+ def constants_defined_on(mod); end
1288
+
1289
+ # @raise [NameError]
1290
+ #
1291
+ # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#47
1292
+ def get_const_defined_on(mod, const_name); end
1293
+
1294
+ # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#71
1295
+ def normalize_const_name(const_name); end
1296
+
1297
+ # @return [Boolean]
1298
+ #
1299
+ # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#62
1300
+ def recursive_const_defined?(const_name); end
1301
+
1302
+ # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#56
1303
+ def recursive_const_get(const_name); end
1304
+ end
1305
+
1306
+ # Allows a thread to lock out other threads from a critical section of code,
1307
+ # while allowing the thread with the lock to reenter that section.
1308
+ #
1309
+ # Based on Monitor as of 2.2 -
1310
+ # https://github.com/ruby/ruby/blob/eb7ddaa3a47bf48045d26c72eb0f263a53524ebc/lib/monitor.rb#L9
1311
+ #
1312
+ # Depends on Mutex, but Mutex is only available as part of core since 1.9.1:
1313
+ # exists - http://ruby-doc.org/core-1.9.1/Mutex.html
1314
+ # dne - http://ruby-doc.org/core-1.9.0/Mutex.html
1315
+ #
1316
+ # @private
1317
+ #
1318
+ # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#14
1319
+ class RSpec::Support::ReentrantMutex
1320
+ # @return [ReentrantMutex] a new instance of ReentrantMutex
1321
+ #
1322
+ # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#15
1323
+ def initialize; end
1324
+
1325
+ # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#21
1326
+ def synchronize; end
1327
+
1328
+ private
1329
+
1330
+ # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#33
1331
+ def enter; end
1332
+
1333
+ # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#38
1334
+ def exit; end
1335
+ end
1336
+
1337
+ # Provides query methods for different rubies
1338
+ #
1339
+ # @api private
1340
+ #
1341
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#24
1342
+ module RSpec::Support::Ruby
1343
+ private
1344
+
1345
+ # @api private
1346
+ #
1347
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#27
1348
+ def jruby?; end
1349
+
1350
+ # @api private
1351
+ #
1352
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#35
1353
+ def jruby_9000?; end
1354
+
1355
+ # @api private
1356
+ #
1357
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#31
1358
+ def jruby_version; end
1359
+
1360
+ # @api private
1361
+ #
1362
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#47
1363
+ def mri?; end
1364
+
1365
+ # @api private
1366
+ #
1367
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#43
1368
+ def non_mri?; end
1369
+
1370
+ # @api private
1371
+ #
1372
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#39
1373
+ def rbx?; end
1374
+
1375
+ # @api private
1376
+ #
1377
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#51
1378
+ def truffleruby?; end
1379
+
1380
+ class << self
1381
+ # @api private
1382
+ # @return [Boolean]
1383
+ #
1384
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#27
1385
+ def jruby?; end
1386
+
1387
+ # @api private
1388
+ # @return [Boolean]
1389
+ #
1390
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#35
1391
+ def jruby_9000?; end
1392
+
1393
+ # @api private
1394
+ #
1395
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#31
1396
+ def jruby_version; end
1397
+
1398
+ # @api private
1399
+ # @return [Boolean]
1400
+ #
1401
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#47
1402
+ def mri?; end
1403
+
1404
+ # @api private
1405
+ # @return [Boolean]
1406
+ #
1407
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#43
1408
+ def non_mri?; end
1409
+
1410
+ # @api private
1411
+ # @return [Boolean]
1412
+ #
1413
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#39
1414
+ def rbx?; end
1415
+
1416
+ # @api private
1417
+ # @return [Boolean]
1418
+ #
1419
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#51
1420
+ def truffleruby?; end
1421
+ end
1422
+ end
1423
+
1424
+ # Provides query methods for ruby features that differ among
1425
+ # implementations.
1426
+ #
1427
+ # @api private
1428
+ #
1429
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#60
1430
+ module RSpec::Support::RubyFeatures
1431
+ private
1432
+
1433
+ # @api private
1434
+ #
1435
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#83
1436
+ def caller_locations_supported?; end
1437
+
1438
+ # @api private
1439
+ #
1440
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#132
1441
+ def distincts_kw_args_from_positional_hash?; end
1442
+
1443
+ # On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true,
1444
+ # but when you try to fork, it raises an error:
1445
+ # NotImplementedError: fork is not available on this platform
1446
+ #
1447
+ # When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop
1448
+ # this special case.
1449
+ #
1450
+ # @api private
1451
+ # @return [Boolean]
1452
+ #
1453
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#74
1454
+ def fork_supported?; end
1455
+
1456
+ # @api private
1457
+ # @return [Boolean]
1458
+ #
1459
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#137
1460
+ def kw_args_supported?; end
1461
+
1462
+ # @api private
1463
+ #
1464
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#193
1465
+ def module_prepends_supported?; end
1466
+
1467
+ # @api private
1468
+ #
1469
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#189
1470
+ def module_refinement_supported?; end
1471
+
1472
+ # @api private
1473
+ #
1474
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#79
1475
+ def optional_and_splat_args_supported?; end
1476
+
1477
+ # @api private
1478
+ # @return [Boolean]
1479
+ #
1480
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#141
1481
+ def required_kw_args_supported?; end
1482
+
1483
+ # @api private
1484
+ # @return [Boolean]
1485
+ #
1486
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#123
1487
+ def ripper_supported?; end
1488
+
1489
+ # @api private
1490
+ # @return [Boolean]
1491
+ #
1492
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#88
1493
+ def supports_exception_cause?; end
1494
+
1495
+ # @api private
1496
+ # @return [Boolean]
1497
+ #
1498
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#145
1499
+ def supports_rebinding_module_methods?; end
1500
+
1501
+ # @api private
1502
+ # @return [Boolean]
1503
+ #
1504
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#98
1505
+ def supports_taint?; end
1506
+
1507
+ class << self
1508
+ # @api private
1509
+ # @return [Boolean]
1510
+ #
1511
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#83
1512
+ def caller_locations_supported?; end
1513
+
1514
+ # @api private
1515
+ # @return [Boolean]
1516
+ #
1517
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#132
1518
+ def distincts_kw_args_from_positional_hash?; end
1519
+
1520
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#74
1521
+ def fork_supported?; end
1522
+
1523
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#137
1524
+ def kw_args_supported?; end
1525
+
1526
+ # @api private
1527
+ # @return [Boolean]
1528
+ #
1529
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#193
1530
+ def module_prepends_supported?; end
1531
+
1532
+ # @api private
1533
+ # @return [Boolean]
1534
+ #
1535
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#189
1536
+ def module_refinement_supported?; end
1537
+
1538
+ # @api private
1539
+ # @return [Boolean]
1540
+ #
1541
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#79
1542
+ def optional_and_splat_args_supported?; end
1543
+
1544
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#141
1545
+ def required_kw_args_supported?; end
1546
+
1547
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#123
1548
+ def ripper_supported?; end
1549
+
1550
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#88
1551
+ def supports_exception_cause?; end
1552
+
1553
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#145
1554
+ def supports_rebinding_module_methods?; end
1555
+
1556
+ # source://rspec-support//lib/rspec/support/ruby_features.rb#98
1557
+ def supports_taint?; end
1558
+ end
1559
+ end
1560
+
1561
+ # Figures out wether a given method can accept various arguments.
1562
+ # Surprisingly non-trivial.
1563
+ #
1564
+ # @private
1565
+ #
1566
+ # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#385
1567
+ RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier
1568
+
1569
+ # source://rspec-support//lib/rspec/support/version.rb#3
1570
+ module RSpec::Support::Version; end
1571
+
1572
+ # source://rspec-support//lib/rspec/support/version.rb#4
1573
+ RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String)
1574
+
1575
+ # source://rspec-support//lib/rspec/support/warnings.rb#6
1576
+ module RSpec::Support::Warnings
1577
+ # source://rspec-support//lib/rspec/support/warnings.rb#7
1578
+ def deprecate(deprecated, options = T.unsafe(nil)); end
1579
+
1580
+ # Used internally to print deprecation warnings
1581
+ # when rspec-core isn't loaded
1582
+ #
1583
+ # @private
1584
+ #
1585
+ # source://rspec-support//lib/rspec/support/warnings.rb#15
1586
+ def warn_deprecation(message, options = T.unsafe(nil)); end
1587
+
1588
+ # Used internally to print longer warnings
1589
+ #
1590
+ # @private
1591
+ #
1592
+ # source://rspec-support//lib/rspec/support/warnings.rb#29
1593
+ def warn_with(message, options = T.unsafe(nil)); end
1594
+
1595
+ # Used internally to print warnings
1596
+ #
1597
+ # @private
1598
+ #
1599
+ # source://rspec-support//lib/rspec/support/warnings.rb#22
1600
+ def warning(text, options = T.unsafe(nil)); end
1601
+ end
1602
+
1603
+ # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#5
1604
+ module RSpec::Support::WithKeywordsWhenNeeded
1605
+ private
1606
+
1607
+ # Remove this in RSpec 4 in favour of explicitly passed in kwargs where
1608
+ # this is used. Works around a warning in Ruby 2.7
1609
+ #
1610
+ # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#15
1611
+ def class_exec(klass, *args, **_arg2, &block); end
1612
+
1613
+ class << self
1614
+ # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#15
1615
+ def class_exec(klass, *args, **_arg2, &block); end
1616
+ end
1617
+ end