packwerk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  3. data/.github/probots.yml +2 -0
  4. data/.github/pull_request_template.md +27 -0
  5. data/.github/workflows/ci.yml +50 -0
  6. data/.gitignore +12 -0
  7. data/.rubocop.yml +46 -0
  8. data/.ruby-version +1 -0
  9. data/CODEOWNERS +1 -0
  10. data/CODE_OF_CONDUCT.md +76 -0
  11. data/CONTRIBUTING.md +17 -0
  12. data/Gemfile +22 -0
  13. data/Gemfile.lock +236 -0
  14. data/LICENSE.md +7 -0
  15. data/README.md +73 -0
  16. data/Rakefile +13 -0
  17. data/TROUBLESHOOT.md +67 -0
  18. data/USAGE.md +250 -0
  19. data/bin/console +15 -0
  20. data/bin/setup +8 -0
  21. data/dev.yml +32 -0
  22. data/docs/cohesion.png +0 -0
  23. data/exe/packwerk +6 -0
  24. data/lib/packwerk.rb +44 -0
  25. data/lib/packwerk/application_validator.rb +343 -0
  26. data/lib/packwerk/association_inspector.rb +44 -0
  27. data/lib/packwerk/checking_deprecated_references.rb +40 -0
  28. data/lib/packwerk/cli.rb +238 -0
  29. data/lib/packwerk/configuration.rb +82 -0
  30. data/lib/packwerk/const_node_inspector.rb +44 -0
  31. data/lib/packwerk/constant_discovery.rb +60 -0
  32. data/lib/packwerk/constant_name_inspector.rb +22 -0
  33. data/lib/packwerk/dependency_checker.rb +28 -0
  34. data/lib/packwerk/deprecated_references.rb +92 -0
  35. data/lib/packwerk/file_processor.rb +43 -0
  36. data/lib/packwerk/files_for_processing.rb +67 -0
  37. data/lib/packwerk/formatters/progress_formatter.rb +46 -0
  38. data/lib/packwerk/generators/application_validation.rb +62 -0
  39. data/lib/packwerk/generators/configuration_file.rb +69 -0
  40. data/lib/packwerk/generators/inflections_file.rb +43 -0
  41. data/lib/packwerk/generators/root_package.rb +37 -0
  42. data/lib/packwerk/generators/templates/inflections.yml +6 -0
  43. data/lib/packwerk/generators/templates/package.yml +17 -0
  44. data/lib/packwerk/generators/templates/packwerk +23 -0
  45. data/lib/packwerk/generators/templates/packwerk.yml.erb +23 -0
  46. data/lib/packwerk/generators/templates/packwerk_validator_test.rb +11 -0
  47. data/lib/packwerk/graph.rb +74 -0
  48. data/lib/packwerk/inflections/custom.rb +33 -0
  49. data/lib/packwerk/inflections/default.rb +73 -0
  50. data/lib/packwerk/inflector.rb +41 -0
  51. data/lib/packwerk/node.rb +259 -0
  52. data/lib/packwerk/node_processor.rb +49 -0
  53. data/lib/packwerk/node_visitor.rb +22 -0
  54. data/lib/packwerk/offense.rb +44 -0
  55. data/lib/packwerk/output_styles.rb +41 -0
  56. data/lib/packwerk/package.rb +56 -0
  57. data/lib/packwerk/package_set.rb +59 -0
  58. data/lib/packwerk/parsed_constant_definitions.rb +62 -0
  59. data/lib/packwerk/parsers.rb +23 -0
  60. data/lib/packwerk/parsers/erb.rb +66 -0
  61. data/lib/packwerk/parsers/factory.rb +34 -0
  62. data/lib/packwerk/parsers/ruby.rb +42 -0
  63. data/lib/packwerk/privacy_checker.rb +45 -0
  64. data/lib/packwerk/reference.rb +6 -0
  65. data/lib/packwerk/reference_extractor.rb +81 -0
  66. data/lib/packwerk/reference_lister.rb +23 -0
  67. data/lib/packwerk/run_context.rb +103 -0
  68. data/lib/packwerk/sanity_checker.rb +10 -0
  69. data/lib/packwerk/spring_command.rb +28 -0
  70. data/lib/packwerk/updating_deprecated_references.rb +51 -0
  71. data/lib/packwerk/version.rb +6 -0
  72. data/lib/packwerk/violation_type.rb +13 -0
  73. data/library.yml +6 -0
  74. data/packwerk.gemspec +58 -0
  75. data/service.yml +6 -0
  76. data/shipit.rubygems.yml +1 -0
  77. data/sorbet/config +2 -0
  78. data/sorbet/rbi/gems/actioncable@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +840 -0
  79. data/sorbet/rbi/gems/actionmailbox@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +571 -0
  80. data/sorbet/rbi/gems/actionmailer@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +568 -0
  81. data/sorbet/rbi/gems/actionpack@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +5216 -0
  82. data/sorbet/rbi/gems/actiontext@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +663 -0
  83. data/sorbet/rbi/gems/actionview@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +2504 -0
  84. data/sorbet/rbi/gems/activejob@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +635 -0
  85. data/sorbet/rbi/gems/activemodel@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +1201 -0
  86. data/sorbet/rbi/gems/activerecord@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8011 -0
  87. data/sorbet/rbi/gems/activestorage@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +904 -0
  88. data/sorbet/rbi/gems/activesupport@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +3888 -0
  89. data/sorbet/rbi/gems/ast@2.4.1.rbi +54 -0
  90. data/sorbet/rbi/gems/better_html@1.0.15.rbi +317 -0
  91. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  92. data/sorbet/rbi/gems/byebug@11.1.3.rbi +8 -0
  93. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  94. data/sorbet/rbi/gems/colorize@0.8.1.rbi +40 -0
  95. data/sorbet/rbi/gems/commander@4.5.2.rbi +8 -0
  96. data/sorbet/rbi/gems/concurrent-ruby@1.1.6.rbi +1966 -0
  97. data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +26 -0
  98. data/sorbet/rbi/gems/crass@1.0.6.rbi +138 -0
  99. data/sorbet/rbi/gems/erubi@1.9.0.rbi +39 -0
  100. data/sorbet/rbi/gems/globalid@0.4.2.rbi +178 -0
  101. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  102. data/sorbet/rbi/gems/html_tokenizer@0.0.7.rbi +46 -0
  103. data/sorbet/rbi/gems/i18n@1.8.2.rbi +633 -0
  104. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +8 -0
  105. data/sorbet/rbi/gems/loofah@2.5.0.rbi +272 -0
  106. data/sorbet/rbi/gems/m@1.5.1.rbi +108 -0
  107. data/sorbet/rbi/gems/mail@2.7.1.rbi +2490 -0
  108. data/sorbet/rbi/gems/marcel@0.3.3.rbi +30 -0
  109. data/sorbet/rbi/gems/method_source@1.0.0.rbi +76 -0
  110. data/sorbet/rbi/gems/mimemagic@0.3.5.rbi +47 -0
  111. data/sorbet/rbi/gems/mini_mime@1.0.2.rbi +71 -0
  112. data/sorbet/rbi/gems/mini_portile2@2.4.0.rbi +8 -0
  113. data/sorbet/rbi/gems/minitest@5.14.0.rbi +542 -0
  114. data/sorbet/rbi/gems/mocha@1.11.2.rbi +964 -0
  115. data/sorbet/rbi/gems/nio4r@2.5.2.rbi +89 -0
  116. data/sorbet/rbi/gems/nokogiri@1.10.9.rbi +1608 -0
  117. data/sorbet/rbi/gems/parallel@1.19.1.rbi +8 -0
  118. data/sorbet/rbi/gems/parlour@4.0.1.rbi +561 -0
  119. data/sorbet/rbi/gems/parser@2.7.1.4.rbi +1632 -0
  120. data/sorbet/rbi/gems/pry@0.13.1.rbi +8 -0
  121. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +335 -0
  122. data/sorbet/rbi/gems/rack@2.2.2.rbi +1730 -0
  123. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +123 -0
  124. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +213 -0
  125. data/sorbet/rbi/gems/rails@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8 -0
  126. data/sorbet/rbi/gems/railties@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +869 -0
  127. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +155 -0
  128. data/sorbet/rbi/gems/rake@13.0.1.rbi +841 -0
  129. data/sorbet/rbi/gems/rexml@3.2.4.rbi +8 -0
  130. data/sorbet/rbi/gems/rubocop-performance@1.5.2.rbi +8 -0
  131. data/sorbet/rbi/gems/rubocop-shopify@1.0.2.rbi +8 -0
  132. data/sorbet/rbi/gems/rubocop-sorbet@0.3.7.rbi +8 -0
  133. data/sorbet/rbi/gems/rubocop@0.82.0.rbi +8 -0
  134. data/sorbet/rbi/gems/ruby-progressbar@1.10.1.rbi +8 -0
  135. data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +168 -0
  136. data/sorbet/rbi/gems/spoom@1.0.4.rbi +418 -0
  137. data/sorbet/rbi/gems/spring@2.1.0.rbi +160 -0
  138. data/sorbet/rbi/gems/sprockets-rails@3.2.1.rbi +431 -0
  139. data/sorbet/rbi/gems/sprockets@4.0.0.rbi +1132 -0
  140. data/sorbet/rbi/gems/tapioca@0.4.5.rbi +518 -0
  141. data/sorbet/rbi/gems/thor@1.0.1.rbi +892 -0
  142. data/sorbet/rbi/gems/tzinfo@2.0.2.rbi +547 -0
  143. data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +8 -0
  144. data/sorbet/rbi/gems/websocket-driver@0.7.1.rbi +438 -0
  145. data/sorbet/rbi/gems/websocket-extensions@0.1.4.rbi +71 -0
  146. data/sorbet/rbi/gems/zeitwerk@2.3.0.rbi +8 -0
  147. data/sorbet/tapioca/require.rb +25 -0
  148. data/static/packwerk-check-demo.png +0 -0
  149. data/static/packwerk_check.gif +0 -0
  150. data/static/packwerk_check_violation.gif +0 -0
  151. data/static/packwerk_update.gif +0 -0
  152. data/static/packwerk_validate.gif +0 -0
  153. metadata +341 -0
@@ -0,0 +1,964 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `mocha` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ module Mocha
8
+ class << self
9
+ def configuration; end
10
+ def configure; end
11
+ end
12
+ end
13
+
14
+ module Mocha::API
15
+ include(::Mocha::ParameterMatchers)
16
+ include(::Mocha::Hooks)
17
+
18
+ def mock(*arguments); end
19
+ def sequence(name); end
20
+ def states(name); end
21
+ def stub(*arguments); end
22
+ def stub_everything(*arguments); end
23
+
24
+ class << self
25
+ def extended(mod); end
26
+ def included(_mod); end
27
+ end
28
+ end
29
+
30
+ class Mocha::AnyInstanceMethod < ::Mocha::StubbedMethod
31
+
32
+ private
33
+
34
+ def method_body(method); end
35
+ def mock_owner; end
36
+ def original_method_owner; end
37
+ def stubbee_method(method_name); end
38
+ end
39
+
40
+ class Mocha::AnyInstanceReceiver
41
+ def initialize(klass); end
42
+
43
+ def mocks; end
44
+ end
45
+
46
+ class Mocha::ArgumentIterator
47
+ def initialize(argument); end
48
+
49
+ def each; end
50
+ end
51
+
52
+ class Mocha::BacktraceFilter
53
+ def initialize(lib_directory = T.unsafe(nil)); end
54
+
55
+ def filtered(backtrace); end
56
+ end
57
+
58
+ Mocha::BacktraceFilter::LIB_DIRECTORY = T.let(T.unsafe(nil), String)
59
+
60
+ module Mocha::BlockMatchers
61
+ end
62
+
63
+ class Mocha::BlockMatchers::BlockGiven
64
+ def match?(actual_block); end
65
+ def mocha_inspect; end
66
+ end
67
+
68
+ class Mocha::BlockMatchers::NoBlockGiven
69
+ def match?(actual_block); end
70
+ def mocha_inspect; end
71
+ end
72
+
73
+ class Mocha::BlockMatchers::OptionalBlock
74
+ def match?(_actual_block); end
75
+ def mocha_inspect; end
76
+ end
77
+
78
+ class Mocha::Cardinality
79
+ def initialize(required, maximum); end
80
+
81
+ def <<(invocation); end
82
+ def actual_invocations; end
83
+ def allowed_any_number_of_times?; end
84
+ def anticipated_times; end
85
+ def invocations_allowed?; end
86
+ def invoked_times; end
87
+ def needs_verifying?; end
88
+ def satisfied?; end
89
+ def used?; end
90
+ def verified?; end
91
+
92
+ protected
93
+
94
+ def infinite?(number); end
95
+ def maximum; end
96
+ def required; end
97
+ def times(number); end
98
+
99
+ class << self
100
+ def at_least(count); end
101
+ def at_most(count); end
102
+ def exactly(count); end
103
+ def times(range_or_count); end
104
+ end
105
+ end
106
+
107
+ Mocha::Cardinality::INFINITY = T.let(T.unsafe(nil), Float)
108
+
109
+ class Mocha::Central
110
+ def initialize; end
111
+
112
+ def stub(method); end
113
+ def stubba_methods; end
114
+ def stubba_methods=(_); end
115
+ def unstub(method); end
116
+ def unstub_all; end
117
+ end
118
+
119
+ class Mocha::Central::Null < ::Mocha::Central
120
+ def initialize(&block); end
121
+
122
+ def stub(*_); end
123
+ def unstub(*_); end
124
+ end
125
+
126
+ class Mocha::ChangeStateSideEffect
127
+ def initialize(state); end
128
+
129
+ def mocha_inspect; end
130
+ def perform; end
131
+ end
132
+
133
+ module Mocha::ClassMethods
134
+ def __method_exists__?(method, include_public_methods = T.unsafe(nil)); end
135
+ def __method_visibility__(method, include_public_methods = T.unsafe(nil)); end
136
+ def any_instance; end
137
+ end
138
+
139
+ class Mocha::ClassMethods::AnyInstance
140
+ def initialize(klass); end
141
+
142
+ def mocha(instantiate = T.unsafe(nil)); end
143
+ def respond_to?(method); end
144
+ def stubba_class; end
145
+ def stubba_method; end
146
+ def stubba_object; end
147
+ end
148
+
149
+ class Mocha::Configuration
150
+ def initialize(options = T.unsafe(nil)); end
151
+
152
+ def display_matching_invocations_on_failure=(value); end
153
+ def display_matching_invocations_on_failure?; end
154
+ def merge(other); end
155
+ def reinstate_undocumented_behaviour_from_v1_9=(value); end
156
+ def reinstate_undocumented_behaviour_from_v1_9?; end
157
+ def stubbing_method_on_nil; end
158
+ def stubbing_method_on_nil=(value); end
159
+ def stubbing_method_on_non_mock_object; end
160
+ def stubbing_method_on_non_mock_object=(value); end
161
+ def stubbing_method_unnecessarily; end
162
+ def stubbing_method_unnecessarily=(value); end
163
+ def stubbing_non_existent_method; end
164
+ def stubbing_non_existent_method=(value); end
165
+ def stubbing_non_public_method; end
166
+ def stubbing_non_public_method=(value); end
167
+
168
+ protected
169
+
170
+ def options; end
171
+
172
+ private
173
+
174
+ def initialize_copy(other); end
175
+
176
+ class << self
177
+ def allow(action, &block); end
178
+ def allow?(action); end
179
+ def configuration; end
180
+ def override(temporary_options); end
181
+ def prevent(action, &block); end
182
+ def prevent?(action); end
183
+ def reset_configuration; end
184
+ def warn_when(action, &block); end
185
+ def warn_when?(action); end
186
+
187
+ private
188
+
189
+ def change_config(action, new_value, &block); end
190
+ def temporarily_change_config(action, new_value); end
191
+ end
192
+ end
193
+
194
+ Mocha::Configuration::DEFAULTS = T.let(T.unsafe(nil), Hash)
195
+
196
+ module Mocha::Debug
197
+ class << self
198
+ def puts(message); end
199
+ end
200
+ end
201
+
202
+ Mocha::Debug::OPTIONS = T.let(T.unsafe(nil), Hash)
203
+
204
+ class Mocha::DefaultName
205
+ def initialize(mock); end
206
+
207
+ def mocha_inspect; end
208
+ end
209
+
210
+ class Mocha::DefaultReceiver
211
+ def initialize(mock); end
212
+
213
+ def mocks; end
214
+ end
215
+
216
+ class Mocha::Deprecation
217
+ class << self
218
+ def messages; end
219
+ def messages=(_); end
220
+ def mode; end
221
+ def mode=(_); end
222
+ def warning(*messages); end
223
+ end
224
+ end
225
+
226
+ module Mocha::Detection
227
+ end
228
+
229
+ module Mocha::Detection::MiniTest
230
+ class << self
231
+ def testcase; end
232
+ def version; end
233
+ end
234
+ end
235
+
236
+ class Mocha::ErrorWithFilteredBacktrace < ::StandardError
237
+ def initialize(message = T.unsafe(nil), backtrace = T.unsafe(nil)); end
238
+ end
239
+
240
+ class Mocha::ExceptionRaiser
241
+ def initialize(exception, message); end
242
+
243
+ def evaluate(invocation); end
244
+ end
245
+
246
+ class Mocha::Expectation
247
+ def initialize(mock, expected_method_name, backtrace = T.unsafe(nil)); end
248
+
249
+ def add_in_sequence_ordering_constraint(sequence); end
250
+ def add_ordering_constraint(ordering_constraint); end
251
+ def add_side_effect(side_effect); end
252
+ def at_least(minimum_number_of_times); end
253
+ def at_least_once; end
254
+ def at_most(maximum_number_of_times); end
255
+ def at_most_once; end
256
+ def backtrace; end
257
+ def in_correct_order?; end
258
+ def in_sequence(sequence, *sequences); end
259
+ def inspect; end
260
+ def invocations_allowed?; end
261
+ def invoke(invocation); end
262
+ def match?(invocation); end
263
+ def matches_method?(method_name); end
264
+ def method_signature; end
265
+ def mocha_inspect; end
266
+ def multiple_yields(*parameter_groups); end
267
+ def never; end
268
+ def once; end
269
+ def perform_side_effects; end
270
+ def raises(exception = T.unsafe(nil), message = T.unsafe(nil)); end
271
+ def returns(*values); end
272
+ def satisfied?; end
273
+ def then(*parameters); end
274
+ def throws(tag, object = T.unsafe(nil)); end
275
+ def times(range); end
276
+ def twice; end
277
+ def used?; end
278
+ def verified?(assertion_counter = T.unsafe(nil)); end
279
+ def when(state_predicate); end
280
+ def with(*expected_parameters, &matching_block); end
281
+ def with_block_given; end
282
+ def with_no_block_given; end
283
+ def yields(*parameters); end
284
+ end
285
+
286
+ class Mocha::ExpectationError < ::Exception
287
+ end
288
+
289
+ class Mocha::ExpectationErrorFactory
290
+ class << self
291
+ def build(message = T.unsafe(nil), backtrace = T.unsafe(nil)); end
292
+ def exception_class; end
293
+ def exception_class=(_); end
294
+ end
295
+ end
296
+
297
+ class Mocha::ExpectationList
298
+ def initialize(expectations = T.unsafe(nil)); end
299
+
300
+ def +(other); end
301
+ def add(expectation); end
302
+ def any?; end
303
+ def length; end
304
+ def match(invocation); end
305
+ def match_allowing_invocation(invocation); end
306
+ def matches_method?(method_name); end
307
+ def remove_all_matching_method(method_name); end
308
+ def to_a; end
309
+ def to_set; end
310
+ def verified?(assertion_counter = T.unsafe(nil)); end
311
+
312
+ private
313
+
314
+ def matching_expectations(invocation); end
315
+ end
316
+
317
+ module Mocha::Hooks
318
+ def mocha_setup; end
319
+ def mocha_teardown; end
320
+ def mocha_verify(assertion_counter = T.unsafe(nil)); end
321
+ end
322
+
323
+ class Mocha::ImpersonatingAnyInstanceName
324
+ def initialize(klass); end
325
+
326
+ def mocha_inspect; end
327
+ end
328
+
329
+ class Mocha::ImpersonatingName
330
+ def initialize(object); end
331
+
332
+ def mocha_inspect; end
333
+ end
334
+
335
+ class Mocha::InStateOrderingConstraint
336
+ def initialize(state_predicate); end
337
+
338
+ def allows_invocation_now?; end
339
+ def mocha_inspect; end
340
+ end
341
+
342
+ module Mocha::Inspect
343
+ end
344
+
345
+ module Mocha::Inspect::ArrayMethods
346
+ def mocha_inspect; end
347
+ end
348
+
349
+ module Mocha::Inspect::DateMethods
350
+ def mocha_inspect; end
351
+ end
352
+
353
+ module Mocha::Inspect::HashMethods
354
+ def mocha_inspect; end
355
+ end
356
+
357
+ module Mocha::Inspect::ObjectMethods
358
+ def mocha_inspect; end
359
+ end
360
+
361
+ module Mocha::Inspect::TimeMethods
362
+ def mocha_inspect; end
363
+ end
364
+
365
+ class Mocha::InstanceMethod < ::Mocha::StubbedMethod
366
+
367
+ private
368
+
369
+ def method_body(method); end
370
+ def mock_owner; end
371
+ def original_method_owner; end
372
+ def stubbee_method(method_name); end
373
+ end
374
+
375
+ module Mocha::Integration
376
+ end
377
+
378
+ class Mocha::Integration::AssertionCounter
379
+ def initialize(test_case); end
380
+
381
+ def increment; end
382
+ end
383
+
384
+ module Mocha::Integration::MiniTest
385
+ class << self
386
+ def activate; end
387
+ def translate(exception); end
388
+ end
389
+ end
390
+
391
+ module Mocha::Integration::MiniTest::Adapter
392
+ include(::Mocha::ParameterMatchers)
393
+ include(::Mocha::Hooks)
394
+ include(::Mocha::API)
395
+
396
+ def after_teardown; end
397
+ def before_setup; end
398
+ def before_teardown; end
399
+
400
+ class << self
401
+ def applicable_to?(mini_test_version); end
402
+ def description; end
403
+ def included(_mod); end
404
+ end
405
+ end
406
+
407
+ module Mocha::Integration::MiniTest::Nothing
408
+ class << self
409
+ def applicable_to?(_test_unit_version, _ruby_version = T.unsafe(nil)); end
410
+ def description; end
411
+ def included(_mod); end
412
+ end
413
+ end
414
+
415
+ module Mocha::Integration::MiniTest::Version13
416
+ class << self
417
+ def applicable_to?(mini_test_version); end
418
+ def description; end
419
+ def included(mod); end
420
+ end
421
+ end
422
+
423
+ module Mocha::Integration::MiniTest::Version13::RunMethodPatch
424
+ def run(runner); end
425
+ end
426
+
427
+ module Mocha::Integration::MiniTest::Version140
428
+ class << self
429
+ def applicable_to?(mini_test_version); end
430
+ def description; end
431
+ def included(mod); end
432
+ end
433
+ end
434
+
435
+ module Mocha::Integration::MiniTest::Version140::RunMethodPatch
436
+ def run(runner); end
437
+ end
438
+
439
+ module Mocha::Integration::MiniTest::Version141
440
+ class << self
441
+ def applicable_to?(mini_test_version); end
442
+ def description; end
443
+ def included(mod); end
444
+ end
445
+ end
446
+
447
+ module Mocha::Integration::MiniTest::Version141::RunMethodPatch
448
+ def run(runner); end
449
+ end
450
+
451
+ module Mocha::Integration::MiniTest::Version142To172
452
+ class << self
453
+ def applicable_to?(mini_test_version); end
454
+ def description; end
455
+ def included(mod); end
456
+ end
457
+ end
458
+
459
+ module Mocha::Integration::MiniTest::Version142To172::RunMethodPatch
460
+ def run(runner); end
461
+ end
462
+
463
+ module Mocha::Integration::MiniTest::Version200
464
+ class << self
465
+ def applicable_to?(mini_test_version); end
466
+ def description; end
467
+ def included(mod); end
468
+ end
469
+ end
470
+
471
+ module Mocha::Integration::MiniTest::Version200::RunMethodPatch
472
+ def run(runner); end
473
+ end
474
+
475
+ module Mocha::Integration::MiniTest::Version201To222
476
+ class << self
477
+ def applicable_to?(mini_test_version); end
478
+ def description; end
479
+ def included(mod); end
480
+ end
481
+ end
482
+
483
+ module Mocha::Integration::MiniTest::Version201To222::RunMethodPatch
484
+ def run(runner); end
485
+ end
486
+
487
+ module Mocha::Integration::MiniTest::Version2110To2111
488
+ class << self
489
+ def applicable_to?(mini_test_version); end
490
+ def description; end
491
+ def included(mod); end
492
+ end
493
+ end
494
+
495
+ module Mocha::Integration::MiniTest::Version2110To2111::RunMethodPatch
496
+ def run(runner); end
497
+ end
498
+
499
+ module Mocha::Integration::MiniTest::Version2112To320
500
+ class << self
501
+ def applicable_to?(mini_test_version); end
502
+ def description; end
503
+ def included(mod); end
504
+ end
505
+ end
506
+
507
+ module Mocha::Integration::MiniTest::Version2112To320::RunMethodPatch
508
+ def run(runner); end
509
+ end
510
+
511
+ module Mocha::Integration::MiniTest::Version230To2101
512
+ class << self
513
+ def applicable_to?(mini_test_version); end
514
+ def description; end
515
+ def included(mod); end
516
+ end
517
+ end
518
+
519
+ module Mocha::Integration::MiniTest::Version230To2101::RunMethodPatch
520
+ def run(runner); end
521
+ end
522
+
523
+ module Mocha::Integration::MonkeyPatcher
524
+ class << self
525
+ def apply(mod, run_method_patch); end
526
+ end
527
+ end
528
+
529
+ class Mocha::Invocation
530
+ def initialize(mock, method_name, *arguments, &block); end
531
+
532
+ def arguments; end
533
+ def block; end
534
+ def call(yield_parameters = T.unsafe(nil), return_values = T.unsafe(nil)); end
535
+ def call_description; end
536
+ def full_description; end
537
+ def method_name; end
538
+ def raised(exception); end
539
+ def result_description; end
540
+ def returned(value); end
541
+ def short_call_description; end
542
+ def threw(tag, value); end
543
+ end
544
+
545
+ class Mocha::Logger
546
+ def initialize(io); end
547
+
548
+ def warn(message); end
549
+ end
550
+
551
+ class Mocha::MethodMatcher
552
+ def initialize(expected_method_name); end
553
+
554
+ def expected_method_name; end
555
+ def match?(actual_method_name); end
556
+ def mocha_inspect; end
557
+ end
558
+
559
+ class Mocha::Mock
560
+ def initialize(mockery, name = T.unsafe(nil), receiver = T.unsafe(nil)); end
561
+
562
+ def __expectations__; end
563
+ def __expects__(method_name_or_hash, backtrace = T.unsafe(nil)); end
564
+ def __expire__; end
565
+ def __singleton_class__; end
566
+ def __stubs__(method_name_or_hash, backtrace = T.unsafe(nil)); end
567
+ def __verified__?(assertion_counter = T.unsafe(nil)); end
568
+ def all_expectations; end
569
+ def any_expectations?; end
570
+ def ensure_method_not_already_defined(method_name); end
571
+ def everything_stubbed; end
572
+ def expects(method_name_or_hash, backtrace = T.unsafe(nil)); end
573
+ def inspect; end
574
+ def method_missing(symbol, *arguments, &block); end
575
+ def mocha_inspect; end
576
+ def quacks_like(responder); end
577
+ def quacks_like_instance_of(responder_class); end
578
+ def responds_like(responder); end
579
+ def responds_like_instance_of(responder_class); end
580
+ def stub_everything; end
581
+ def stubs(method_name_or_hash, backtrace = T.unsafe(nil)); end
582
+ def unstub(*method_names); end
583
+
584
+ private
585
+
586
+ def check_expiry; end
587
+ def check_responder_responds_to(symbol); end
588
+ def raise_unexpected_invocation_error(invocation, matching_expectation); end
589
+ def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end
590
+ end
591
+
592
+ class Mocha::Mockery
593
+ def logger; end
594
+ def logger=(_); end
595
+ def mocha_inspect; end
596
+ def mock_impersonating(object); end
597
+ def mock_impersonating_any_instance_of(klass); end
598
+ def mocks; end
599
+ def named_mock(name); end
600
+ def new_state_machine(name); end
601
+ def on_stubbing(object, method); end
602
+ def on_stubbing_method_unnecessarily(expectation); end
603
+ def state_machines; end
604
+ def stubba; end
605
+ def teardown; end
606
+ def unnamed_mock; end
607
+ def verify(assertion_counter = T.unsafe(nil)); end
608
+
609
+ private
610
+
611
+ def add_mock(mock); end
612
+ def add_state_machine(state_machine); end
613
+ def check(action, description, signature_proc, backtrace = T.unsafe(nil)); end
614
+ def expectations; end
615
+ def reset; end
616
+ def satisfied_expectations; end
617
+ def unsatisfied_expectations; end
618
+
619
+ class << self
620
+ def instance; end
621
+ def setup; end
622
+ def teardown; end
623
+ def verify(*args); end
624
+
625
+ private
626
+
627
+ def instances; end
628
+ end
629
+ end
630
+
631
+ class Mocha::Mockery::Null < ::Mocha::Mockery
632
+ def add_mock(*_); end
633
+ def add_state_machine(*_); end
634
+ def stubba; end
635
+
636
+ private
637
+
638
+ def raise_not_initialized_error; end
639
+ end
640
+
641
+ class Mocha::Name
642
+ def initialize(name); end
643
+
644
+ def mocha_inspect; end
645
+ end
646
+
647
+ class Mocha::NotInitializedError < ::Mocha::ErrorWithFilteredBacktrace
648
+ end
649
+
650
+ module Mocha::ObjectMethods
651
+ def _method(_); end
652
+ def expects(expected_methods_vs_return_values); end
653
+ def mocha(instantiate = T.unsafe(nil)); end
654
+ def reset_mocha; end
655
+ def stubba_class; end
656
+ def stubba_method; end
657
+ def stubba_object; end
658
+ def stubs(stubbed_methods_vs_return_values); end
659
+ def unstub(*method_names); end
660
+ end
661
+
662
+ class Mocha::ObjectReceiver
663
+ def initialize(object); end
664
+
665
+ def mocks; end
666
+ end
667
+
668
+ module Mocha::ParameterMatchers
669
+ def Not(matcher); end
670
+ def all_of(*matchers); end
671
+ def any_of(*matchers); end
672
+ def any_parameters; end
673
+ def anything; end
674
+ def equals(value); end
675
+ def equivalent_uri(uri); end
676
+ def has_entries(entries); end
677
+ def has_entry(*options); end
678
+ def has_key(key); end
679
+ def has_value(value); end
680
+ def includes(*items); end
681
+ def instance_of(klass); end
682
+ def is_a(klass); end
683
+ def kind_of(klass); end
684
+ def optionally(*matchers); end
685
+ def regexp_matches(regexp); end
686
+ def responds_with(message, result); end
687
+ def yaml_equivalent(object); end
688
+ end
689
+
690
+ class Mocha::ParameterMatchers::AllOf < ::Mocha::ParameterMatchers::Base
691
+ def initialize(*matchers); end
692
+
693
+ def matches?(available_parameters); end
694
+ def mocha_inspect; end
695
+ end
696
+
697
+ class Mocha::ParameterMatchers::AnyOf < ::Mocha::ParameterMatchers::Base
698
+ def initialize(*matchers); end
699
+
700
+ def matches?(available_parameters); end
701
+ def mocha_inspect; end
702
+ end
703
+
704
+ class Mocha::ParameterMatchers::AnyParameters < ::Mocha::ParameterMatchers::Base
705
+ def matches?(available_parameters); end
706
+ def mocha_inspect; end
707
+ end
708
+
709
+ class Mocha::ParameterMatchers::Anything < ::Mocha::ParameterMatchers::Base
710
+ def matches?(available_parameters); end
711
+ def mocha_inspect; end
712
+ end
713
+
714
+ class Mocha::ParameterMatchers::Base
715
+ def &(other); end
716
+ def to_matcher; end
717
+ def |(other); end
718
+ end
719
+
720
+ class Mocha::ParameterMatchers::Equals < ::Mocha::ParameterMatchers::Base
721
+ def initialize(value); end
722
+
723
+ def matches?(available_parameters); end
724
+ def mocha_inspect; end
725
+ end
726
+
727
+ class Mocha::ParameterMatchers::EquivalentUri < ::Mocha::ParameterMatchers::Base
728
+ def initialize(uri); end
729
+
730
+ def matches?(available_parameters); end
731
+ def mocha_inspect; end
732
+
733
+ private
734
+
735
+ def explode(uri); end
736
+ end
737
+
738
+ class Mocha::ParameterMatchers::HasEntries < ::Mocha::ParameterMatchers::Base
739
+ def initialize(entries); end
740
+
741
+ def matches?(available_parameters); end
742
+ def mocha_inspect; end
743
+ end
744
+
745
+ class Mocha::ParameterMatchers::HasEntry < ::Mocha::ParameterMatchers::Base
746
+ def initialize(key, value); end
747
+
748
+ def matches?(available_parameters); end
749
+ def mocha_inspect; end
750
+ end
751
+
752
+ class Mocha::ParameterMatchers::HasKey < ::Mocha::ParameterMatchers::Base
753
+ def initialize(key); end
754
+
755
+ def matches?(available_parameters); end
756
+ def mocha_inspect; end
757
+ end
758
+
759
+ class Mocha::ParameterMatchers::HasValue < ::Mocha::ParameterMatchers::Base
760
+ def initialize(value); end
761
+
762
+ def matches?(available_parameters); end
763
+ def mocha_inspect; end
764
+ end
765
+
766
+ class Mocha::ParameterMatchers::Includes < ::Mocha::ParameterMatchers::Base
767
+ def initialize(*items); end
768
+
769
+ def matches?(available_parameters); end
770
+ def mocha_inspect; end
771
+ end
772
+
773
+ module Mocha::ParameterMatchers::InstanceMethods
774
+ def to_matcher; end
775
+ end
776
+
777
+ class Mocha::ParameterMatchers::InstanceOf < ::Mocha::ParameterMatchers::Base
778
+ def initialize(klass); end
779
+
780
+ def matches?(available_parameters); end
781
+ def mocha_inspect; end
782
+ end
783
+
784
+ class Mocha::ParameterMatchers::IsA < ::Mocha::ParameterMatchers::Base
785
+ def initialize(klass); end
786
+
787
+ def matches?(available_parameters); end
788
+ def mocha_inspect; end
789
+ end
790
+
791
+ class Mocha::ParameterMatchers::KindOf < ::Mocha::ParameterMatchers::Base
792
+ def initialize(klass); end
793
+
794
+ def matches?(available_parameters); end
795
+ def mocha_inspect; end
796
+ end
797
+
798
+ class Mocha::ParameterMatchers::Not < ::Mocha::ParameterMatchers::Base
799
+ def initialize(matcher); end
800
+
801
+ def matches?(available_parameters); end
802
+ def mocha_inspect; end
803
+ end
804
+
805
+ class Mocha::ParameterMatchers::Optionally < ::Mocha::ParameterMatchers::Base
806
+ def initialize(*parameters); end
807
+
808
+ def matches?(available_parameters); end
809
+ def mocha_inspect; end
810
+ end
811
+
812
+ class Mocha::ParameterMatchers::RegexpMatches < ::Mocha::ParameterMatchers::Base
813
+ def initialize(regexp); end
814
+
815
+ def matches?(available_parameters); end
816
+ def mocha_inspect; end
817
+ end
818
+
819
+ class Mocha::ParameterMatchers::RespondsWith < ::Mocha::ParameterMatchers::Base
820
+ def initialize(message, result); end
821
+
822
+ def matches?(available_parameters); end
823
+ def mocha_inspect; end
824
+ end
825
+
826
+ class Mocha::ParameterMatchers::YamlEquivalent < ::Mocha::ParameterMatchers::Base
827
+ def initialize(object); end
828
+
829
+ def matches?(available_parameters); end
830
+ def mocha_inspect; end
831
+ end
832
+
833
+ class Mocha::ParametersMatcher
834
+ def initialize(expected_parameters = T.unsafe(nil), &matching_block); end
835
+
836
+ def match?(actual_parameters = T.unsafe(nil)); end
837
+ def matchers; end
838
+ def mocha_inspect; end
839
+ def parameters_match?(actual_parameters); end
840
+ end
841
+
842
+ Mocha::RUBY_V2_PLUS = T.let(T.unsafe(nil), TrueClass)
843
+
844
+ class Mocha::RaisedException
845
+ def initialize(exception); end
846
+
847
+ def mocha_inspect; end
848
+ end
849
+
850
+ class Mocha::ReturnValues
851
+ def initialize(*values); end
852
+
853
+ def +(other); end
854
+ def next(invocation); end
855
+ def values; end
856
+ def values=(_); end
857
+
858
+ class << self
859
+ def build(*values); end
860
+ end
861
+ end
862
+
863
+ class Mocha::Sequence
864
+ def initialize(name); end
865
+
866
+ def constrain_as_next_in_sequence(expectation); end
867
+ def mocha_inspect; end
868
+ def satisfied_to_index?(index); end
869
+ end
870
+
871
+ class Mocha::Sequence::InSequenceOrderingConstraint
872
+ def initialize(sequence, index); end
873
+
874
+ def allows_invocation_now?; end
875
+ def mocha_inspect; end
876
+ end
877
+
878
+ class Mocha::SingleReturnValue
879
+ def initialize(value); end
880
+
881
+ def evaluate(invocation); end
882
+ end
883
+
884
+ class Mocha::StateMachine
885
+ def initialize(name); end
886
+
887
+ def become(next_state_name); end
888
+ def current_state; end
889
+ def current_state=(_); end
890
+ def is(state_name); end
891
+ def is_not(state_name); end
892
+ def mocha_inspect; end
893
+ def name; end
894
+ def starts_as(initial_state_name); end
895
+ end
896
+
897
+ class Mocha::StateMachine::State
898
+ def initialize(state_machine, state); end
899
+
900
+ def activate; end
901
+ def active?; end
902
+ def mocha_inspect; end
903
+ end
904
+
905
+ class Mocha::StateMachine::StatePredicate
906
+ def initialize(state_machine, state); end
907
+
908
+ def active?; end
909
+ def mocha_inspect; end
910
+ end
911
+
912
+ class Mocha::StubbedMethod
913
+ def initialize(stubbee, method_name); end
914
+
915
+ def ==(_); end
916
+ def define_new_method; end
917
+ def hide_original_method; end
918
+ def matches?(other); end
919
+ def method_name; end
920
+ def mock; end
921
+ def remove_new_method; end
922
+ def reset_mocha; end
923
+ def restore_original_method; end
924
+ def store_original_method; end
925
+ def stub; end
926
+ def stubbee; end
927
+ def to_s; end
928
+ def unstub; end
929
+
930
+ private
931
+
932
+ def remove_original_method_from_stubbee; end
933
+ def retain_original_visibility(method_owner); end
934
+ def store_original_method_visibility; end
935
+ def stub_method_overwrites_original_method?; end
936
+ def stub_method_owner; end
937
+ def use_prepended_module_for_stub_method; end
938
+ def use_prepended_module_for_stub_method?; end
939
+ end
940
+
941
+ class Mocha::StubbedMethod::PrependedModule < ::Module
942
+ end
943
+
944
+ class Mocha::StubbingError < ::Mocha::ErrorWithFilteredBacktrace
945
+ end
946
+
947
+ class Mocha::Thrower
948
+ def initialize(tag, object = T.unsafe(nil)); end
949
+
950
+ def evaluate(invocation); end
951
+ end
952
+
953
+ class Mocha::ThrownObject
954
+ def initialize(tag, value = T.unsafe(nil)); end
955
+
956
+ def mocha_inspect; end
957
+ end
958
+
959
+ class Mocha::YieldParameters
960
+ def initialize; end
961
+
962
+ def add(*parameter_groups); end
963
+ def next_invocation; end
964
+ end