sorbet-rails 0.7.31 → 0.7.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) 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/.github/workflows/publish-gem.yml +9 -19
  5. data/CONTRIBUTING.md +1 -0
  6. data/Gemfile +4 -0
  7. data/README.md +14 -3
  8. data/Rakefile +27 -1
  9. data/lib/sorbet-rails/active_record_rbi_formatter.rb +4 -4
  10. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +27 -0
  11. data/lib/sorbet-rails/model_rbi_formatter.rb +3 -3
  12. data/lib/sorbet-rails/rails_mixins/active_record_overrides.rb +1 -1
  13. data/lib/sorbet-rails/rails_mixins/custom_finder_methods.rb +8 -0
  14. data/lib/sorbet-rails/tasks/rails_rbi.rake +15 -0
  15. data/sorbet-rails.gemspec +2 -2
  16. data/spec/bin/run_all_specs.sh +1 -0
  17. data/spec/custom_finder_methods_spec.rb +23 -0
  18. data/spec/generators/rails-template.rb +2 -7
  19. data/spec/rails_helper.rb +2 -0
  20. data/spec/rake_rails_rbi_models_spec.rb +1 -1
  21. data/spec/support/v5.2/Gemfile.lock +76 -67
  22. data/spec/support/v5.2/sorbet_test_cases.rb +8 -0
  23. data/spec/support/v6.0/Gemfile.lock +93 -85
  24. data/spec/support/v6.0/sorbet_test_cases.rb +8 -0
  25. data/spec/support/v6.1/Gemfile +1 -1
  26. data/spec/support/v6.1/Gemfile.lock +115 -108
  27. data/spec/support/v6.1/sorbet_test_cases.rb +11 -0
  28. data/spec/support/v7.0/.gitattributes +7 -0
  29. data/spec/support/v7.0/.gitignore +35 -0
  30. data/spec/support/v7.0/Gemfile +48 -0
  31. data/spec/support/v7.0/Gemfile.lock +218 -0
  32. data/spec/support/v7.0/README.md +24 -0
  33. data/spec/support/v7.0/Rakefile +6 -0
  34. data/spec/support/v7.0/app/assets/images/.keep +0 -0
  35. data/spec/support/v7.0/app/assets/stylesheets/application.css +1 -0
  36. data/spec/support/v7.0/app/controllers/application_controller.rb +3 -0
  37. data/spec/support/v7.0/app/controllers/concerns/.keep +0 -0
  38. data/spec/support/v7.0/app/helpers/application_helper.rb +3 -0
  39. data/spec/support/v7.0/app/helpers/bar_helper.rb +3 -0
  40. data/spec/support/v7.0/app/helpers/baz_helper.rb +3 -0
  41. data/spec/support/v7.0/app/helpers/foo_helper.rb +3 -0
  42. data/spec/support/v7.0/app/jobs/application_job.rb +8 -0
  43. data/spec/support/v7.0/app/jobs/award_house_point_hourglasses.rb +12 -0
  44. data/spec/support/v7.0/app/mailers/application_mailer.rb +5 -0
  45. data/spec/support/v7.0/app/mailers/daily_prophet_mailer.rb +9 -0
  46. data/spec/support/v7.0/app/mailers/hogwarts_acceptance_mailer.rb +29 -0
  47. data/spec/support/v7.0/app/models/application_record.rb +4 -0
  48. data/spec/support/v7.0/app/models/concerns/.keep +0 -0
  49. data/spec/support/v7.0/app/models/concerns/mythical.rb +11 -0
  50. data/spec/support/v7.0/app/models/headmaster.rb +8 -0
  51. data/spec/support/v7.0/app/models/potion.rb +6 -0
  52. data/spec/support/v7.0/app/models/robe.rb +4 -0
  53. data/spec/support/v7.0/app/models/school.rb +5 -0
  54. data/spec/support/v7.0/app/models/spell.rb +5 -0
  55. data/spec/support/v7.0/app/models/spell_book.rb +18 -0
  56. data/spec/support/v7.0/app/models/squib.rb +6 -0
  57. data/spec/support/v7.0/app/models/subject.rb +5 -0
  58. data/spec/support/v7.0/app/models/wand.rb +19 -0
  59. data/spec/support/v7.0/app/models/wizard.rb +65 -0
  60. data/spec/support/v7.0/app/views/layouts/application.html.erb +15 -0
  61. data/spec/support/v7.0/app/views/layouts/mailer.html.erb +13 -0
  62. data/spec/support/v7.0/app/views/layouts/mailer.text.erb +1 -0
  63. data/spec/support/v7.0/bin/bundle +114 -0
  64. data/spec/support/v7.0/bin/rails +4 -0
  65. data/spec/support/v7.0/bin/rake +4 -0
  66. data/spec/support/v7.0/bin/setup +33 -0
  67. data/spec/support/v7.0/config/application.rb +38 -0
  68. data/spec/support/v7.0/config/boot.rb +4 -0
  69. data/spec/support/v7.0/config/database.yml +25 -0
  70. data/spec/support/v7.0/config/environment.rb +6 -0
  71. data/spec/support/v7.0/config/environments/development.rb +69 -0
  72. data/spec/support/v7.0/config/environments/production.rb +83 -0
  73. data/spec/support/v7.0/config/environments/test.rb +61 -0
  74. data/spec/support/v7.0/config/initializers/content_security_policy.rb +26 -0
  75. data/spec/support/v7.0/config/initializers/filter_parameter_logging.rb +9 -0
  76. data/spec/support/v7.0/config/initializers/inflections.rb +17 -0
  77. data/spec/support/v7.0/config/initializers/permissions_policy.rb +12 -0
  78. data/spec/support/v7.0/config/initializers/sorbet_rails.rb +3 -0
  79. data/spec/support/v7.0/config/locales/en.yml +33 -0
  80. data/spec/support/v7.0/config/puma.rb +44 -0
  81. data/spec/support/v7.0/config/routes.rb +8 -0
  82. data/spec/support/v7.0/config/storage.yml +34 -0
  83. data/spec/support/v7.0/config.ru +6 -0
  84. data/spec/support/v7.0/db/migrate/20190620000001_create_wizards.rb +14 -0
  85. data/spec/support/v7.0/db/migrate/20190620000002_create_wands.rb +12 -0
  86. data/spec/support/v7.0/db/migrate/20190620000003_create_spell_books.rb +10 -0
  87. data/spec/support/v7.0/db/migrate/20190620000004_add_more_column_types_to_wands.rb +14 -0
  88. data/spec/support/v7.0/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
  89. data/spec/support/v7.0/db/migrate/20190620000006_add_more_enums_to_wizard.rb +9 -0
  90. data/spec/support/v7.0/db/migrate/20190620000007_add_type_to_wizard.rb +6 -0
  91. data/spec/support/v7.0/db/migrate/20190620000008_add_robe_to_wizard.rb +8 -0
  92. data/spec/support/v7.0/db/migrate/20190620000009_add_school.rb +10 -0
  93. data/spec/support/v7.0/db/migrate/20190620000010_add_subject.rb +8 -0
  94. data/spec/support/v7.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  95. data/spec/support/v7.0/db/migrate/20190620000012_add_spell.rb +8 -0
  96. data/spec/support/v7.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  97. data/spec/support/v7.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
  98. data/spec/support/v7.0/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  99. data/spec/support/v7.0/db/schema.rb +98 -0
  100. data/spec/support/v7.0/db/seeds.rb +8 -0
  101. data/spec/support/v7.0/lib/assets/.keep +0 -0
  102. data/spec/support/v7.0/lib/mythical_rbi_plugin.rb +16 -0
  103. data/spec/support/v7.0/lib/tasks/.keep +0 -0
  104. data/spec/support/v7.0/log/.keep +0 -0
  105. data/spec/support/v7.0/sorbet_test_cases.rb +439 -0
  106. data/spec/support/v7.0/storage/.keep +0 -0
  107. data/spec/support/v7.0/tmp/.keep +0 -0
  108. data/spec/support/v7.0/tmp/pids/.keep +0 -0
  109. data/spec/support/v7.0/tmp/storage/.keep +0 -0
  110. data/spec/support/v7.0/vendor/.keep +0 -0
  111. data/spec/test_data/v5.2/expected_active_record_base.rbi +6 -0
  112. data/spec/test_data/v5.2/expected_active_record_relation.rbi +8 -2
  113. data/spec/test_data/v5.2/expected_attachment.rbi +3 -3
  114. data/spec/test_data/v5.2/expected_blob.rbi +3 -3
  115. data/spec/test_data/v5.2/expected_habtm_subjects.rbi +3 -3
  116. data/spec/test_data/v5.2/expected_habtm_wizards.rbi +3 -3
  117. data/spec/test_data/v5.2/expected_headmaster.rbi +3 -3
  118. data/spec/test_data/v5.2/expected_internal_metadata.rbi +3 -3
  119. data/spec/test_data/v5.2/expected_potion.rbi +3 -3
  120. data/spec/test_data/v5.2/expected_robe.rbi +3 -3
  121. data/spec/test_data/v5.2/expected_schema_migration.rbi +3 -3
  122. data/spec/test_data/v5.2/expected_school.rbi +3 -3
  123. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +3 -3
  124. data/spec/test_data/v5.2/expected_spell.rbi +3 -3
  125. data/spec/test_data/v5.2/expected_spell_book/habtm_spell_books.rbi +3 -3
  126. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +3 -3
  127. data/spec/test_data/v5.2/expected_spell_book.rbi +3 -3
  128. data/spec/test_data/v5.2/expected_squib.rbi +3 -3
  129. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +3 -3
  130. data/spec/test_data/v5.2/expected_subject.rbi +3 -3
  131. data/spec/test_data/v5.2/expected_wand.rbi +3 -3
  132. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +3 -3
  133. data/spec/test_data/v5.2/expected_wizard.rbi +3 -3
  134. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +3 -3
  135. data/spec/test_data/v6.0/expected_active_record_base.rbi +6 -0
  136. data/spec/test_data/v6.0/expected_active_record_relation.rbi +8 -2
  137. data/spec/test_data/v6.0/expected_attachment.rbi +3 -3
  138. data/spec/test_data/v6.0/expected_blob.rbi +3 -3
  139. data/spec/test_data/v6.0/expected_habtm_subjects.rbi +3 -3
  140. data/spec/test_data/v6.0/expected_habtm_wizards.rbi +3 -3
  141. data/spec/test_data/v6.0/expected_headmaster.rbi +3 -3
  142. data/spec/test_data/v6.0/expected_internal_metadata.rbi +3 -3
  143. data/spec/test_data/v6.0/expected_potion.rbi +3 -3
  144. data/spec/test_data/v6.0/expected_robe.rbi +3 -3
  145. data/spec/test_data/v6.0/expected_schema_migration.rbi +3 -3
  146. data/spec/test_data/v6.0/expected_school.rbi +3 -3
  147. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +3 -3
  148. data/spec/test_data/v6.0/expected_spell.rbi +3 -3
  149. data/spec/test_data/v6.0/expected_spell_book/habtm_spell_books.rbi +3 -3
  150. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +3 -3
  151. data/spec/test_data/v6.0/expected_spell_book.rbi +3 -3
  152. data/spec/test_data/v6.0/expected_squib.rbi +3 -3
  153. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +3 -3
  154. data/spec/test_data/v6.0/expected_subject.rbi +3 -3
  155. data/spec/test_data/v6.0/expected_wand.rbi +3 -3
  156. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +3 -3
  157. data/spec/test_data/v6.0/expected_wizard.rbi +3 -3
  158. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +3 -3
  159. data/spec/test_data/v6.1/expected_active_record_base.rbi +6 -0
  160. data/spec/test_data/v6.1/expected_active_record_relation.rbi +8 -2
  161. data/spec/test_data/v6.1/expected_attachment.rbi +9 -3
  162. data/spec/test_data/v6.1/expected_blob.rbi +9 -3
  163. data/spec/test_data/v6.1/expected_habtm_subjects.rbi +3 -3
  164. data/spec/test_data/v6.1/expected_habtm_wizards.rbi +3 -3
  165. data/spec/test_data/v6.1/expected_headmaster.rbi +9 -3
  166. data/spec/test_data/v6.1/expected_internal_metadata.rbi +9 -3
  167. data/spec/test_data/v6.1/expected_potion.rbi +9 -3
  168. data/spec/test_data/v6.1/expected_record.rbi +9 -3
  169. data/spec/test_data/v6.1/expected_robe.rbi +9 -3
  170. data/spec/test_data/v6.1/expected_schema_migration.rbi +9 -3
  171. data/spec/test_data/v6.1/expected_school.rbi +9 -3
  172. data/spec/test_data/v6.1/expected_spell/habtm_spell_books.rbi +9 -3
  173. data/spec/test_data/v6.1/expected_spell.rbi +9 -3
  174. data/spec/test_data/v6.1/expected_spell_book/habtm_spell_books.rbi +3 -3
  175. data/spec/test_data/v6.1/expected_spell_book/habtm_spells.rbi +9 -3
  176. data/spec/test_data/v6.1/expected_spell_book.rbi +9 -3
  177. data/spec/test_data/v6.1/expected_squib.rbi +9 -3
  178. data/spec/test_data/v6.1/expected_subject/habtm_wizards.rbi +9 -3
  179. data/spec/test_data/v6.1/expected_subject.rbi +9 -3
  180. data/spec/test_data/v6.1/expected_variant_record.rbi +9 -3
  181. data/spec/test_data/v6.1/expected_wand.rbi +9 -3
  182. data/spec/test_data/v6.1/expected_wizard/habtm_subjects.rbi +9 -3
  183. data/spec/test_data/v6.1/expected_wizard.rbi +9 -3
  184. data/spec/test_data/v6.1/expected_wizard_wo_spellbook.rbi +9 -3
  185. data/spec/test_data/v7.0/expected_active_record_base.rbi +119 -0
  186. data/spec/test_data/v7.0/expected_active_record_relation.rbi +180 -0
  187. data/spec/test_data/v7.0/expected_application_job.rbi +20 -0
  188. data/spec/test_data/v7.0/expected_application_mailer.rbi +5 -0
  189. data/spec/test_data/v7.0/expected_attachment.rbi +358 -0
  190. data/spec/test_data/v7.0/expected_award_house_point_hourglasses.rbi +20 -0
  191. data/spec/test_data/v7.0/expected_blob.rbi +394 -0
  192. data/spec/test_data/v7.0/expected_custom_application_job.rbi +21 -0
  193. data/spec/test_data/v7.0/expected_custom_application_mailer.rbi +6 -0
  194. data/spec/test_data/v7.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  195. data/spec/test_data/v7.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  196. data/spec/test_data/v7.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  197. data/spec/test_data/v7.0/expected_daily_prophet_mailer.rbi +7 -0
  198. data/spec/test_data/v7.0/expected_headmaster.rbi +376 -0
  199. data/spec/test_data/v7.0/expected_helpers.rbi +27 -0
  200. data/spec/test_data/v7.0/expected_helpers_with_application_and_devise_helpers.rbi +34 -0
  201. data/spec/test_data/v7.0/expected_hogwarts_acceptance_mailer.rbi +20 -0
  202. data/spec/test_data/v7.0/expected_internal_metadata.rbi +346 -0
  203. data/spec/test_data/v7.0/expected_no_routes.rbi +4 -0
  204. data/spec/test_data/v7.0/expected_potion.rbi +328 -0
  205. data/spec/test_data/v7.0/expected_record.rbi +307 -0
  206. data/spec/test_data/v7.0/expected_robe.rbi +349 -0
  207. data/spec/test_data/v7.0/expected_routes.rbi +182 -0
  208. data/spec/test_data/v7.0/expected_schema_migration.rbi +319 -0
  209. data/spec/test_data/v7.0/expected_school.rbi +349 -0
  210. data/spec/test_data/v7.0/expected_spell/habtm_spell_books.rbi +367 -0
  211. data/spec/test_data/v7.0/expected_spell.rbi +340 -0
  212. data/spec/test_data/v7.0/expected_spell_book/habtm_spells.rbi +367 -0
  213. data/spec/test_data/v7.0/expected_spell_book.rbi +499 -0
  214. data/spec/test_data/v7.0/expected_squib.rbi +1204 -0
  215. data/spec/test_data/v7.0/expected_srb_tc_output.txt +1 -0
  216. data/spec/test_data/v7.0/expected_subject/habtm_wizards.rbi +367 -0
  217. data/spec/test_data/v7.0/expected_subject.rbi +340 -0
  218. data/spec/test_data/v7.0/expected_variant_record.rbi +382 -0
  219. data/spec/test_data/v7.0/expected_wand.rbi +611 -0
  220. data/spec/test_data/v7.0/expected_wizard/habtm_subjects.rbi +367 -0
  221. data/spec/test_data/v7.0/expected_wizard.rbi +1280 -0
  222. data/spec/test_data/v7.0/expected_wizard_wo_spellbook.rbi +1274 -0
  223. metadata +245 -3
@@ -266,7 +266,7 @@ class Wand::ActiveRecord_Relation < ActiveRecord::Relation
266
266
  include Wand::ActiveRelation_WhereNot
267
267
  include Wand::CustomFinderMethods
268
268
  include Wand::QueryMethodsReturningRelation
269
- Elem = type_member(fixed: Wand)
269
+ Elem = type_member {{fixed: Wand}}
270
270
 
271
271
  sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
272
272
  def basilisk_horn(*args); end
@@ -297,7 +297,7 @@ class Wand::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
297
297
  include Wand::ActiveRelation_WhereNot
298
298
  include Wand::CustomFinderMethods
299
299
  include Wand::QueryMethodsReturningAssociationRelation
300
- Elem = type_member(fixed: Wand)
300
+ Elem = type_member {{fixed: Wand}}
301
301
 
302
302
  sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
303
303
  def basilisk_horn(*args); end
@@ -327,7 +327,7 @@ end
327
327
  class Wand::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
328
328
  include Wand::CustomFinderMethods
329
329
  include Wand::QueryMethodsReturningAssociationRelation
330
- Elem = type_member(fixed: Wand)
330
+ Elem = type_member {{fixed: Wand}}
331
331
 
332
332
  sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
333
333
  def basilisk_horn(*args); end
@@ -466,6 +466,9 @@ module Wand::QueryMethodsReturningRelation
466
466
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wand::ActiveRecord_Relation) }
467
467
  def select_columns(*args); end
468
468
 
469
+ sig { params(args: Symbol).returns(Wand::ActiveRecord_Relation) }
470
+ def where_missing(*args); end
471
+
469
472
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
470
473
  def extending(*args, &block); end
471
474
 
@@ -582,6 +585,9 @@ module Wand::QueryMethodsReturningAssociationRelation
582
585
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wand::ActiveRecord_AssociationRelation) }
583
586
  def select_columns(*args); end
584
587
 
588
+ sig { params(args: Symbol).returns(Wand::ActiveRecord_AssociationRelation) }
589
+ def where_missing(*args); end
590
+
585
591
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_AssociationRelation) }
586
592
  def extending(*args, &block); end
587
593
 
@@ -190,6 +190,9 @@ module Wizard::HABTM_Subjects::QueryMethodsReturningRelation
190
190
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
191
191
  def select_columns(*args); end
192
192
 
193
+ sig { params(args: Symbol).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
194
+ def where_missing(*args); end
195
+
193
196
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
194
197
  def extending(*args, &block); end
195
198
 
@@ -306,6 +309,9 @@ module Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
306
309
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
307
310
  def select_columns(*args); end
308
311
 
312
+ sig { params(args: Symbol).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
313
+ def where_missing(*args); end
314
+
309
315
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
310
316
  def extending(*args, &block); end
311
317
 
@@ -326,20 +332,20 @@ class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
326
332
  include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
327
333
  include Wizard::HABTM_Subjects::CustomFinderMethods
328
334
  include Wizard::HABTM_Subjects::QueryMethodsReturningRelation
329
- Elem = type_member(fixed: Wizard::HABTM_Subjects)
335
+ Elem = type_member {{fixed: Wizard::HABTM_Subjects}}
330
336
  end
331
337
 
332
338
  class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
333
339
  include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
334
340
  include Wizard::HABTM_Subjects::CustomFinderMethods
335
341
  include Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
336
- Elem = type_member(fixed: Wizard::HABTM_Subjects)
342
+ Elem = type_member {{fixed: Wizard::HABTM_Subjects}}
337
343
  end
338
344
 
339
345
  class Wizard::HABTM_Subjects::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
340
346
  include Wizard::HABTM_Subjects::CustomFinderMethods
341
347
  include Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
342
- Elem = type_member(fixed: Wizard::HABTM_Subjects)
348
+ Elem = type_member {{fixed: Wizard::HABTM_Subjects}}
343
349
 
344
350
  sig { params(records: T.any(Wizard::HABTM_Subjects, T::Array[Wizard::HABTM_Subjects])).returns(T.self_type) }
345
351
  def <<(*records); end
@@ -552,7 +552,7 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
552
552
  include Wizard::ActiveRelation_WhereNot
553
553
  include Wizard::CustomFinderMethods
554
554
  include Wizard::QueryMethodsReturningRelation
555
- Elem = type_member(fixed: Wizard)
555
+ Elem = type_member {{fixed: Wizard}}
556
556
 
557
557
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
558
558
  def Alastor_Mad_Eye_Moody(*args); end
@@ -700,7 +700,7 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
700
700
  include Wizard::ActiveRelation_WhereNot
701
701
  include Wizard::CustomFinderMethods
702
702
  include Wizard::QueryMethodsReturningAssociationRelation
703
- Elem = type_member(fixed: Wizard)
703
+ Elem = type_member {{fixed: Wizard}}
704
704
 
705
705
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
706
706
  def Alastor_Mad_Eye_Moody(*args); end
@@ -847,7 +847,7 @@ end
847
847
  class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
848
848
  include Wizard::CustomFinderMethods
849
849
  include Wizard::QueryMethodsReturningAssociationRelation
850
- Elem = type_member(fixed: Wizard)
850
+ Elem = type_member {{fixed: Wizard}}
851
851
 
852
852
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
853
853
  def Alastor_Mad_Eye_Moody(*args); end
@@ -1103,6 +1103,9 @@ module Wizard::QueryMethodsReturningRelation
1103
1103
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::ActiveRecord_Relation) }
1104
1104
  def select_columns(*args); end
1105
1105
 
1106
+ sig { params(args: Symbol).returns(Wizard::ActiveRecord_Relation) }
1107
+ def where_missing(*args); end
1108
+
1106
1109
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
1107
1110
  def extending(*args, &block); end
1108
1111
 
@@ -1219,6 +1222,9 @@ module Wizard::QueryMethodsReturningAssociationRelation
1219
1222
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::ActiveRecord_AssociationRelation) }
1220
1223
  def select_columns(*args); end
1221
1224
 
1225
+ sig { params(args: Symbol).returns(Wizard::ActiveRecord_AssociationRelation) }
1226
+ def where_missing(*args); end
1227
+
1222
1228
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
1223
1229
  def extending(*args, &block); end
1224
1230
 
@@ -552,7 +552,7 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
552
552
  include Wizard::ActiveRelation_WhereNot
553
553
  include Wizard::CustomFinderMethods
554
554
  include Wizard::QueryMethodsReturningRelation
555
- Elem = type_member(fixed: Wizard)
555
+ Elem = type_member {{fixed: Wizard}}
556
556
 
557
557
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
558
558
  def Alastor_Mad_Eye_Moody(*args); end
@@ -700,7 +700,7 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
700
700
  include Wizard::ActiveRelation_WhereNot
701
701
  include Wizard::CustomFinderMethods
702
702
  include Wizard::QueryMethodsReturningAssociationRelation
703
- Elem = type_member(fixed: Wizard)
703
+ Elem = type_member {{fixed: Wizard}}
704
704
 
705
705
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
706
706
  def Alastor_Mad_Eye_Moody(*args); end
@@ -847,7 +847,7 @@ end
847
847
  class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
848
848
  include Wizard::CustomFinderMethods
849
849
  include Wizard::QueryMethodsReturningAssociationRelation
850
- Elem = type_member(fixed: Wizard)
850
+ Elem = type_member {{fixed: Wizard}}
851
851
 
852
852
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
853
853
  def Alastor_Mad_Eye_Moody(*args); end
@@ -1103,6 +1103,9 @@ module Wizard::QueryMethodsReturningRelation
1103
1103
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::ActiveRecord_Relation) }
1104
1104
  def select_columns(*args); end
1105
1105
 
1106
+ sig { params(args: Symbol).returns(Wizard::ActiveRecord_Relation) }
1107
+ def where_missing(*args); end
1108
+
1106
1109
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
1107
1110
  def extending(*args, &block); end
1108
1111
 
@@ -1219,6 +1222,9 @@ module Wizard::QueryMethodsReturningAssociationRelation
1219
1222
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::ActiveRecord_AssociationRelation) }
1220
1223
  def select_columns(*args); end
1221
1224
 
1225
+ sig { params(args: Symbol).returns(Wizard::ActiveRecord_AssociationRelation) }
1226
+ def where_missing(*args); end
1227
+
1222
1228
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
1223
1229
  def extending(*args, &block); end
1224
1230
 
@@ -0,0 +1,119 @@
1
+ # typed: strong
2
+ # This is an autogenerated file for Rails' ActiveRecord.
3
+ # Please rerun bundle exec rake rails_rbi:active_record to regenerate.
4
+ class ActiveRecord::Base
5
+ sig { params(args: T.untyped).returns(T.attached_class) }
6
+ def self.find(*args); end
7
+
8
+ sig { params(args: T.untyped).returns(T.nilable(T.attached_class)) }
9
+ def self.find_by(*args); end
10
+
11
+ sig { params(args: T.untyped).returns(T.attached_class) }
12
+ def self.find_by!(*args); end
13
+
14
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
15
+ def self.find_or_initialize_by(attributes, &block); end
16
+
17
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
18
+ def self.find_or_create_by(attributes, &block); end
19
+
20
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
21
+ def self.find_or_create_by!(attributes, &block); end
22
+
23
+ sig { returns(T.nilable(T.attached_class)) }
24
+ def self.first; end
25
+
26
+ sig { returns(T.attached_class) }
27
+ def self.first!; end
28
+
29
+ sig { returns(T.nilable(T.attached_class)) }
30
+ def self.second; end
31
+
32
+ sig { returns(T.attached_class) }
33
+ def self.second!; end
34
+
35
+ sig { returns(T.nilable(T.attached_class)) }
36
+ def self.third; end
37
+
38
+ sig { returns(T.attached_class) }
39
+ def self.third!; end
40
+
41
+ sig { returns(T.nilable(T.attached_class)) }
42
+ def self.third_to_last; end
43
+
44
+ sig { returns(T.attached_class) }
45
+ def self.third_to_last!; end
46
+
47
+ sig { returns(T.nilable(T.attached_class)) }
48
+ def self.second_to_last; end
49
+
50
+ sig { returns(T.attached_class) }
51
+ def self.second_to_last!; end
52
+
53
+ sig { returns(T.nilable(T.attached_class)) }
54
+ def self.last; end
55
+
56
+ sig { returns(T.attached_class) }
57
+ def self.last!; end
58
+
59
+ sig { returns(T.nilable(T.attached_class)) }
60
+ def self.take; end
61
+
62
+ sig { returns(T.attached_class) }
63
+ def self.take!; end
64
+
65
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
66
+ def self.create(attributes = nil, &block); end
67
+
68
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
69
+ def self.create!(attributes = nil, &block); end
70
+
71
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
72
+ def self.new(attributes = nil, &block); end
73
+
74
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
75
+ def self.first_or_create(attributes = nil, &block); end
76
+
77
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
78
+ def self.first_or_create!(attributes = nil, &block); end
79
+
80
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
81
+ def self.first_or_initialize(attributes = nil, &block); end
82
+
83
+ sig do
84
+ params(
85
+ start: T.nilable(Integer),
86
+ finish: T.nilable(Integer),
87
+ batch_size: T.nilable(Integer),
88
+ error_on_ignore: T.nilable(T::Boolean),
89
+ block: T.nilable(T.proc.params(e: T.attached_class).void)
90
+ ).returns(T::Enumerator[T.attached_class])
91
+ end
92
+ def self.find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
93
+
94
+ sig do
95
+ params(
96
+ start: T.nilable(Integer),
97
+ finish: T.nilable(Integer),
98
+ batch_size: T.nilable(Integer),
99
+ error_on_ignore: T.nilable(T::Boolean),
100
+ block: T.nilable(T.proc.params(e: T::Array[T.attached_class]).void)
101
+ ).returns(T::Enumerator[T::Array[T.attached_class]])
102
+ end
103
+ def self.find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
104
+
105
+ sig { params(block: T.nilable(T.proc.params(e: T.attached_class).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
106
+ def self.any?(&block); end
107
+
108
+ sig { params(block: T.nilable(T.proc.params(e: T.attached_class).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
109
+ def self.many?(&block); end
110
+
111
+ sig { params(block: T.nilable(T.proc.params(e: T.attached_class).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
112
+ def self.none?(&block); end
113
+
114
+ sig { params(block: T.nilable(T.proc.params(e: T.attached_class).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
115
+ def self.one?(&block); end
116
+
117
+ sig { params(conditions: T.untyped).returns(T::Boolean) }
118
+ def self.exists?(conditions = nil); end
119
+ end
@@ -0,0 +1,180 @@
1
+ # typed: strong
2
+ # This is an autogenerated file for Rails' ActiveRecord.
3
+ # Please rerun bundle exec rake rails_rbi:active_record to regenerate.
4
+ class ActiveRecord::Relation
5
+ include Enumerable
6
+
7
+ sig { params(args: T.untyped).returns(Elem) }
8
+ def find(*args); end
9
+
10
+ sig { params(args: T.untyped).returns(T.nilable(Elem)) }
11
+ def find_by(*args); end
12
+
13
+ sig { params(args: T.untyped).returns(Elem) }
14
+ def find_by!(*args); end
15
+
16
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
17
+ def find_or_initialize_by(attributes, &block); end
18
+
19
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
20
+ def find_or_create_by(attributes, &block); end
21
+
22
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
23
+ def find_or_create_by!(attributes, &block); end
24
+
25
+ sig { returns(T.nilable(Elem)) }
26
+ def first; end
27
+
28
+ sig { returns(Elem) }
29
+ def first!; end
30
+
31
+ sig { returns(T.nilable(Elem)) }
32
+ def second; end
33
+
34
+ sig { returns(Elem) }
35
+ def second!; end
36
+
37
+ sig { returns(T.nilable(Elem)) }
38
+ def third; end
39
+
40
+ sig { returns(Elem) }
41
+ def third!; end
42
+
43
+ sig { returns(T.nilable(Elem)) }
44
+ def third_to_last; end
45
+
46
+ sig { returns(Elem) }
47
+ def third_to_last!; end
48
+
49
+ sig { returns(T.nilable(Elem)) }
50
+ def second_to_last; end
51
+
52
+ sig { returns(Elem) }
53
+ def second_to_last!; end
54
+
55
+ sig { returns(T.nilable(Elem)) }
56
+ def last; end
57
+
58
+ sig { returns(Elem) }
59
+ def last!; end
60
+
61
+ sig { returns(T.nilable(Elem)) }
62
+ def take; end
63
+
64
+ sig { returns(Elem) }
65
+ def take!; end
66
+
67
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
68
+ def create(attributes = nil, &block); end
69
+
70
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
71
+ def create!(attributes = nil, &block); end
72
+
73
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
74
+ def new(attributes = nil, &block); end
75
+
76
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
77
+ def build(attributes = nil, &block); end
78
+
79
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
80
+ def first_or_create(attributes = nil, &block); end
81
+
82
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
83
+ def first_or_create!(attributes = nil, &block); end
84
+
85
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
86
+ def first_or_initialize(attributes = nil, &block); end
87
+
88
+ sig do
89
+ params(
90
+ start: T.nilable(Integer),
91
+ finish: T.nilable(Integer),
92
+ batch_size: T.nilable(Integer),
93
+ error_on_ignore: T.nilable(T::Boolean),
94
+ block: T.nilable(T.proc.params(e: Elem).void)
95
+ ).returns(T::Enumerator[Elem])
96
+ end
97
+ def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
98
+
99
+ sig do
100
+ params(
101
+ start: T.nilable(Integer),
102
+ finish: T.nilable(Integer),
103
+ batch_size: T.nilable(Integer),
104
+ error_on_ignore: T.nilable(T::Boolean),
105
+ block: T.nilable(T.proc.params(e: T::Array[Elem]).void)
106
+ ).returns(T::Enumerator[T::Array[Elem]])
107
+ end
108
+ def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
109
+
110
+ sig { params(block: T.nilable(T.proc.params(e: Elem).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
111
+ def any?(&block); end
112
+
113
+ sig { params(block: T.nilable(T.proc.params(e: Elem).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
114
+ def many?(&block); end
115
+
116
+ sig { params(block: T.nilable(T.proc.params(e: Elem).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
117
+ def none?(&block); end
118
+
119
+ sig { params(block: T.nilable(T.proc.params(e: Elem).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
120
+ def one?(&block); end
121
+
122
+ sig { params(conditions: T.untyped).returns(T::Boolean) }
123
+ def exists?(conditions = nil); end
124
+
125
+ sig { override.params(block: T.proc.params(e: Elem).void).returns(T::Array[Elem]) }
126
+ def each(&block); end
127
+
128
+ sig { params(level: T.nilable(Integer)).returns(T::Array[Elem]) }
129
+ def flatten(level); end
130
+
131
+ sig { returns(T::Array[Elem]) }
132
+ def to_a; end
133
+
134
+ sig { type_parameters(:U).params(blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U))).returns(T::Array[T.type_parameter(:U)]) }
135
+ def map(&blk); end
136
+
137
+ sig { returns(T::Boolean) }
138
+ def empty?; end
139
+ end
140
+
141
+ class ActiveRecord::AssociationRelation < ActiveRecord::Relation
142
+ Elem = type_member {{fixed: T.untyped}}
143
+
144
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
145
+ def new(attributes = nil, &block); end
146
+
147
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
148
+ def build(attributes = nil, &block); end
149
+
150
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
151
+ def create(attributes = nil, &block); end
152
+
153
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
154
+ def create!(attributes = nil, &block); end
155
+ end
156
+
157
+ class ActiveRecord::Associations::CollectionProxy < ActiveRecord::Relation
158
+ Elem = type_member {{fixed: T.untyped}}
159
+
160
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
161
+ def new(attributes = nil, &block); end
162
+
163
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
164
+ def build(attributes = nil, &block); end
165
+
166
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
167
+ def create(attributes = nil, &block); end
168
+
169
+ sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
170
+ def create!(attributes = nil, &block); end
171
+
172
+ sig { params(args: T.untyped).returns(Elem) }
173
+ def find(*args); end
174
+
175
+ sig { params(limit: T.untyped).returns(T.nilable(Elem)) }
176
+ def last(limit = nil); end
177
+
178
+ sig { returns(T::Boolean) }
179
+ def empty?; end
180
+ end
@@ -0,0 +1,20 @@
1
+ # typed: strong
2
+ # This is an autogenerated file for Rails' jobs.
3
+ # Please rerun bundle exec rake rails_rbi:jobs to regenerate.
4
+ class ApplicationJob
5
+ sig { params(_: T.untyped).returns(ApplicationJob) }
6
+ def self.perform_later(*_); end
7
+
8
+ sig { params(_: T.untyped).returns(ApplicationJob) }
9
+ def self.perform_now(*_); end
10
+
11
+ sig do
12
+ params(
13
+ wait: T.nilable(ActiveSupport::Duration),
14
+ wait_until: T.nilable(T.any(ActiveSupport::TimeWithZone, Date, Time)),
15
+ queue: T.nilable(T.any(String, Symbol)),
16
+ priority: T.nilable(Integer)
17
+ ).returns(T.self_type)
18
+ end
19
+ def self.set(wait: nil, wait_until: nil, queue: nil, priority: nil); end
20
+ end
@@ -0,0 +1,5 @@
1
+ # typed: strong
2
+ # This is an autogenerated file for Rails' mailers.
3
+ # Please rerun bundle exec rake rails_rbi:mailers to regenerate.
4
+ class ApplicationMailer
5
+ end