danger-packwerk 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/lib/danger-packwerk/packwerk_wrapper.rb +2 -2
  3. data/lib/danger-packwerk/version.rb +1 -1
  4. data/sorbet/config +1 -0
  5. data/sorbet/rbi/gems/actionview@7.0.4.rbi +11543 -0
  6. data/sorbet/rbi/gems/activesupport@7.0.4.rbi +12959 -0
  7. data/sorbet/rbi/gems/addressable@2.8.1.rbi +1505 -0
  8. data/sorbet/rbi/gems/ast@2.4.2.rbi +522 -0
  9. data/sorbet/rbi/gems/better_html@2.0.1.rbi +286 -0
  10. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  11. data/sorbet/rbi/gems/claide-plugins@0.9.2.rbi +791 -0
  12. data/sorbet/rbi/gems/claide@1.1.0.rbi +1132 -0
  13. data/sorbet/rbi/gems/coderay@1.1.3.rbi +2256 -0
  14. data/sorbet/rbi/gems/colored2@3.1.2.rbi +130 -0
  15. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +8695 -0
  16. data/sorbet/rbi/gems/cork@0.3.0.rbi +248 -0
  17. data/sorbet/rbi/gems/crass@1.0.6.rbi +436 -0
  18. data/sorbet/rbi/gems/danger-plugin-api@1.0.0.rbi +8 -0
  19. data/sorbet/rbi/gems/danger@9.0.0.rbi +4722 -0
  20. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +862 -0
  21. data/sorbet/rbi/gems/erubi@1.11.0.rbi +102 -0
  22. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +266 -0
  23. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +209 -0
  24. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +212 -0
  25. data/sorbet/rbi/gems/faraday-http-cache@2.4.1.rbi +805 -0
  26. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +221 -0
  27. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +266 -0
  28. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +216 -0
  29. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +206 -0
  30. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +212 -0
  31. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +225 -0
  32. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +222 -0
  33. data/sorbet/rbi/gems/faraday@1.10.2.rbi +1862 -0
  34. data/sorbet/rbi/gems/git@1.12.0.rbi +1936 -0
  35. data/sorbet/rbi/gems/i18n@1.12.0.rbi +1643 -0
  36. data/sorbet/rbi/gems/json@2.6.2.rbi +1418 -0
  37. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +8 -0
  38. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +2168 -0
  39. data/sorbet/rbi/gems/loofah@2.19.0.rbi +646 -0
  40. data/sorbet/rbi/gems/method_source@1.0.0.rbi +199 -0
  41. data/sorbet/rbi/gems/minitest@5.16.3.rbi +997 -0
  42. data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +165 -0
  43. data/sorbet/rbi/gems/nap@1.1.0.rbi +351 -0
  44. data/sorbet/rbi/gems/no_proxy_fix@0.1.2.rbi +8 -0
  45. data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +4916 -0
  46. data/sorbet/rbi/gems/octokit@5.6.1.rbi +8939 -0
  47. data/sorbet/rbi/gems/open4@1.3.4.rbi +8 -0
  48. data/sorbet/rbi/gems/{packwerk@2.1.1.rbi → packwerk@2.2.1.rbi} +602 -51
  49. data/sorbet/rbi/gems/parallel@1.22.1.rbi +163 -0
  50. data/sorbet/rbi/gems/parser@3.1.2.1.rbi +5988 -0
  51. data/sorbet/rbi/gems/pry@0.14.1.rbi +6969 -0
  52. data/sorbet/rbi/gems/public_suffix@5.0.0.rbi +779 -0
  53. data/sorbet/rbi/gems/racc@1.6.0.rbi +92 -0
  54. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +8 -0
  55. data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +493 -0
  56. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +227 -0
  57. data/sorbet/rbi/gems/rake@13.0.6.rbi +1865 -0
  58. data/sorbet/rbi/gems/rbi@0.0.14.rbi +2337 -0
  59. data/sorbet/rbi/gems/rchardet@1.8.0.rbi +587 -0
  60. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +1851 -0
  61. data/sorbet/rbi/gems/rexml@3.2.5.rbi +3852 -0
  62. data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +7725 -0
  63. data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +6201 -0
  64. data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +3625 -0
  65. data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +1176 -0
  66. data/sorbet/rbi/gems/rspec@3.11.0.rbi +40 -0
  67. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +4193 -0
  68. data/sorbet/rbi/gems/rubocop-sorbet@0.6.8.rbi +677 -0
  69. data/sorbet/rbi/gems/rubocop@1.36.0.rbi +37914 -0
  70. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +732 -0
  71. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  72. data/sorbet/rbi/gems/sawyer@0.9.2.rbi +513 -0
  73. data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +326 -0
  74. data/sorbet/rbi/gems/spoom@1.1.11.rbi +1600 -0
  75. data/sorbet/rbi/gems/tapioca@0.8.0.rbi +1959 -0
  76. data/sorbet/rbi/gems/terminal-table@3.0.2.rbi +438 -0
  77. data/sorbet/rbi/gems/thor@1.2.1.rbi +2921 -0
  78. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +4879 -0
  79. data/sorbet/rbi/gems/unicode-display_width@2.3.0.rbi +27 -0
  80. data/sorbet/rbi/gems/unparser@0.6.5.rbi +2789 -0
  81. data/sorbet/rbi/gems/webrick@1.7.0.rbi +1802 -0
  82. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +288 -0
  83. data/sorbet/rbi/gems/yard@0.9.27.rbi +12668 -0
  84. data/sorbet/rbi/todo.rbi +122 -0
  85. metadata +84 -7
  86. data/sorbet/rbi/gems/danger@8.5.0.rbi +0 -122
@@ -0,0 +1,1176 @@
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
+ # Share the top-level RSpec namespace, because we are a core supported
8
+ # extension.
9
+ module RSpec
10
+ extend ::RSpec::Support::Warnings
11
+ extend ::RSpec::Core::Warnings
12
+
13
+ class << self
14
+ # Used to ensure examples get reloaded between multiple runs in the same
15
+ # process and ensures user configuration is persisted.
16
+ #
17
+ # Users must invoke this if they want to clear all examples but preserve
18
+ # current configuration when they use the runner multiple times within the
19
+ # same process.
20
+ def clear_examples; end
21
+
22
+ # Returns the global [Configuration](RSpec/Core/Configuration) object. While
23
+ # you _can_ use this method to access the configuration, the more common
24
+ # convention is to use [RSpec.configure](RSpec#configure-class_method).
25
+ #
26
+ # @example
27
+ # RSpec.configuration.drb_port = 1234
28
+ # @see RSpec.configure
29
+ # @see Core::Configuration
30
+ def configuration; end
31
+
32
+ # Setters for shared global objects
33
+ #
34
+ # @api private
35
+ def configuration=(_arg0); end
36
+
37
+ # Yields the global configuration to a block.
38
+ #
39
+ # @example
40
+ # RSpec.configure do |config|
41
+ # config.add_formatter 'documentation'
42
+ # end
43
+ # @see Core::Configuration
44
+ # @yield [Configuration] global configuration
45
+ def configure; end
46
+
47
+ # @private
48
+ def const_missing(name); end
49
+
50
+ def context(*args, &example_group_block); end
51
+
52
+ # The example being executed.
53
+ #
54
+ # The primary audience for this method is library authors who need access
55
+ # to the example currently being executed and also want to support all
56
+ # versions of RSpec 2 and 3.
57
+ #
58
+ # @example
59
+ #
60
+ # RSpec.configure do |c|
61
+ # # context.example is deprecated, but RSpec.current_example is not
62
+ # # available until RSpec 3.0.
63
+ # fetch_current_example = RSpec.respond_to?(:current_example) ?
64
+ # proc { RSpec.current_example } : proc { |context| context.example }
65
+ #
66
+ # c.before(:example) do
67
+ # example = fetch_current_example.call(self)
68
+ #
69
+ # # ...
70
+ # end
71
+ # end
72
+ def current_example; end
73
+
74
+ # Set the current example being executed.
75
+ #
76
+ # @api private
77
+ def current_example=(example); end
78
+
79
+ # Get the current RSpec execution scope
80
+ #
81
+ # Returns (in order of lifecycle):
82
+ # * `:suite` as an initial value, this is outside of the test lifecycle.
83
+ # * `:before_suite_hook` during `before(:suite)` hooks.
84
+ # * `:before_context_hook` during `before(:context)` hooks.
85
+ # * `:before_example_hook` during `before(:example)` hooks and `around(:example)` before `example.run`.
86
+ # * `:example` within the example run.
87
+ # * `:after_example_hook` during `after(:example)` hooks and `around(:example)` after `example.run`.
88
+ # * `:after_context_hook` during `after(:context)` hooks.
89
+ # * `:after_suite_hook` during `after(:suite)` hooks.
90
+ # * `:suite` as a final value, again this is outside of the test lifecycle.
91
+ #
92
+ # Reminder, `:context` hooks have `:all` alias and `:example` hooks have `:each` alias.
93
+ #
94
+ # @return [Symbol]
95
+ def current_scope; end
96
+
97
+ # Set the current scope rspec is executing in
98
+ #
99
+ # @api private
100
+ def current_scope=(scope); end
101
+
102
+ def describe(*args, &example_group_block); end
103
+ def example_group(*args, &example_group_block); end
104
+ def fcontext(*args, &example_group_block); end
105
+ def fdescribe(*args, &example_group_block); end
106
+
107
+ # Used to ensure examples get reloaded and user configuration gets reset to
108
+ # defaults between multiple runs in the same process.
109
+ #
110
+ # Users must invoke this if they want to have the configuration reset when
111
+ # they use the runner multiple times within the same process. Users must deal
112
+ # themselves with re-configuration of RSpec before run.
113
+ def reset; end
114
+
115
+ def shared_context(name, *args, &block); end
116
+ def shared_examples(name, *args, &block); end
117
+ def shared_examples_for(name, *args, &block); end
118
+
119
+ # Internal container for global non-configuration data.
120
+ #
121
+ # @private
122
+ def world; end
123
+
124
+ # Setters for shared global objects
125
+ #
126
+ # @api private
127
+ def world=(_arg0); end
128
+
129
+ def xcontext(*args, &example_group_block); end
130
+ def xdescribe(*args, &example_group_block); end
131
+ end
132
+ end
133
+
134
+ # Consistent implementation for "cleaning" the caller method to strip out
135
+ # non-rspec lines. This enables errors to be reported at the call site in
136
+ # the code using the library, which is far more useful than the particular
137
+ # internal method that raised an error.
138
+ class RSpec::CallerFilter
139
+ class << self
140
+ # Earlier rubies do not support the two argument form of `caller`. This
141
+ # fallback is logically the same, but slower.
142
+ def first_non_rspec_line(skip_frames = T.unsafe(nil), increment = T.unsafe(nil)); end
143
+ end
144
+ end
145
+
146
+ RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array)
147
+
148
+ # rubygems/core_ext/kernel_require.rb isn't actually part of rspec (obviously) but we want
149
+ # it ignored when we are looking for the first meaningful line of the backtrace outside
150
+ # of RSpec. It can show up in the backtrace as the immediate first caller
151
+ # when `CallerFilter.first_non_rspec_line` is called from the top level of a required
152
+ # file, but it depends on if rubygems is loaded or not. We don't want to have to deal
153
+ # with this complexity in our `RSpec.deprecate` calls, so we ignore it here.
154
+ RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp)
155
+
156
+ RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp)
157
+ RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array)
158
+
159
+ # @private
160
+ RSpec::MODULES_TO_AUTOLOAD = T.let(T.unsafe(nil), Hash)
161
+
162
+ # @private
163
+ RSpec::SharedContext = RSpec::Core::SharedContext
164
+
165
+ module RSpec::Support
166
+ class << self
167
+ # Used internally to get a class of a given object, even if it does not respond to #class.
168
+ #
169
+ # @api private
170
+ def class_of(object); end
171
+
172
+ # Defines a helper method that is optimized to require files from the
173
+ # named lib. The passed block MUST be `{ |f| require_relative f }`
174
+ # because for `require_relative` to work properly from within the named
175
+ # lib the line of code must be IN that lib.
176
+ #
177
+ # `require_relative` is preferred when available because it is always O(1),
178
+ # regardless of the number of dirs in $LOAD_PATH. `require`, on the other
179
+ # hand, does a linear O(N) search over the dirs in the $LOAD_PATH until
180
+ # it can resolve the file relative to one of the dirs.
181
+ #
182
+ # @api private
183
+ def define_optimized_require_for_rspec(lib, &require_relative); end
184
+
185
+ # Remove a previously registered matcher. Useful for cleaning up after
186
+ # yourself in specs.
187
+ #
188
+ # @private
189
+ def deregister_matcher_definition(&block); end
190
+
191
+ # @api private
192
+ def failure_notifier; end
193
+
194
+ # @api private
195
+ def failure_notifier=(callable); end
196
+
197
+ # @private
198
+ # @return [Boolean]
199
+ def is_a_matcher?(object); end
200
+
201
+ # @private
202
+ def matcher_definitions; end
203
+
204
+ def method_handle_for(object, method_name); end
205
+
206
+ # @api private
207
+ def notify_failure(failure, options = T.unsafe(nil)); end
208
+
209
+ # Used internally to break cyclic dependency between mocks, expectations,
210
+ # and support. We don't currently have a consistent implementation of our
211
+ # matchers, though we are considering changing that:
212
+ # https://github.com/rspec/rspec-mocks/issues/513
213
+ #
214
+ # @private
215
+ def register_matcher_definition(&block); end
216
+
217
+ def require_rspec_core(f); end
218
+ def require_rspec_expectations(f); end
219
+ def require_rspec_matchers(f); end
220
+ def require_rspec_mocks(f); end
221
+ def require_rspec_support(f); end
222
+
223
+ # gives a string representation of an object for use in RSpec descriptions
224
+ #
225
+ # @api private
226
+ def rspec_description_for_object(object); end
227
+
228
+ # A single thread local variable so we don't excessively pollute that namespace.
229
+ def thread_local_data; end
230
+
231
+ # @api private
232
+ def warning_notifier; end
233
+
234
+ # @api private
235
+ def warning_notifier=(_arg0); end
236
+
237
+ # @api private
238
+ def with_failure_notifier(callable); end
239
+ end
240
+ end
241
+
242
+ # @private
243
+ module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue
244
+ class << self
245
+ def ===(exception); end
246
+ end
247
+ end
248
+
249
+ # These exceptions are dangerous to rescue as rescuing them
250
+ # would interfere with things we should not interfere with.
251
+ RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T.unsafe(nil), Array)
252
+
253
+ # Deals with the slightly different semantics of block arguments.
254
+ # For methods, arguments are required unless a default value is provided.
255
+ # For blocks, arguments are optional, even if no default value is provided.
256
+ #
257
+ # However, we want to treat block args as required since you virtually
258
+ # always want to pass a value for each received argument and our
259
+ # `and_yield` has treated block args as required for many years.
260
+ #
261
+ # @api private
262
+ class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature
263
+ # @api private
264
+ def classify_parameters; end
265
+ end
266
+
267
+ # @private
268
+ class RSpec::Support::ComparableVersion
269
+ include ::Comparable
270
+
271
+ # @return [ComparableVersion] a new instance of ComparableVersion
272
+ def initialize(string); end
273
+
274
+ def <=>(other); end
275
+ def segments; end
276
+
277
+ # Returns the value of attribute string.
278
+ def string; end
279
+ end
280
+
281
+ # @private
282
+ RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc)
283
+
284
+ # @private
285
+ RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc)
286
+
287
+ class RSpec::Support::Differ
288
+ # @return [Differ] a new instance of Differ
289
+ def initialize(opts = T.unsafe(nil)); end
290
+
291
+ # @return [Boolean]
292
+ def color?; end
293
+
294
+ def diff(actual, expected); end
295
+ def diff_as_object(actual, expected); end
296
+ def diff_as_string(actual, expected); end
297
+
298
+ private
299
+
300
+ def add_old_hunk_to_hunk(hunk, oldhunk); end
301
+ def add_to_output(output, string); end
302
+
303
+ # @return [Boolean]
304
+ def all_strings?(*args); end
305
+
306
+ # @return [Boolean]
307
+ def any_multiline_strings?(*args); end
308
+
309
+ def blue(text); end
310
+ def build_hunks(actual, expected); end
311
+ def coerce_to_string(string_or_array); end
312
+ def color(text, color_code); end
313
+ def color_diff(diff); end
314
+ def diffably_stringify(array); end
315
+ def finalize_output(output, final_line); end
316
+ def format_type; end
317
+ def green(text); end
318
+ def handle_encoding_errors(actual, expected); end
319
+ def hash_to_string(hash); end
320
+
321
+ # @return [Boolean]
322
+ def multiline?(string); end
323
+
324
+ # @return [Boolean]
325
+ def no_numbers?(*args); end
326
+
327
+ # @return [Boolean]
328
+ def no_procs?(*args); end
329
+
330
+ def normal(text); end
331
+ def object_to_string(object); end
332
+ def red(text); end
333
+ def safely_flatten(array); end
334
+ end
335
+
336
+ # Replacement for fileutils#mkdir_p because we don't want to require parts
337
+ # of stdlib in RSpec.
338
+ #
339
+ # @api private
340
+ class RSpec::Support::DirectoryMaker
341
+ class << self
342
+ # Implements nested directory construction
343
+ #
344
+ # @api private
345
+ def mkdir_p(path); end
346
+
347
+ private
348
+
349
+ # @api private
350
+ # @return [Boolean]
351
+ def directory_exists?(dirname); end
352
+
353
+ # @api private
354
+ def generate_path(stack, part); end
355
+
356
+ # @api private
357
+ def generate_stack(path); end
358
+ end
359
+ end
360
+
361
+ # @private
362
+ class RSpec::Support::EncodedString
363
+ # @return [EncodedString] a new instance of EncodedString
364
+ def initialize(string, encoding = T.unsafe(nil)); end
365
+
366
+ def <<(string); end
367
+ def ==(*args, &block); end
368
+ def empty?(*args, &block); end
369
+ def encoding(*args, &block); end
370
+ def eql?(*args, &block); end
371
+ def lines(*args, &block); end
372
+
373
+ # Returns the value of attribute source_encoding.
374
+ def source_encoding; end
375
+
376
+ def split(regex_or_string); end
377
+ def to_s; end
378
+ def to_str; end
379
+
380
+ private
381
+
382
+ def detect_source_encoding(string); end
383
+
384
+ # Encoding Exceptions:
385
+ #
386
+ # Raised by Encoding and String methods:
387
+ # Encoding::UndefinedConversionError:
388
+ # when a transcoding operation fails
389
+ # if the String contains characters invalid for the target encoding
390
+ # e.g. "\x80".encode('UTF-8','ASCII-8BIT')
391
+ # vs "\x80".encode('UTF-8','ASCII-8BIT', undef: :replace, replace: '<undef>')
392
+ # # => '<undef>'
393
+ # Encoding::CompatibilityError
394
+ # when Encoding.compatibile?(str1, str2) is nil
395
+ # e.g. utf_16le_emoji_string.split("\n")
396
+ # e.g. valid_unicode_string.encode(utf8_encoding) << ascii_string
397
+ # Encoding::InvalidByteSequenceError:
398
+ # when the string being transcoded contains a byte invalid for
399
+ # either the source or target encoding
400
+ # e.g. "\x80".encode('UTF-8','US-ASCII')
401
+ # vs "\x80".encode('UTF-8','US-ASCII', invalid: :replace, replace: '<byte>')
402
+ # # => '<byte>'
403
+ # ArgumentError
404
+ # when operating on a string with invalid bytes
405
+ # e.g."\x80".split("\n")
406
+ # TypeError
407
+ # when a symbol is passed as an encoding
408
+ # Encoding.find(:"UTF-8")
409
+ # when calling force_encoding on an object
410
+ # that doesn't respond to #to_str
411
+ #
412
+ # Raised by transcoding methods:
413
+ # Encoding::ConverterNotFoundError:
414
+ # when a named encoding does not correspond with a known converter
415
+ # e.g. 'abc'.force_encoding('UTF-8').encode('foo')
416
+ # or a converter path cannot be found
417
+ # e.g. "\x80".force_encoding('ASCII-8BIT').encode('Emacs-Mule')
418
+ #
419
+ # Raised by byte <-> char conversions
420
+ # RangeError: out of char range
421
+ # e.g. the UTF-16LE emoji: 128169.chr
422
+ def matching_encoding(string); end
423
+
424
+ # http://stackoverflow.com/a/8711118/879854
425
+ # Loop over chars in a string replacing chars
426
+ # with invalid encoding, which is a pretty good proxy
427
+ # for the invalid byte sequence that causes an ArgumentError
428
+ def remove_invalid_bytes(string); end
429
+
430
+ class << self
431
+ def pick_encoding(source_a, source_b); end
432
+ end
433
+ end
434
+
435
+ # Ruby's default replacement string is:
436
+ # U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else
437
+ # ? ("\x3F")
438
+ RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String)
439
+
440
+ RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String)
441
+
442
+ # Reduce allocations by storing constants.
443
+ RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String)
444
+
445
+ # Provides a means to fuzzy-match between two arbitrary objects.
446
+ # Understands array/hash nesting. Uses `===` or `==` to
447
+ # perform the matching.
448
+ module RSpec::Support::FuzzyMatcher
449
+ class << self
450
+ # @api private
451
+ # @return [Boolean]
452
+ def values_match?(expected, actual); end
453
+
454
+ private
455
+
456
+ # @private
457
+ # @return [Boolean]
458
+ def arrays_match?(expected_list, actual_list); end
459
+
460
+ # @private
461
+ # @return [Boolean]
462
+ def hashes_match?(expected_hash, actual_hash); end
463
+ end
464
+ end
465
+
466
+ # @private
467
+ class RSpec::Support::HunkGenerator
468
+ # @return [HunkGenerator] a new instance of HunkGenerator
469
+ def initialize(actual, expected); end
470
+
471
+ def hunks; end
472
+
473
+ private
474
+
475
+ def actual_lines; end
476
+ def build_hunk(piece); end
477
+ def context_lines; end
478
+ def diffs; end
479
+ def expected_lines; end
480
+ end
481
+
482
+ # @api private
483
+ RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod)
484
+
485
+ # Allows matchers to be used instead of providing keyword arguments. In
486
+ # practice, when this happens only the arity of the method is verified.
487
+ #
488
+ # @private
489
+ class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier
490
+ private
491
+
492
+ def split_args(*args); end
493
+ end
494
+
495
+ # If a matcher is used in a signature in place of keyword arguments, all
496
+ # keyword argument validation needs to be skipped since the matcher is
497
+ # opaque.
498
+ #
499
+ # Instead, keyword arguments will be validated when the method is called
500
+ # and they are actually known.
501
+ #
502
+ # @private
503
+ class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
504
+ # @return [SignatureWithKeywordArgumentsMatcher] a new instance of SignatureWithKeywordArgumentsMatcher
505
+ def initialize(signature); end
506
+
507
+ # @return [Boolean]
508
+ def has_kw_args_in?(args); end
509
+
510
+ def invalid_kw_args_from(_kw_args); end
511
+ def missing_kw_args_from(_kw_args); end
512
+ def non_kw_args_arity_description; end
513
+
514
+ # @return [Boolean]
515
+ def valid_non_kw_args?(*args); end
516
+ end
517
+
518
+ # Extracts info about the number of arguments and allowed/required
519
+ # keyword args of a given method.
520
+ #
521
+ # @private
522
+ class RSpec::Support::MethodSignature
523
+ # @return [MethodSignature] a new instance of MethodSignature
524
+ def initialize(method); end
525
+
526
+ # @return [Boolean]
527
+ def arbitrary_kw_args?; end
528
+
529
+ def classify_arity(arity = T.unsafe(nil)); end
530
+ def classify_parameters; end
531
+
532
+ # Without considering what the last arg is, could it
533
+ # contain keyword arguments?
534
+ #
535
+ # @return [Boolean]
536
+ def could_contain_kw_args?(args); end
537
+
538
+ def description; end
539
+
540
+ # If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments
541
+ # the rest will be grouped in another Hash and passed as positional argument.
542
+ #
543
+ # @return [Boolean]
544
+ def has_kw_args_in?(args); end
545
+
546
+ def invalid_kw_args_from(given_kw_args); end
547
+ def max_non_kw_args; end
548
+ def min_non_kw_args; end
549
+ def missing_kw_args_from(given_kw_args); end
550
+ def non_kw_args_arity_description; end
551
+ def optional_kw_args; end
552
+ def required_kw_args; end
553
+
554
+ # @return [Boolean]
555
+ def unlimited_args?; end
556
+
557
+ # @return [Boolean]
558
+ def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = T.unsafe(nil)); end
559
+ end
560
+
561
+ RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float)
562
+
563
+ # Encapsulates expectations about the number of arguments and
564
+ # allowed/required keyword args of a given method.
565
+ #
566
+ # @api private
567
+ class RSpec::Support::MethodSignatureExpectation
568
+ # @api private
569
+ # @return [MethodSignatureExpectation] a new instance of MethodSignatureExpectation
570
+ def initialize; end
571
+
572
+ # @api private
573
+ # @return [Boolean]
574
+ def empty?; end
575
+
576
+ # @api private
577
+ def expect_arbitrary_keywords; end
578
+
579
+ # @api private
580
+ def expect_arbitrary_keywords=(_arg0); end
581
+
582
+ # @api private
583
+ def expect_unlimited_arguments; end
584
+
585
+ # @api private
586
+ def expect_unlimited_arguments=(_arg0); end
587
+
588
+ # @api private
589
+ def keywords; end
590
+
591
+ # @api private
592
+ def keywords=(values); end
593
+
594
+ # @api private
595
+ def max_count; end
596
+
597
+ # @api private
598
+ # @raise [ArgumentError]
599
+ def max_count=(number); end
600
+
601
+ # @api private
602
+ def min_count; end
603
+
604
+ # @api private
605
+ # @raise [ArgumentError]
606
+ def min_count=(number); end
607
+ end
608
+
609
+ # Abstract base class for signature verifiers.
610
+ #
611
+ # @api private
612
+ class RSpec::Support::MethodSignatureVerifier
613
+ # @api private
614
+ # @return [MethodSignatureVerifier] a new instance of MethodSignatureVerifier
615
+ def initialize(signature, args = T.unsafe(nil)); end
616
+
617
+ # @api private
618
+ def error_message; end
619
+
620
+ # @api private
621
+ def kw_args; end
622
+
623
+ # @api private
624
+ def max_non_kw_args; end
625
+
626
+ # @api private
627
+ def min_non_kw_args; end
628
+
629
+ # @api private
630
+ def non_kw_args; end
631
+
632
+ # @api private
633
+ # @return [Boolean]
634
+ def valid?; end
635
+
636
+ # @api private
637
+ def with_expectation(expectation); end
638
+
639
+ private
640
+
641
+ # @api private
642
+ # @return [Boolean]
643
+ def arbitrary_kw_args?; end
644
+
645
+ # @api private
646
+ def invalid_kw_args; end
647
+
648
+ # @api private
649
+ def missing_kw_args; end
650
+
651
+ # @api private
652
+ def split_args(*args); end
653
+
654
+ # @api private
655
+ # @return [Boolean]
656
+ def unlimited_args?; end
657
+
658
+ # @api private
659
+ # @return [Boolean]
660
+ def valid_non_kw_args?; end
661
+ end
662
+
663
+ # On 1.9 and up, this is in core, so we just use the real one
664
+ class RSpec::Support::Mutex < ::Thread::Mutex
665
+ class << self
666
+ def new; end
667
+ end
668
+ end
669
+
670
+ # If you mock Mutex.new you break our usage of Mutex, so
671
+ # instead we capture the original method to return Mutexs.
672
+ RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method)
673
+
674
+ # Provides query methods for different OS or OS features.
675
+ #
676
+ # @api private
677
+ module RSpec::Support::OS
678
+ private
679
+
680
+ # @api private
681
+ def windows?; end
682
+
683
+ # @api private
684
+ def windows_file_path?; end
685
+
686
+ class << self
687
+ # @api private
688
+ # @return [Boolean]
689
+ def windows?; end
690
+
691
+ # @api private
692
+ # @return [Boolean]
693
+ def windows_file_path?; end
694
+ end
695
+ end
696
+
697
+ # Provide additional output details beyond what `inspect` provides when
698
+ # printing Time, DateTime, or BigDecimal
699
+ #
700
+ # @api private
701
+ class RSpec::Support::ObjectFormatter
702
+ # @api private
703
+ # @return [ObjectFormatter] a new instance of ObjectFormatter
704
+ def initialize(max_formatted_output_length = T.unsafe(nil)); end
705
+
706
+ # @api private
707
+ def format(object); end
708
+
709
+ # @api private
710
+ def max_formatted_output_length; end
711
+
712
+ # @api private
713
+ def max_formatted_output_length=(_arg0); end
714
+
715
+ # @api private
716
+ def prepare_array(array); end
717
+
718
+ # @api private
719
+ def prepare_element(element); end
720
+
721
+ # Prepares the provided object to be formatted by wrapping it as needed
722
+ # in something that, when `inspect` is called on it, will produce the
723
+ # desired output.
724
+ #
725
+ # This allows us to apply the desired formatting to hash/array data structures
726
+ # at any level of nesting, simply by walking that structure and replacing items
727
+ # with custom items that have `inspect` defined to return the desired output
728
+ # for that item. Then we can just use `Array#inspect` or `Hash#inspect` to
729
+ # format the entire thing.
730
+ #
731
+ # @api private
732
+ def prepare_for_inspection(object); end
733
+
734
+ # @api private
735
+ def prepare_hash(input_hash); end
736
+
737
+ # @api private
738
+ # @return [Boolean]
739
+ def recursive_structure?(object); end
740
+
741
+ # @api private
742
+ def sort_hash_keys(input_hash); end
743
+
744
+ # @api private
745
+ def with_entering_structure(structure); end
746
+
747
+ private
748
+
749
+ # Returns the substring defined by the start_index and end_index
750
+ # If the string ends with a partial ANSI code code then that
751
+ # will be removed as printing partial ANSI
752
+ # codes to the terminal can lead to corruption
753
+ #
754
+ # @api private
755
+ def truncate_string(str, start_index, end_index); end
756
+
757
+ class << self
758
+ # Methods are deferred to a default instance of the class to maintain the interface
759
+ # For example, calling ObjectFormatter.format is still possible
760
+ #
761
+ # @api private
762
+ def default_instance; end
763
+
764
+ # @api private
765
+ def format(object); end
766
+
767
+ # @api private
768
+ def prepare_for_inspection(object); end
769
+ end
770
+ end
771
+
772
+ # @api private
773
+ class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct
774
+ # Returns the value of attribute formatter
775
+ #
776
+ # @return [Object] the current value of formatter
777
+ def formatter; end
778
+
779
+ # Sets the attribute formatter
780
+ #
781
+ # @param value [Object] the value to set the attribute formatter to.
782
+ # @return [Object] the newly set value
783
+ def formatter=(_); end
784
+
785
+ # @api private
786
+ # @raise [NotImplementedError]
787
+ def inspect; end
788
+
789
+ # Returns the value of attribute object
790
+ #
791
+ # @return [Object] the current value of object
792
+ def object; end
793
+
794
+ # Sets the attribute object
795
+ #
796
+ # @param value [Object] the value to set the attribute object to.
797
+ # @return [Object] the newly set value
798
+ def object=(_); end
799
+
800
+ # @api private
801
+ def pretty_print(pp); end
802
+
803
+ class << self
804
+ def [](*_arg0); end
805
+
806
+ # @api private
807
+ # @raise [NotImplementedError]
808
+ # @return [Boolean]
809
+ def can_inspect?(_object); end
810
+
811
+ def inspect; end
812
+ def members; end
813
+ def new(*_arg0); end
814
+ end
815
+ end
816
+
817
+ # @api private
818
+ class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
819
+ # @api private
820
+ def inspect; end
821
+
822
+ class << self
823
+ # @api private
824
+ # @return [Boolean]
825
+ def can_inspect?(object); end
826
+ end
827
+ end
828
+
829
+ # @api private
830
+ class RSpec::Support::ObjectFormatter::DateTimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
831
+ # ActiveSupport sometimes overrides inspect. If `ActiveSupport` is
832
+ # defined use a custom format string that includes more time precision.
833
+ #
834
+ # @api private
835
+ def inspect; end
836
+
837
+ class << self
838
+ # @api private
839
+ # @return [Boolean]
840
+ def can_inspect?(object); end
841
+ end
842
+ end
843
+
844
+ # @api private
845
+ RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String)
846
+
847
+ # @api private
848
+ class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
849
+ # @api private
850
+ def inspect; end
851
+
852
+ class << self
853
+ # @api private
854
+ # @return [Boolean]
855
+ def can_inspect?(object); end
856
+ end
857
+ end
858
+
859
+ # @api private
860
+ class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
861
+ # @api private
862
+ def inspect; end
863
+
864
+ class << self
865
+ # @api private
866
+ # @return [Boolean]
867
+ def can_inspect?(object); end
868
+ end
869
+ end
870
+
871
+ # @api private
872
+ RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String)
873
+
874
+ # @api private
875
+ RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array)
876
+
877
+ # @api private
878
+ class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct
879
+ # @api private
880
+ def inspect; end
881
+
882
+ # @api private
883
+ def pretty_print(pp); end
884
+
885
+ # Returns the value of attribute text
886
+ #
887
+ # @return [Object] the current value of text
888
+ def text; end
889
+
890
+ # Sets the attribute text
891
+ #
892
+ # @param value [Object] the value to set the attribute text to.
893
+ # @return [Object] the newly set value
894
+ def text=(_); end
895
+
896
+ class << self
897
+ def [](*_arg0); end
898
+ def inspect; end
899
+ def members; end
900
+ def new(*_arg0); end
901
+ end
902
+ end
903
+
904
+ # @api private
905
+ class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
906
+ # @api private
907
+ def inspect; end
908
+
909
+ class << self
910
+ # @api private
911
+ # @return [Boolean]
912
+ def can_inspect?(object); end
913
+ end
914
+ end
915
+
916
+ # @api private
917
+ class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
918
+ # for 1.8.7
919
+ #
920
+ # @api private
921
+ def inspect; end
922
+
923
+ class << self
924
+ # @api private
925
+ # @return [Boolean]
926
+ def can_inspect?(object); end
927
+ end
928
+ end
929
+
930
+ # @api private
931
+ RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String)
932
+
933
+ # @api private
934
+ class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
935
+ # @api private
936
+ def inspect; end
937
+
938
+ # @api private
939
+ def klass; end
940
+
941
+ # http://stackoverflow.com/a/2818916
942
+ #
943
+ # @api private
944
+ def native_object_id; end
945
+
946
+ class << self
947
+ # @api private
948
+ # @return [Boolean]
949
+ def can_inspect?(object); end
950
+ end
951
+ end
952
+
953
+ # @api private
954
+ RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String)
955
+
956
+ # Provides recursive constant lookup methods useful for
957
+ # constant stubbing.
958
+ module RSpec::Support::RecursiveConstMethods
959
+ # @return [Boolean]
960
+ def const_defined_on?(mod, const_name); end
961
+
962
+ def constants_defined_on(mod); end
963
+
964
+ # @raise [NameError]
965
+ def get_const_defined_on(mod, const_name); end
966
+
967
+ def normalize_const_name(const_name); end
968
+
969
+ # @return [Boolean]
970
+ def recursive_const_defined?(const_name); end
971
+
972
+ def recursive_const_get(const_name); end
973
+ end
974
+
975
+ # Allows a thread to lock out other threads from a critical section of code,
976
+ # while allowing the thread with the lock to reenter that section.
977
+ #
978
+ # Based on Monitor as of 2.2 -
979
+ # https://github.com/ruby/ruby/blob/eb7ddaa3a47bf48045d26c72eb0f263a53524ebc/lib/monitor.rb#L9
980
+ #
981
+ # Depends on Mutex, but Mutex is only available as part of core since 1.9.1:
982
+ # exists - http://ruby-doc.org/core-1.9.1/Mutex.html
983
+ # dne - http://ruby-doc.org/core-1.9.0/Mutex.html
984
+ #
985
+ # @private
986
+ class RSpec::Support::ReentrantMutex
987
+ # @return [ReentrantMutex] a new instance of ReentrantMutex
988
+ def initialize; end
989
+
990
+ def synchronize; end
991
+
992
+ private
993
+
994
+ def enter; end
995
+ def exit; end
996
+ end
997
+
998
+ # Provides query methods for different rubies
999
+ #
1000
+ # @api private
1001
+ module RSpec::Support::Ruby
1002
+ private
1003
+
1004
+ # @api private
1005
+ def jruby?; end
1006
+
1007
+ # @api private
1008
+ def jruby_9000?; end
1009
+
1010
+ # @api private
1011
+ def jruby_version; end
1012
+
1013
+ # @api private
1014
+ def mri?; end
1015
+
1016
+ # @api private
1017
+ def non_mri?; end
1018
+
1019
+ # @api private
1020
+ def rbx?; end
1021
+
1022
+ # @api private
1023
+ def truffleruby?; end
1024
+
1025
+ class << self
1026
+ # @api private
1027
+ # @return [Boolean]
1028
+ def jruby?; end
1029
+
1030
+ # @api private
1031
+ # @return [Boolean]
1032
+ def jruby_9000?; end
1033
+
1034
+ # @api private
1035
+ def jruby_version; end
1036
+
1037
+ # @api private
1038
+ # @return [Boolean]
1039
+ def mri?; end
1040
+
1041
+ # @api private
1042
+ # @return [Boolean]
1043
+ def non_mri?; end
1044
+
1045
+ # @api private
1046
+ # @return [Boolean]
1047
+ def rbx?; end
1048
+
1049
+ # @api private
1050
+ # @return [Boolean]
1051
+ def truffleruby?; end
1052
+ end
1053
+ end
1054
+
1055
+ # Provides query methods for ruby features that differ among
1056
+ # implementations.
1057
+ #
1058
+ # @api private
1059
+ module RSpec::Support::RubyFeatures
1060
+ private
1061
+
1062
+ # @api private
1063
+ def caller_locations_supported?; end
1064
+
1065
+ # On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true,
1066
+ # but when you try to fork, it raises an error:
1067
+ # NotImplementedError: fork is not available on this platform
1068
+ #
1069
+ # When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop
1070
+ # this special case.
1071
+ #
1072
+ # @api private
1073
+ # @return [Boolean]
1074
+ def fork_supported?; end
1075
+
1076
+ # @api private
1077
+ # @return [Boolean]
1078
+ def kw_args_supported?; end
1079
+
1080
+ # @api private
1081
+ def module_prepends_supported?; end
1082
+
1083
+ # @api private
1084
+ def module_refinement_supported?; end
1085
+
1086
+ # @api private
1087
+ def optional_and_splat_args_supported?; end
1088
+
1089
+ # @api private
1090
+ # @return [Boolean]
1091
+ def required_kw_args_supported?; end
1092
+
1093
+ # @api private
1094
+ # @return [Boolean]
1095
+ def ripper_supported?; end
1096
+
1097
+ # @api private
1098
+ # @return [Boolean]
1099
+ def supports_exception_cause?; end
1100
+
1101
+ # @api private
1102
+ # @return [Boolean]
1103
+ def supports_rebinding_module_methods?; end
1104
+
1105
+ # @api private
1106
+ # @return [Boolean]
1107
+ def supports_taint?; end
1108
+
1109
+ class << self
1110
+ # @api private
1111
+ # @return [Boolean]
1112
+ def caller_locations_supported?; end
1113
+
1114
+ def fork_supported?; end
1115
+ def kw_args_supported?; end
1116
+
1117
+ # @api private
1118
+ # @return [Boolean]
1119
+ def module_prepends_supported?; end
1120
+
1121
+ # @api private
1122
+ # @return [Boolean]
1123
+ def module_refinement_supported?; end
1124
+
1125
+ # @api private
1126
+ # @return [Boolean]
1127
+ def optional_and_splat_args_supported?; end
1128
+
1129
+ def required_kw_args_supported?; end
1130
+ def ripper_supported?; end
1131
+ def supports_exception_cause?; end
1132
+ def supports_rebinding_module_methods?; end
1133
+ def supports_taint?; end
1134
+ end
1135
+ end
1136
+
1137
+ # Figures out wether a given method can accept various arguments.
1138
+ # Surprisingly non-trivial.
1139
+ #
1140
+ # @private
1141
+ RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier
1142
+
1143
+ module RSpec::Support::Version; end
1144
+ RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String)
1145
+
1146
+ module RSpec::Support::Warnings
1147
+ def deprecate(deprecated, options = T.unsafe(nil)); end
1148
+
1149
+ # Used internally to print deprecation warnings
1150
+ # when rspec-core isn't loaded
1151
+ #
1152
+ # @private
1153
+ def warn_deprecation(message, options = T.unsafe(nil)); end
1154
+
1155
+ # Used internally to print longer warnings
1156
+ #
1157
+ # @private
1158
+ def warn_with(message, options = T.unsafe(nil)); end
1159
+
1160
+ # Used internally to print warnings
1161
+ #
1162
+ # @private
1163
+ def warning(text, options = T.unsafe(nil)); end
1164
+ end
1165
+
1166
+ module RSpec::Support::WithKeywordsWhenNeeded
1167
+ private
1168
+
1169
+ # Remove this in RSpec 4 in favour of explictly passed in kwargs where
1170
+ # this is used. Works around a warning in Ruby 2.7
1171
+ def class_exec(klass, *args, &block); end
1172
+
1173
+ class << self
1174
+ def class_exec(klass, *args, &block); end
1175
+ end
1176
+ end