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