sorbet-rails 0.7.33 → 0.7.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci-master.yml +1 -1
  3. data/.github/workflows/ci.yml +1 -1
  4. data/CONTRIBUTING.md +1 -0
  5. data/Gemfile +4 -0
  6. data/README.md +1 -1
  7. data/Rakefile +27 -1
  8. data/lib/sorbet-rails/active_record_rbi_formatter.rb +1 -1
  9. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +14 -0
  10. data/lib/sorbet-rails/rails_mixins/active_record_overrides.rb +1 -1
  11. data/lib/sorbet-rails/tasks/rails_rbi.rake +15 -0
  12. data/sorbet-rails.gemspec +1 -1
  13. data/spec/bin/run_all_specs.sh +1 -0
  14. data/spec/generators/rails-template.rb +2 -7
  15. data/spec/rails_helper.rb +2 -0
  16. data/spec/rake_rails_rbi_models_spec.rb +1 -1
  17. data/spec/support/v5.2/sorbet_test_cases.rb +8 -0
  18. data/spec/support/v6.0/sorbet_test_cases.rb +8 -0
  19. data/spec/support/v6.1/sorbet_test_cases.rb +8 -0
  20. data/spec/support/v7.0/.gitattributes +7 -0
  21. data/spec/support/v7.0/.gitignore +35 -0
  22. data/spec/support/v7.0/Gemfile +48 -0
  23. data/spec/support/v7.0/Gemfile.lock +218 -0
  24. data/spec/support/v7.0/README.md +24 -0
  25. data/spec/support/v7.0/Rakefile +6 -0
  26. data/spec/support/v7.0/app/assets/images/.keep +0 -0
  27. data/spec/support/v7.0/app/assets/stylesheets/application.css +1 -0
  28. data/spec/support/v7.0/app/controllers/application_controller.rb +3 -0
  29. data/spec/support/v7.0/app/controllers/concerns/.keep +0 -0
  30. data/spec/support/v7.0/app/helpers/application_helper.rb +3 -0
  31. data/spec/support/v7.0/app/helpers/bar_helper.rb +3 -0
  32. data/spec/support/v7.0/app/helpers/baz_helper.rb +3 -0
  33. data/spec/support/v7.0/app/helpers/foo_helper.rb +3 -0
  34. data/spec/support/v7.0/app/jobs/application_job.rb +8 -0
  35. data/spec/support/v7.0/app/jobs/award_house_point_hourglasses.rb +12 -0
  36. data/spec/support/v7.0/app/mailers/application_mailer.rb +5 -0
  37. data/spec/support/v7.0/app/mailers/daily_prophet_mailer.rb +9 -0
  38. data/spec/support/v7.0/app/mailers/hogwarts_acceptance_mailer.rb +29 -0
  39. data/spec/support/v7.0/app/models/application_record.rb +4 -0
  40. data/spec/support/v7.0/app/models/concerns/.keep +0 -0
  41. data/spec/support/v7.0/app/models/concerns/mythical.rb +11 -0
  42. data/spec/support/v7.0/app/models/headmaster.rb +8 -0
  43. data/spec/support/v7.0/app/models/potion.rb +6 -0
  44. data/spec/support/v7.0/app/models/robe.rb +4 -0
  45. data/spec/support/v7.0/app/models/school.rb +5 -0
  46. data/spec/support/v7.0/app/models/spell.rb +5 -0
  47. data/spec/support/v7.0/app/models/spell_book.rb +18 -0
  48. data/spec/support/v7.0/app/models/squib.rb +6 -0
  49. data/spec/support/v7.0/app/models/subject.rb +5 -0
  50. data/spec/support/v7.0/app/models/wand.rb +19 -0
  51. data/spec/support/v7.0/app/models/wizard.rb +65 -0
  52. data/spec/support/v7.0/app/views/layouts/application.html.erb +15 -0
  53. data/spec/support/v7.0/app/views/layouts/mailer.html.erb +13 -0
  54. data/spec/support/v7.0/app/views/layouts/mailer.text.erb +1 -0
  55. data/spec/support/v7.0/bin/bundle +114 -0
  56. data/spec/support/v7.0/bin/rails +4 -0
  57. data/spec/support/v7.0/bin/rake +4 -0
  58. data/spec/support/v7.0/bin/setup +33 -0
  59. data/spec/support/v7.0/config/application.rb +38 -0
  60. data/spec/support/v7.0/config/boot.rb +4 -0
  61. data/spec/support/v7.0/config/database.yml +25 -0
  62. data/spec/support/v7.0/config/environment.rb +6 -0
  63. data/spec/support/v7.0/config/environments/development.rb +69 -0
  64. data/spec/support/v7.0/config/environments/production.rb +83 -0
  65. data/spec/support/v7.0/config/environments/test.rb +61 -0
  66. data/spec/support/v7.0/config/initializers/content_security_policy.rb +26 -0
  67. data/spec/support/v7.0/config/initializers/filter_parameter_logging.rb +9 -0
  68. data/spec/support/v7.0/config/initializers/inflections.rb +17 -0
  69. data/spec/support/v7.0/config/initializers/permissions_policy.rb +12 -0
  70. data/spec/support/v7.0/config/initializers/sorbet_rails.rb +3 -0
  71. data/spec/support/v7.0/config/locales/en.yml +33 -0
  72. data/spec/support/v7.0/config/puma.rb +44 -0
  73. data/spec/support/v7.0/config/routes.rb +8 -0
  74. data/spec/support/v7.0/config/storage.yml +34 -0
  75. data/spec/support/v7.0/config.ru +6 -0
  76. data/spec/support/v7.0/db/migrate/20190620000001_create_wizards.rb +14 -0
  77. data/spec/support/v7.0/db/migrate/20190620000002_create_wands.rb +12 -0
  78. data/spec/support/v7.0/db/migrate/20190620000003_create_spell_books.rb +10 -0
  79. data/spec/support/v7.0/db/migrate/20190620000004_add_more_column_types_to_wands.rb +14 -0
  80. data/spec/support/v7.0/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
  81. data/spec/support/v7.0/db/migrate/20190620000006_add_more_enums_to_wizard.rb +9 -0
  82. data/spec/support/v7.0/db/migrate/20190620000007_add_type_to_wizard.rb +6 -0
  83. data/spec/support/v7.0/db/migrate/20190620000008_add_robe_to_wizard.rb +8 -0
  84. data/spec/support/v7.0/db/migrate/20190620000009_add_school.rb +10 -0
  85. data/spec/support/v7.0/db/migrate/20190620000010_add_subject.rb +8 -0
  86. data/spec/support/v7.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  87. data/spec/support/v7.0/db/migrate/20190620000012_add_spell.rb +8 -0
  88. data/spec/support/v7.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  89. data/spec/support/v7.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
  90. data/spec/support/v7.0/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  91. data/spec/support/v7.0/db/schema.rb +98 -0
  92. data/spec/support/v7.0/db/seeds.rb +8 -0
  93. data/spec/support/v7.0/lib/assets/.keep +0 -0
  94. data/spec/support/v7.0/lib/mythical_rbi_plugin.rb +16 -0
  95. data/spec/support/v7.0/lib/tasks/.keep +0 -0
  96. data/spec/support/v7.0/log/.keep +0 -0
  97. data/spec/support/v7.0/sorbet_test_cases.rb +439 -0
  98. data/spec/support/v7.0/storage/.keep +0 -0
  99. data/spec/support/v7.0/tmp/.keep +0 -0
  100. data/spec/support/v7.0/tmp/pids/.keep +0 -0
  101. data/spec/support/v7.0/tmp/storage/.keep +0 -0
  102. data/spec/support/v7.0/vendor/.keep +0 -0
  103. data/spec/test_data/v5.2/expected_active_record_base.rbi +6 -0
  104. data/spec/test_data/v5.2/expected_active_record_relation.rbi +6 -0
  105. data/spec/test_data/v6.0/expected_active_record_base.rbi +6 -0
  106. data/spec/test_data/v6.0/expected_active_record_relation.rbi +6 -0
  107. data/spec/test_data/v6.1/expected_active_record_base.rbi +6 -0
  108. data/spec/test_data/v6.1/expected_active_record_relation.rbi +6 -0
  109. data/spec/test_data/v7.0/expected_active_record_base.rbi +119 -0
  110. data/spec/test_data/v7.0/expected_active_record_relation.rbi +180 -0
  111. data/spec/test_data/v7.0/expected_application_job.rbi +20 -0
  112. data/spec/test_data/v7.0/expected_application_mailer.rbi +5 -0
  113. data/spec/test_data/v7.0/expected_attachment.rbi +358 -0
  114. data/spec/test_data/v7.0/expected_award_house_point_hourglasses.rbi +20 -0
  115. data/spec/test_data/v7.0/expected_blob.rbi +394 -0
  116. data/spec/test_data/v7.0/expected_custom_application_job.rbi +21 -0
  117. data/spec/test_data/v7.0/expected_custom_application_mailer.rbi +6 -0
  118. data/spec/test_data/v7.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  119. data/spec/test_data/v7.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  120. data/spec/test_data/v7.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  121. data/spec/test_data/v7.0/expected_daily_prophet_mailer.rbi +7 -0
  122. data/spec/test_data/v7.0/expected_headmaster.rbi +376 -0
  123. data/spec/test_data/v7.0/expected_helpers.rbi +27 -0
  124. data/spec/test_data/v7.0/expected_helpers_with_application_and_devise_helpers.rbi +34 -0
  125. data/spec/test_data/v7.0/expected_hogwarts_acceptance_mailer.rbi +20 -0
  126. data/spec/test_data/v7.0/expected_internal_metadata.rbi +346 -0
  127. data/spec/test_data/v7.0/expected_no_routes.rbi +4 -0
  128. data/spec/test_data/v7.0/expected_potion.rbi +328 -0
  129. data/spec/test_data/v7.0/expected_record.rbi +307 -0
  130. data/spec/test_data/v7.0/expected_robe.rbi +349 -0
  131. data/spec/test_data/v7.0/expected_routes.rbi +182 -0
  132. data/spec/test_data/v7.0/expected_schema_migration.rbi +319 -0
  133. data/spec/test_data/v7.0/expected_school.rbi +349 -0
  134. data/spec/test_data/v7.0/expected_spell/habtm_spell_books.rbi +367 -0
  135. data/spec/test_data/v7.0/expected_spell.rbi +340 -0
  136. data/spec/test_data/v7.0/expected_spell_book/habtm_spells.rbi +367 -0
  137. data/spec/test_data/v7.0/expected_spell_book.rbi +499 -0
  138. data/spec/test_data/v7.0/expected_squib.rbi +1204 -0
  139. data/spec/test_data/v7.0/expected_srb_tc_output.txt +1 -0
  140. data/spec/test_data/v7.0/expected_subject/habtm_wizards.rbi +367 -0
  141. data/spec/test_data/v7.0/expected_subject.rbi +340 -0
  142. data/spec/test_data/v7.0/expected_variant_record.rbi +382 -0
  143. data/spec/test_data/v7.0/expected_wand.rbi +611 -0
  144. data/spec/test_data/v7.0/expected_wizard/habtm_subjects.rbi +367 -0
  145. data/spec/test_data/v7.0/expected_wizard.rbi +1280 -0
  146. data/spec/test_data/v7.0/expected_wizard_wo_spellbook.rbi +1274 -0
  147. metadata +243 -1
@@ -0,0 +1,346 @@
1
+ # This is an autogenerated file for dynamic methods in ActiveRecord::InternalMetadata
2
+ # Please rerun bundle exec rake rails_rbi:models[ActiveRecord::InternalMetadata] to regenerate.
3
+
4
+ # typed: strong
5
+ module ActiveRecord::InternalMetadata::ActiveRelation_WhereNot
6
+ sig { params(opts: T.untyped, rest: T.untyped).returns(T.self_type) }
7
+ def not(opts, *rest); end
8
+ end
9
+
10
+ module ActiveRecord::InternalMetadata::GeneratedAttributeMethods
11
+ sig { returns(ActiveSupport::TimeWithZone) }
12
+ def created_at; end
13
+
14
+ sig { params(value: T.any(Date, Time, ActiveSupport::TimeWithZone)).void }
15
+ def created_at=(value); end
16
+
17
+ sig { returns(T::Boolean) }
18
+ def created_at?; end
19
+
20
+ sig { returns(String) }
21
+ def key; end
22
+
23
+ sig { params(value: T.any(String, Symbol)).void }
24
+ def key=(value); end
25
+
26
+ sig { returns(T::Boolean) }
27
+ def key?; end
28
+
29
+ sig { returns(ActiveSupport::TimeWithZone) }
30
+ def updated_at; end
31
+
32
+ sig { params(value: T.any(Date, Time, ActiveSupport::TimeWithZone)).void }
33
+ def updated_at=(value); end
34
+
35
+ sig { returns(T::Boolean) }
36
+ def updated_at?; end
37
+
38
+ sig { returns(T.nilable(String)) }
39
+ def value; end
40
+
41
+ sig { params(value: T.nilable(T.any(String, Symbol))).void }
42
+ def value=(value); end
43
+
44
+ sig { returns(T::Boolean) }
45
+ def value?; end
46
+ end
47
+
48
+ module ActiveRecord::InternalMetadata::CustomFinderMethods
49
+ sig { params(limit: Integer).returns(T::Array[ActiveRecord::InternalMetadata]) }
50
+ def first_n(limit); end
51
+
52
+ sig { params(limit: Integer).returns(T::Array[ActiveRecord::InternalMetadata]) }
53
+ def last_n(limit); end
54
+
55
+ sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[ActiveRecord::InternalMetadata]) }
56
+ def find_n(*args); end
57
+
58
+ sig { params(id: T.nilable(Integer)).returns(T.nilable(ActiveRecord::InternalMetadata)) }
59
+ def find_by_id(id); end
60
+
61
+ sig { params(id: Integer).returns(ActiveRecord::InternalMetadata) }
62
+ def find_by_id!(id); end
63
+ end
64
+
65
+ class ActiveRecord::InternalMetadata < ActiveRecord::Base
66
+ include ActiveRecord::InternalMetadata::GeneratedAttributeMethods
67
+ extend ActiveRecord::InternalMetadata::CustomFinderMethods
68
+ extend ActiveRecord::InternalMetadata::QueryMethodsReturningRelation
69
+ RelationType = T.type_alias { T.any(ActiveRecord::InternalMetadata::ActiveRecord_Relation, ActiveRecord::InternalMetadata::ActiveRecord_Associations_CollectionProxy, ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
70
+ end
71
+
72
+ module ActiveRecord::InternalMetadata::QueryMethodsReturningRelation
73
+ sig { returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
74
+ def all; end
75
+
76
+ sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
77
+ def unscoped(&block); end
78
+
79
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
80
+ def reselect(*args); end
81
+
82
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
83
+ def order(*args); end
84
+
85
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
86
+ def reorder(*args); end
87
+
88
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
89
+ def group(*args); end
90
+
91
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
92
+ def limit(*args); end
93
+
94
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
95
+ def offset(*args); end
96
+
97
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
98
+ def joins(*args); end
99
+
100
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
101
+ def left_joins(*args); end
102
+
103
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
104
+ def left_outer_joins(*args); end
105
+
106
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
107
+ def where(*args); end
108
+
109
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
110
+ def rewhere(*args); end
111
+
112
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
113
+ def preload(*args); end
114
+
115
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
116
+ def extract_associated(*args); end
117
+
118
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
119
+ def eager_load(*args); end
120
+
121
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
122
+ def includes(*args); end
123
+
124
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
125
+ def from(*args); end
126
+
127
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
128
+ def lock(*args); end
129
+
130
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
131
+ def readonly(*args); end
132
+
133
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
134
+ def or(*args); end
135
+
136
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
137
+ def having(*args); end
138
+
139
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
140
+ def create_with(*args); end
141
+
142
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
143
+ def distinct(*args); end
144
+
145
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
146
+ def references(*args); end
147
+
148
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
149
+ def none(*args); end
150
+
151
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
152
+ def unscope(*args); end
153
+
154
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
155
+ def optimizer_hints(*args); end
156
+
157
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
158
+ def merge(*args); end
159
+
160
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
161
+ def except(*args); end
162
+
163
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
164
+ def only(*args); end
165
+
166
+ sig { params(block: T.proc.params(e: ActiveRecord::InternalMetadata).returns(T::Boolean)).returns(T::Array[ActiveRecord::InternalMetadata]) }
167
+ def select(&block); end
168
+
169
+ sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
170
+ def select_columns(*args); end
171
+
172
+ sig { params(args: Symbol).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
173
+ def where_missing(*args); end
174
+
175
+ sig { params(column: Symbol, values: T::Array[T.untyped]).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
176
+ def in_order_of(column, values); end
177
+
178
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
179
+ def extending(*args, &block); end
180
+
181
+ sig do
182
+ params(
183
+ of: T.nilable(Integer),
184
+ start: T.nilable(Integer),
185
+ finish: T.nilable(Integer),
186
+ load: T.nilable(T::Boolean),
187
+ error_on_ignore: T.nilable(T::Boolean),
188
+ block: T.nilable(T.proc.params(e: ActiveRecord::InternalMetadata::ActiveRecord_Relation).void)
189
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
190
+ end
191
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
192
+ end
193
+
194
+ module ActiveRecord::InternalMetadata::QueryMethodsReturningAssociationRelation
195
+ sig { returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
196
+ def all; end
197
+
198
+ sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
199
+ def unscoped(&block); end
200
+
201
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
202
+ def reselect(*args); end
203
+
204
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
205
+ def order(*args); end
206
+
207
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
208
+ def reorder(*args); end
209
+
210
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
211
+ def group(*args); end
212
+
213
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
214
+ def limit(*args); end
215
+
216
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
217
+ def offset(*args); end
218
+
219
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
220
+ def joins(*args); end
221
+
222
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
223
+ def left_joins(*args); end
224
+
225
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
226
+ def left_outer_joins(*args); end
227
+
228
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
229
+ def where(*args); end
230
+
231
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
232
+ def rewhere(*args); end
233
+
234
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
235
+ def preload(*args); end
236
+
237
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
238
+ def extract_associated(*args); end
239
+
240
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
241
+ def eager_load(*args); end
242
+
243
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
244
+ def includes(*args); end
245
+
246
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
247
+ def from(*args); end
248
+
249
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
250
+ def lock(*args); end
251
+
252
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
253
+ def readonly(*args); end
254
+
255
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
256
+ def or(*args); end
257
+
258
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
259
+ def having(*args); end
260
+
261
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
262
+ def create_with(*args); end
263
+
264
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
265
+ def distinct(*args); end
266
+
267
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
268
+ def references(*args); end
269
+
270
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
271
+ def none(*args); end
272
+
273
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
274
+ def unscope(*args); end
275
+
276
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
277
+ def optimizer_hints(*args); end
278
+
279
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
280
+ def merge(*args); end
281
+
282
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
283
+ def except(*args); end
284
+
285
+ sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
286
+ def only(*args); end
287
+
288
+ sig { params(block: T.proc.params(e: ActiveRecord::InternalMetadata).returns(T::Boolean)).returns(T::Array[ActiveRecord::InternalMetadata]) }
289
+ def select(&block); end
290
+
291
+ sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
292
+ def select_columns(*args); end
293
+
294
+ sig { params(args: Symbol).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
295
+ def where_missing(*args); end
296
+
297
+ sig { params(column: Symbol, values: T::Array[T.untyped]).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
298
+ def in_order_of(column, values); end
299
+
300
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
301
+ def extending(*args, &block); end
302
+
303
+ sig do
304
+ params(
305
+ of: T.nilable(Integer),
306
+ start: T.nilable(Integer),
307
+ finish: T.nilable(Integer),
308
+ load: T.nilable(T::Boolean),
309
+ error_on_ignore: T.nilable(T::Boolean),
310
+ block: T.nilable(T.proc.params(e: ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation).void)
311
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
312
+ end
313
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
314
+ end
315
+
316
+ class ActiveRecord::InternalMetadata::ActiveRecord_Relation < ActiveRecord::Relation
317
+ include ActiveRecord::InternalMetadata::ActiveRelation_WhereNot
318
+ include ActiveRecord::InternalMetadata::CustomFinderMethods
319
+ include ActiveRecord::InternalMetadata::QueryMethodsReturningRelation
320
+ Elem = type_member {{fixed: ActiveRecord::InternalMetadata}}
321
+ end
322
+
323
+ class ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
324
+ include ActiveRecord::InternalMetadata::ActiveRelation_WhereNot
325
+ include ActiveRecord::InternalMetadata::CustomFinderMethods
326
+ include ActiveRecord::InternalMetadata::QueryMethodsReturningAssociationRelation
327
+ Elem = type_member {{fixed: ActiveRecord::InternalMetadata}}
328
+ end
329
+
330
+ class ActiveRecord::InternalMetadata::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
331
+ include ActiveRecord::InternalMetadata::CustomFinderMethods
332
+ include ActiveRecord::InternalMetadata::QueryMethodsReturningAssociationRelation
333
+ Elem = type_member {{fixed: ActiveRecord::InternalMetadata}}
334
+
335
+ sig { params(records: T.any(ActiveRecord::InternalMetadata, T::Array[ActiveRecord::InternalMetadata])).returns(T.self_type) }
336
+ def <<(*records); end
337
+
338
+ sig { params(records: T.any(ActiveRecord::InternalMetadata, T::Array[ActiveRecord::InternalMetadata])).returns(T.self_type) }
339
+ def append(*records); end
340
+
341
+ sig { params(records: T.any(ActiveRecord::InternalMetadata, T::Array[ActiveRecord::InternalMetadata])).returns(T.self_type) }
342
+ def push(*records); end
343
+
344
+ sig { params(records: T.any(ActiveRecord::InternalMetadata, T::Array[ActiveRecord::InternalMetadata])).returns(T.self_type) }
345
+ def concat(*records); end
346
+ end
@@ -0,0 +1,4 @@
1
+ # typed: strong
2
+ # You do not have any routes defined!
3
+ # Please add some routes in config/routes.rb.
4
+ # For more information about routes, see the Rails guide: https://guides.rubyonrails.org/routing.html.
@@ -0,0 +1,328 @@
1
+ # This is an autogenerated file for dynamic methods in Potion
2
+ # Please rerun bundle exec rake rails_rbi:models[Potion] to regenerate.
3
+
4
+ # typed: strong
5
+ module Potion::ActiveRelation_WhereNot
6
+ sig { params(opts: T.untyped, rest: T.untyped).returns(T.self_type) }
7
+ def not(opts, *rest); end
8
+ end
9
+
10
+ module Potion::GeneratedAssociationMethods
11
+ sig { returns(T.nilable(::Wizard)) }
12
+ def wizard; end
13
+
14
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
15
+ def build_wizard(*args, &block); end
16
+
17
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
18
+ def create_wizard(*args, &block); end
19
+
20
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
21
+ def create_wizard!(*args, &block); end
22
+
23
+ sig { params(value: T.nilable(::Wizard)).void }
24
+ def wizard=(value); end
25
+
26
+ sig { returns(T.nilable(::Wizard)) }
27
+ def reload_wizard; end
28
+ end
29
+
30
+ module Potion::CustomFinderMethods
31
+ sig { params(limit: Integer).returns(T::Array[Potion]) }
32
+ def first_n(limit); end
33
+
34
+ sig { params(limit: Integer).returns(T::Array[Potion]) }
35
+ def last_n(limit); end
36
+
37
+ sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[Potion]) }
38
+ def find_n(*args); end
39
+
40
+ sig { params(id: T.nilable(Integer)).returns(T.nilable(Potion)) }
41
+ def find_by_id(id); end
42
+
43
+ sig { params(id: Integer).returns(Potion) }
44
+ def find_by_id!(id); end
45
+ end
46
+
47
+ class Potion < ApplicationRecord
48
+ include Potion::GeneratedAssociationMethods
49
+ extend Potion::CustomFinderMethods
50
+ extend Potion::QueryMethodsReturningRelation
51
+ RelationType = T.type_alias { T.any(Potion::ActiveRecord_Relation, Potion::ActiveRecord_Associations_CollectionProxy, Potion::ActiveRecord_AssociationRelation) }
52
+ end
53
+
54
+ module Potion::QueryMethodsReturningRelation
55
+ sig { returns(Potion::ActiveRecord_Relation) }
56
+ def all; end
57
+
58
+ sig { params(block: T.nilable(T.proc.void)).returns(Potion::ActiveRecord_Relation) }
59
+ def unscoped(&block); end
60
+
61
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
62
+ def reselect(*args); end
63
+
64
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
65
+ def order(*args); end
66
+
67
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
68
+ def reorder(*args); end
69
+
70
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
71
+ def group(*args); end
72
+
73
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
74
+ def limit(*args); end
75
+
76
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
77
+ def offset(*args); end
78
+
79
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
80
+ def joins(*args); end
81
+
82
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
83
+ def left_joins(*args); end
84
+
85
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
86
+ def left_outer_joins(*args); end
87
+
88
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
89
+ def where(*args); end
90
+
91
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
92
+ def rewhere(*args); end
93
+
94
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
95
+ def preload(*args); end
96
+
97
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
98
+ def extract_associated(*args); end
99
+
100
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
101
+ def eager_load(*args); end
102
+
103
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
104
+ def includes(*args); end
105
+
106
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
107
+ def from(*args); end
108
+
109
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
110
+ def lock(*args); end
111
+
112
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
113
+ def readonly(*args); end
114
+
115
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
116
+ def or(*args); end
117
+
118
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
119
+ def having(*args); end
120
+
121
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
122
+ def create_with(*args); end
123
+
124
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
125
+ def distinct(*args); end
126
+
127
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
128
+ def references(*args); end
129
+
130
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
131
+ def none(*args); end
132
+
133
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
134
+ def unscope(*args); end
135
+
136
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
137
+ def optimizer_hints(*args); end
138
+
139
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
140
+ def merge(*args); end
141
+
142
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
143
+ def except(*args); end
144
+
145
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_Relation) }
146
+ def only(*args); end
147
+
148
+ sig { params(block: T.proc.params(e: Potion).returns(T::Boolean)).returns(T::Array[Potion]) }
149
+ def select(&block); end
150
+
151
+ sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Potion::ActiveRecord_Relation) }
152
+ def select_columns(*args); end
153
+
154
+ sig { params(args: Symbol).returns(Potion::ActiveRecord_Relation) }
155
+ def where_missing(*args); end
156
+
157
+ sig { params(column: Symbol, values: T::Array[T.untyped]).returns(Potion::ActiveRecord_Relation) }
158
+ def in_order_of(column, values); end
159
+
160
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Potion::ActiveRecord_Relation) }
161
+ def extending(*args, &block); end
162
+
163
+ sig do
164
+ params(
165
+ of: T.nilable(Integer),
166
+ start: T.nilable(Integer),
167
+ finish: T.nilable(Integer),
168
+ load: T.nilable(T::Boolean),
169
+ error_on_ignore: T.nilable(T::Boolean),
170
+ block: T.nilable(T.proc.params(e: Potion::ActiveRecord_Relation).void)
171
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
172
+ end
173
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
174
+ end
175
+
176
+ module Potion::QueryMethodsReturningAssociationRelation
177
+ sig { returns(Potion::ActiveRecord_AssociationRelation) }
178
+ def all; end
179
+
180
+ sig { params(block: T.nilable(T.proc.void)).returns(Potion::ActiveRecord_Relation) }
181
+ def unscoped(&block); end
182
+
183
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
184
+ def reselect(*args); end
185
+
186
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
187
+ def order(*args); end
188
+
189
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
190
+ def reorder(*args); end
191
+
192
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
193
+ def group(*args); end
194
+
195
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
196
+ def limit(*args); end
197
+
198
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
199
+ def offset(*args); end
200
+
201
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
202
+ def joins(*args); end
203
+
204
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
205
+ def left_joins(*args); end
206
+
207
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
208
+ def left_outer_joins(*args); end
209
+
210
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
211
+ def where(*args); end
212
+
213
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
214
+ def rewhere(*args); end
215
+
216
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
217
+ def preload(*args); end
218
+
219
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
220
+ def extract_associated(*args); end
221
+
222
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
223
+ def eager_load(*args); end
224
+
225
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
226
+ def includes(*args); end
227
+
228
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
229
+ def from(*args); end
230
+
231
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
232
+ def lock(*args); end
233
+
234
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
235
+ def readonly(*args); end
236
+
237
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
238
+ def or(*args); end
239
+
240
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
241
+ def having(*args); end
242
+
243
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
244
+ def create_with(*args); end
245
+
246
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
247
+ def distinct(*args); end
248
+
249
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
250
+ def references(*args); end
251
+
252
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
253
+ def none(*args); end
254
+
255
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
256
+ def unscope(*args); end
257
+
258
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
259
+ def optimizer_hints(*args); end
260
+
261
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
262
+ def merge(*args); end
263
+
264
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
265
+ def except(*args); end
266
+
267
+ sig { params(args: T.untyped).returns(Potion::ActiveRecord_AssociationRelation) }
268
+ def only(*args); end
269
+
270
+ sig { params(block: T.proc.params(e: Potion).returns(T::Boolean)).returns(T::Array[Potion]) }
271
+ def select(&block); end
272
+
273
+ sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Potion::ActiveRecord_AssociationRelation) }
274
+ def select_columns(*args); end
275
+
276
+ sig { params(args: Symbol).returns(Potion::ActiveRecord_AssociationRelation) }
277
+ def where_missing(*args); end
278
+
279
+ sig { params(column: Symbol, values: T::Array[T.untyped]).returns(Potion::ActiveRecord_AssociationRelation) }
280
+ def in_order_of(column, values); end
281
+
282
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Potion::ActiveRecord_AssociationRelation) }
283
+ def extending(*args, &block); end
284
+
285
+ sig do
286
+ params(
287
+ of: T.nilable(Integer),
288
+ start: T.nilable(Integer),
289
+ finish: T.nilable(Integer),
290
+ load: T.nilable(T::Boolean),
291
+ error_on_ignore: T.nilable(T::Boolean),
292
+ block: T.nilable(T.proc.params(e: Potion::ActiveRecord_AssociationRelation).void)
293
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
294
+ end
295
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
296
+ end
297
+
298
+ class Potion::ActiveRecord_Relation < ActiveRecord::Relation
299
+ include Potion::ActiveRelation_WhereNot
300
+ include Potion::CustomFinderMethods
301
+ include Potion::QueryMethodsReturningRelation
302
+ Elem = type_member {{fixed: Potion}}
303
+ end
304
+
305
+ class Potion::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
306
+ include Potion::ActiveRelation_WhereNot
307
+ include Potion::CustomFinderMethods
308
+ include Potion::QueryMethodsReturningAssociationRelation
309
+ Elem = type_member {{fixed: Potion}}
310
+ end
311
+
312
+ class Potion::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
313
+ include Potion::CustomFinderMethods
314
+ include Potion::QueryMethodsReturningAssociationRelation
315
+ Elem = type_member {{fixed: Potion}}
316
+
317
+ sig { params(records: T.any(Potion, T::Array[Potion])).returns(T.self_type) }
318
+ def <<(*records); end
319
+
320
+ sig { params(records: T.any(Potion, T::Array[Potion])).returns(T.self_type) }
321
+ def append(*records); end
322
+
323
+ sig { params(records: T.any(Potion, T::Array[Potion])).returns(T.self_type) }
324
+ def push(*records); end
325
+
326
+ sig { params(records: T.any(Potion, T::Array[Potion])).returns(T.self_type) }
327
+ def concat(*records); end
328
+ end