activerecord-ejection_seat 0.1.0 → 0.2.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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/Gemfile +11 -3
  4. data/Gemfile.lock +99 -35
  5. data/README.md +4 -0
  6. data/Rakefile +14 -2
  7. data/lib/activerecord-ejection_seat/ejectable.rb +2 -1
  8. data/lib/activerecord-ejection_seat/props_builder.rb +44 -0
  9. data/lib/activerecord-ejection_seat/version.rb +2 -1
  10. data/lib/activerecord-ejection_seat.rb +3 -1
  11. data/sorbet/config +3 -0
  12. data/sorbet/rbi/annotations/activerecord.rbi +18 -0
  13. data/sorbet/rbi/annotations/activesupport.rbi +52 -0
  14. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  15. data/sorbet/rbi/gems/activemodel@7.0.4.rbi +8 -0
  16. data/sorbet/rbi/gems/activerecord@7.0.4.rbi +11 -0
  17. data/sorbet/rbi/gems/activesupport@7.0.4.rbi +93 -0
  18. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  19. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +8 -0
  20. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1064 -0
  21. data/sorbet/rbi/gems/i18n@1.12.0.rbi +8 -0
  22. data/sorbet/rbi/gems/io-console@0.6.0.rbi +8 -0
  23. data/sorbet/rbi/gems/irb@1.6.2.rbi +342 -0
  24. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  25. data/sorbet/rbi/gems/language_server-protocol@3.17.0.2.rbi +8 -0
  26. data/sorbet/rbi/gems/minitest@5.16.3.rbi +8 -0
  27. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  28. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  29. data/sorbet/rbi/gems/parser@3.1.3.0.rbi +6878 -0
  30. data/sorbet/rbi/gems/prettier_print@1.1.0.rbi +8 -0
  31. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +397 -0
  32. data/sorbet/rbi/gems/rake@13.0.6.rbi +2946 -0
  33. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  34. data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +3126 -0
  35. data/sorbet/rbi/gems/reline@0.3.2.rbi +8 -0
  36. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4660 -0
  37. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10588 -0
  38. data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +7817 -0
  39. data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +4994 -0
  40. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1477 -0
  41. data/sorbet/rbi/gems/rspec@3.12.0.rbi +10 -0
  42. data/sorbet/rbi/gems/rubocop-ast@1.24.0.rbi +6790 -0
  43. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +354 -0
  44. data/sorbet/rbi/gems/rubocop-rspec@2.16.0.rbi +7650 -0
  45. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +1014 -0
  46. data/sorbet/rbi/gems/rubocop@1.41.0.rbi +52148 -0
  47. data/sorbet/rbi/gems/ruby-lsp@0.3.7.rbi +13 -0
  48. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1212 -0
  49. data/sorbet/rbi/gems/sorbet-struct-comparable@1.3.0.rbi +16 -0
  50. data/sorbet/rbi/gems/spoom@1.1.15.rbi +2383 -0
  51. data/sorbet/rbi/gems/sqlite3@1.5.4.rbi +1600 -0
  52. data/sorbet/rbi/gems/syntax_tree@4.3.0.rbi +8 -0
  53. data/sorbet/rbi/gems/tapioca@0.10.4.rbi +3032 -0
  54. data/sorbet/rbi/gems/thor@1.2.1.rbi +3950 -0
  55. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +8 -0
  56. data/sorbet/rbi/gems/unicode-display_width@2.3.0.rbi +46 -0
  57. data/sorbet/rbi/gems/unparser@0.6.5.rbi +4265 -0
  58. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2498 -0
  59. data/sorbet/rbi/gems/yard-sorbet@0.7.0.rbi +391 -0
  60. data/sorbet/rbi/gems/yard@0.9.28.rbi +17033 -0
  61. data/sorbet/rbi/todo.rbi +9 -0
  62. data/sorbet/tapioca/config.yml +2 -0
  63. data/sorbet/tapioca/require.rb +4 -0
  64. metadata +71 -4
  65. data/activerecord-ejection_seat.gemspec +0 -39
@@ -0,0 +1,354 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rubocop-rake` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rubocop-rake`.
6
+
7
+ module RuboCop; end
8
+ class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end
9
+ module RuboCop::Cop; end
10
+
11
+ module RuboCop::Cop::ConfigurableNaming
12
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
13
+ include ::RuboCop::Cop::ConfigurableFormatting
14
+ end
15
+
16
+ # source://rubocop/1.41.0/lib/rubocop/cop/mixin/configurable_naming.rb#10
17
+ RuboCop::Cop::ConfigurableNaming::FORMATS = T.let(T.unsafe(nil), Hash)
18
+
19
+ module RuboCop::Cop::ConfigurableNumbering
20
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
21
+ include ::RuboCop::Cop::ConfigurableFormatting
22
+ end
23
+
24
+ # source://rubocop/1.41.0/lib/rubocop/cop/mixin/configurable_numbering.rb#11
25
+ RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash)
26
+
27
+ # source://rubocop/1.41.0/lib/rubocop/cop/mixin/allowed_methods.rb#38
28
+ RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods
29
+
30
+ # source://rubocop/1.41.0/lib/rubocop/cop/mixin/allowed_pattern.rb#54
31
+ RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern
32
+
33
+ module RuboCop::Cop::Rake; end
34
+
35
+ # This cop detects class or module definition in a task or namespace,
36
+ # because it is defined to the top level.
37
+ # It is confusing because the scope looks in the task or namespace,
38
+ # but actually it is defined to the top level.
39
+ #
40
+ # @example
41
+ # # bad
42
+ # task :foo do
43
+ # class C
44
+ # end
45
+ # end
46
+ #
47
+ # # bad
48
+ # namespace :foo do
49
+ # module M
50
+ # end
51
+ # end
52
+ #
53
+ # # good - It is also defined to the top level,
54
+ # # but it looks expected behavior.
55
+ # class C
56
+ # end
57
+ # task :foo do
58
+ # end
59
+ class RuboCop::Cop::Rake::ClassDefinitionInTask < ::RuboCop::Cop::Base
60
+ # source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#34
61
+ def on_class(node); end
62
+
63
+ # source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#34
64
+ def on_module(node); end
65
+ end
66
+
67
+ # source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#32
68
+ RuboCop::Cop::Rake::ClassDefinitionInTask::MSG = T.let(T.unsafe(nil), String)
69
+
70
+ # Rake task definition should have a description with `desc` method.
71
+ # It is useful as a documentation of task. And Rake does not display
72
+ # task that does not have `desc` by `rake -T`.
73
+ #
74
+ # Note: This cop does not require description for the default task,
75
+ # because the default task is executed with `rake` without command.
76
+ #
77
+ # @example
78
+ # # bad
79
+ # task :do_something
80
+ #
81
+ # # bad
82
+ # task :do_something do
83
+ # end
84
+ #
85
+ # # good
86
+ # desc 'Do something'
87
+ # task :do_something
88
+ #
89
+ # # good
90
+ # desc 'Do something'
91
+ # task :do_something do
92
+ # end
93
+ class RuboCop::Cop::Rake::Desc < ::RuboCop::Cop::Base
94
+ include ::RuboCop::Cop::Rake::Helper::OnTask
95
+ extend ::RuboCop::Cop::AutoCorrector
96
+
97
+ # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#40
98
+ def on_task(node); end
99
+
100
+ # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#36
101
+ def prerequisites(param0 = T.unsafe(nil)); end
102
+
103
+ private
104
+
105
+ # @return [Boolean]
106
+ #
107
+ # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#76
108
+ def can_insert_desc_to?(parent); end
109
+
110
+ # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#62
111
+ def parent_and_task(task_node); end
112
+
113
+ # @return [Boolean]
114
+ #
115
+ # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#50
116
+ def task_with_desc?(node); end
117
+ end
118
+
119
+ # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#34
120
+ RuboCop::Cop::Rake::Desc::MSG = T.let(T.unsafe(nil), String)
121
+
122
+ # If namespaces are defined with the same name, Rake executes the both namespaces
123
+ # in definition order.
124
+ # It is redundant. You should squash them into one definition.
125
+ # This cop detects it.
126
+ #
127
+ # @example
128
+ # # bad
129
+ # namespace :foo do
130
+ # task :bar do
131
+ # end
132
+ # end
133
+ # namespace :foo do
134
+ # task :hoge do
135
+ # end
136
+ # end
137
+ #
138
+ # # good
139
+ # namespace :foo do
140
+ # task :bar do
141
+ # end
142
+ # task :hoge do
143
+ # end
144
+ # end
145
+ class RuboCop::Cop::Rake::DuplicateNamespace < ::RuboCop::Cop::Base
146
+ include ::RuboCop::Cop::Rake::Helper::OnNamespace
147
+
148
+ # @return [DuplicateNamespace] a new instance of DuplicateNamespace
149
+ #
150
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#35
151
+ def initialize(*_arg0); end
152
+
153
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#67
154
+ def message_for_dup(previous:, current:, namespace:); end
155
+
156
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#53
157
+ def namespaces(node); end
158
+
159
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#40
160
+ def on_namespace(node); end
161
+
162
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#76
163
+ def source_location(node); end
164
+ end
165
+
166
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#33
167
+ RuboCop::Cop::Rake::DuplicateNamespace::MSG = T.let(T.unsafe(nil), String)
168
+
169
+ # If tasks are defined with the same name, Rake executes the both tasks
170
+ # in definition order.
171
+ # It is misleading sometimes. You should squash them into one definition.
172
+ # This cop detects it.
173
+ #
174
+ # @example
175
+ # # bad
176
+ # task :foo do
177
+ # p 'foo 1'
178
+ # end
179
+ # task :foo do
180
+ # p 'foo 2'
181
+ # end
182
+ #
183
+ # # good
184
+ # task :foo do
185
+ # p 'foo 1'
186
+ # p 'foo 2'
187
+ # end
188
+ class RuboCop::Cop::Rake::DuplicateTask < ::RuboCop::Cop::Base
189
+ include ::RuboCop::Cop::Rake::Helper::OnTask
190
+
191
+ # @return [DuplicateTask] a new instance of DuplicateTask
192
+ #
193
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#31
194
+ def initialize(*_arg0); end
195
+
196
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#66
197
+ def message_for_dup(previous:, current:, task_name:); end
198
+
199
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#52
200
+ def namespaces(node); end
201
+
202
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#36
203
+ def on_task(node); end
204
+
205
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#75
206
+ def source_location(node); end
207
+ end
208
+
209
+ # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#29
210
+ RuboCop::Cop::Rake::DuplicateTask::MSG = T.let(T.unsafe(nil), String)
211
+
212
+ module RuboCop::Cop::Rake::Helper; end
213
+
214
+ module RuboCop::Cop::Rake::Helper::ClassDefinition
215
+ extend ::RuboCop::AST::NodePattern::Macros
216
+ extend ::RuboCop::Cop::Rake::Helper::ClassDefinition
217
+
218
+ # source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#11
219
+ def class_definition?(param0 = T.unsafe(nil)); end
220
+
221
+ # @return [Boolean]
222
+ #
223
+ # source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#22
224
+ def in_class_definition?(node); end
225
+ end
226
+
227
+ module RuboCop::Cop::Rake::Helper::OnNamespace
228
+ extend ::RuboCop::AST::NodePattern::Macros
229
+
230
+ # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_namespace.rb#10
231
+ def namespace?(param0 = T.unsafe(nil)); end
232
+
233
+ # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_namespace.rb#14
234
+ def on_send(node); end
235
+ end
236
+
237
+ module RuboCop::Cop::Rake::Helper::OnTask
238
+ extend ::RuboCop::AST::NodePattern::Macros
239
+
240
+ # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_task.rb#14
241
+ def on_send(node); end
242
+
243
+ # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_task.rb#10
244
+ def task?(param0 = T.unsafe(nil)); end
245
+ end
246
+
247
+ module RuboCop::Cop::Rake::Helper::TaskDefinition
248
+ extend ::RuboCop::AST::NodePattern::Macros
249
+ extend ::RuboCop::Cop::Rake::Helper::TaskDefinition
250
+
251
+ # @return [Boolean]
252
+ #
253
+ # source://rubocop-rake//lib/rubocop/cop/rake/helper/task_definition.rb#19
254
+ def in_task_or_namespace?(node); end
255
+
256
+ # source://rubocop-rake//lib/rubocop/cop/rake/helper/task_definition.rb#11
257
+ def task_or_namespace?(param0 = T.unsafe(nil)); end
258
+ end
259
+
260
+ module RuboCop::Cop::Rake::Helper::TaskName
261
+ extend ::RuboCop::Cop::Rake::Helper::TaskName
262
+
263
+ # source://rubocop-rake//lib/rubocop/cop/rake/helper/task_name.rb#10
264
+ def task_name(node); end
265
+ end
266
+
267
+ # This cop detects method definition in a task or namespace,
268
+ # because it is defined to the top level.
269
+ # It is confusing because the scope looks in the task or namespace,
270
+ # but actually it is defined to the top level.
271
+ #
272
+ # @example
273
+ # # bad
274
+ # task :foo do
275
+ # def helper_method
276
+ # do_something
277
+ # end
278
+ # end
279
+ #
280
+ # # bad
281
+ # namespace :foo do
282
+ # def helper_method
283
+ # do_something
284
+ # end
285
+ # end
286
+ #
287
+ # # good - It is also defined to the top level,
288
+ # # but it looks expected behavior.
289
+ # def helper_method
290
+ # end
291
+ # task :foo do
292
+ # end
293
+ class RuboCop::Cop::Rake::MethodDefinitionInTask < ::RuboCop::Cop::Base
294
+ # source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#36
295
+ def on_def(node); end
296
+
297
+ # source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#36
298
+ def on_defs(node); end
299
+ end
300
+
301
+ # source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#34
302
+ RuboCop::Cop::Rake::MethodDefinitionInTask::MSG = T.let(T.unsafe(nil), String)
303
+
304
+ class RuboCop::Error < ::StandardError; end
305
+ class RuboCop::IncorrectCopNameError < ::StandardError; end
306
+
307
+ # source://rubocop/1.41.0/lib/rubocop/ast_aliases.rb#5
308
+ RuboCop::NodePattern = RuboCop::AST::NodePattern
309
+
310
+ class RuboCop::OptionArgumentError < ::StandardError; end
311
+ module RuboCop::OptionsHelp; end
312
+
313
+ # source://rubocop/1.41.0/lib/rubocop/options.rb#470
314
+ RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array)
315
+
316
+ # source://rubocop/1.41.0/lib/rubocop/options.rb#469
317
+ RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String)
318
+
319
+ # source://rubocop/1.41.0/lib/rubocop/options.rb#472
320
+ RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash)
321
+
322
+ # source://rubocop/1.41.0/lib/rubocop/ast_aliases.rb#6
323
+ RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource
324
+
325
+ module RuboCop::Rake; end
326
+
327
+ # source://rubocop-rake//lib/rubocop/rake.rb#12
328
+ RuboCop::Rake::CONFIG = T.let(T.unsafe(nil), Hash)
329
+
330
+ # source://rubocop-rake//lib/rubocop/rake.rb#11
331
+ RuboCop::Rake::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname)
332
+
333
+ class RuboCop::Rake::Error < ::StandardError; end
334
+
335
+ # Because RuboCop doesn't yet support plugins, we have to monkey patch in a
336
+ # bit of our configuration.
337
+ module RuboCop::Rake::Inject
338
+ class << self
339
+ # source://rubocop-rake//lib/rubocop/rake/inject.rb#10
340
+ def defaults!; end
341
+ end
342
+ end
343
+
344
+ # source://rubocop-rake//lib/rubocop/rake.rb#10
345
+ RuboCop::Rake::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname)
346
+
347
+ # source://rubocop-rake//lib/rubocop/rake/version.rb#5
348
+ RuboCop::Rake::VERSION = T.let(T.unsafe(nil), String)
349
+
350
+ # source://rubocop/1.41.0/lib/rubocop/ast_aliases.rb#7
351
+ RuboCop::Token = RuboCop::AST::Token
352
+
353
+ class RuboCop::ValidationError < ::RuboCop::Error; end
354
+ class RuboCop::Warning < ::StandardError; end