sorbet-rails 0.6.5 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +1 -2
  3. data/.gitignore +2 -1
  4. data/.travis.yml +1 -1
  5. data/README.md +60 -11
  6. data/Rakefile +3 -3
  7. data/lib/bundled_rbi/customizabel_rbi_formatter.rbi +29 -0
  8. data/lib/bundled_rbi/pluck_to_tstruct.rbi +2 -1
  9. data/lib/bundled_rbi/typed_enum.rbi +7 -0
  10. data/lib/sorbet-rails.rb +1 -3
  11. data/lib/sorbet-rails/active_record_rbi_formatter.rb +2 -2
  12. data/lib/sorbet-rails/config.rb +12 -0
  13. data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +3 -0
  14. data/lib/sorbet-rails/deprecation.rb +1 -0
  15. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +8 -0
  16. data/lib/sorbet-rails/helper_rbi_formatter.rb +1 -1
  17. data/lib/sorbet-rails/job_rbi_formatter.rb +75 -62
  18. data/lib/sorbet-rails/mailer_rbi_formatter.rb +40 -27
  19. data/lib/sorbet-rails/model_column_utils.rb +129 -0
  20. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +40 -1
  21. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +12 -112
  22. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +2 -2
  23. data/lib/sorbet-rails/model_plugins/active_record_serialized_attribute.rb +68 -0
  24. data/lib/sorbet-rails/model_plugins/base.rb +6 -8
  25. data/lib/sorbet-rails/model_plugins/plugins.rb +3 -0
  26. data/lib/sorbet-rails/model_rbi_formatter.rb +3 -3
  27. data/lib/sorbet-rails/model_utils.rb +5 -2
  28. data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
  29. data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +54 -7
  30. data/lib/sorbet-rails/railtie.rb +0 -2
  31. data/lib/sorbet-rails/routes_rbi_formatter.rb +6 -2
  32. data/lib/sorbet-rails/sorbet_utils.rb +152 -150
  33. data/lib/sorbet-rails/tasks/rails_rbi.rake +9 -8
  34. data/sorbet-rails.gemspec +2 -2
  35. data/spec/bin/run_spec.sh +1 -1
  36. data/spec/generators/rails-template.rb +16 -0
  37. data/spec/generators/sorbet_test_cases.rb +29 -57
  38. data/spec/job_rbi_formatter_spec.rb +1 -1
  39. data/spec/pluck_to_tstruct_spec.rb +115 -16
  40. data/spec/rails_helper.rb +2 -2
  41. data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
  42. data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
  43. data/spec/sorbet_spec.rb +5 -5
  44. data/spec/support/v5.0/Gemfile +1 -1
  45. data/spec/support/v5.0/Gemfile.lock +15 -14
  46. data/spec/support/v5.0/app/controllers/application_controller.rb +1 -1
  47. data/spec/support/v5.0/app/models/headmaster.rb +1 -1
  48. data/spec/support/v5.0/app/models/potion.rb +1 -1
  49. data/spec/support/v5.0/app/models/robe.rb +1 -1
  50. data/spec/support/v5.0/app/models/school.rb +1 -1
  51. data/spec/support/v5.0/app/models/spell.rb +1 -1
  52. data/spec/support/v5.0/app/models/subject.rb +1 -1
  53. data/spec/support/v5.0/app/models/wizard.rb +5 -0
  54. data/spec/support/v5.0/config/environments/development.rb +1 -1
  55. data/spec/support/v5.0/config/environments/production.rb +1 -1
  56. data/spec/support/v5.0/config/environments/test.rb +1 -1
  57. data/spec/support/v5.0/config/initializers/wrap_parameters.rb +1 -1
  58. data/spec/support/v5.0/config/routes.rb +1 -1
  59. data/spec/support/v5.0/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  60. data/spec/support/v5.0/db/schema.rb +8 -4
  61. data/spec/support/v5.0/sorbet_test_cases.rb +29 -57
  62. data/spec/support/v5.1/Gemfile.lock +13 -12
  63. data/spec/support/v5.1/app/controllers/application_controller.rb +1 -1
  64. data/spec/support/v5.1/app/models/headmaster.rb +1 -1
  65. data/spec/support/v5.1/app/models/school.rb +1 -1
  66. data/spec/support/v5.1/app/models/wizard.rb +5 -0
  67. data/spec/support/v5.1/config/environments/production.rb +1 -1
  68. data/spec/support/v5.1/config/initializers/wrap_parameters.rb +1 -1
  69. data/spec/support/v5.1/config/routes.rb +1 -1
  70. data/spec/support/v5.1/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  71. data/spec/support/v5.1/db/schema.rb +5 -1
  72. data/spec/support/v5.1/sorbet_test_cases.rb +29 -57
  73. data/spec/support/v5.2/Gemfile +1 -1
  74. data/spec/support/v5.2/Gemfile.lock +15 -14
  75. data/spec/support/v5.2/app/models/headmaster.rb +1 -1
  76. data/spec/support/v5.2/app/models/school.rb +1 -1
  77. data/spec/support/v5.2/app/models/wizard.rb +5 -0
  78. data/spec/support/v5.2/config/environments/development.rb +1 -1
  79. data/spec/support/v5.2/config/environments/production.rb +1 -1
  80. data/spec/support/v5.2/config/environments/test.rb +1 -1
  81. data/spec/support/v5.2/config/initializers/wrap_parameters.rb +1 -1
  82. data/spec/support/v5.2/config/routes.rb +1 -1
  83. data/spec/support/v5.2/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  84. data/spec/support/v5.2/db/schema.rb +5 -1
  85. data/spec/support/v5.2/sorbet_test_cases.rb +29 -57
  86. data/spec/support/v6.0/.gitignore +6 -0
  87. data/spec/support/v6.0/Gemfile +3 -3
  88. data/spec/support/v6.0/Gemfile.lock +82 -80
  89. data/spec/support/v6.0/app/models/wizard.rb +5 -0
  90. data/spec/support/v6.0/bin/bundle +22 -13
  91. data/spec/support/v6.0/config/environments/development.rb +1 -1
  92. data/spec/support/v6.0/config/environments/production.rb +1 -1
  93. data/spec/support/v6.0/config/environments/test.rb +2 -2
  94. data/spec/support/v6.0/config/routes.rb +1 -1
  95. data/spec/support/v6.0/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  96. data/spec/support/v6.0/db/schema.rb +5 -1
  97. data/spec/support/v6.0/sorbet_test_cases.rb +29 -57
  98. data/spec/support/v6.0/tmp/pids/.keep +0 -0
  99. data/spec/test_data/v5.0/expected_application_job.rbi +2 -2
  100. data/spec/test_data/v5.0/expected_award_house_point_hourglasses.rbi +2 -2
  101. data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
  102. data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
  103. data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  104. data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  105. data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  106. data/spec/test_data/v5.0/expected_headmaster.rbi +26 -2
  107. data/spec/test_data/v5.0/expected_internal_metadata.rbi +2 -2
  108. data/spec/test_data/v5.0/expected_potion.rbi +14 -2
  109. data/spec/test_data/v5.0/expected_robe.rbi +14 -2
  110. data/spec/test_data/v5.0/expected_routes.rbi +4 -0
  111. data/spec/test_data/v5.0/expected_schema_migration.rbi +2 -2
  112. data/spec/test_data/v5.0/expected_school.rbi +14 -2
  113. data/spec/test_data/v5.0/expected_spell.rbi +2 -2
  114. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +26 -2
  115. data/spec/test_data/v5.0/expected_spell_book.rbi +23 -11
  116. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +26 -2
  117. data/spec/test_data/v5.0/expected_squib.rbi +65 -2
  118. data/spec/test_data/v5.0/expected_subject.rbi +2 -2
  119. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +26 -2
  120. data/spec/test_data/v5.0/expected_wand.rbi +24 -12
  121. data/spec/test_data/v5.0/expected_wizard.rbi +123 -60
  122. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +26 -2
  123. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +123 -60
  124. data/spec/test_data/v5.1/expected_application_job.rbi +2 -2
  125. data/spec/test_data/v5.1/expected_award_house_point_hourglasses.rbi +2 -2
  126. data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
  127. data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
  128. data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
  129. data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
  130. data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  131. data/spec/test_data/v5.1/expected_headmaster.rbi +26 -2
  132. data/spec/test_data/v5.1/expected_internal_metadata.rbi +2 -2
  133. data/spec/test_data/v5.1/expected_potion.rbi +14 -2
  134. data/spec/test_data/v5.1/expected_robe.rbi +14 -2
  135. data/spec/test_data/v5.1/expected_routes.rbi +4 -0
  136. data/spec/test_data/v5.1/expected_schema_migration.rbi +2 -2
  137. data/spec/test_data/v5.1/expected_school.rbi +14 -2
  138. data/spec/test_data/v5.1/expected_spell.rbi +2 -2
  139. data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +26 -2
  140. data/spec/test_data/v5.1/expected_spell_book.rbi +23 -11
  141. data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +26 -2
  142. data/spec/test_data/v5.1/expected_squib.rbi +65 -2
  143. data/spec/test_data/v5.1/expected_subject.rbi +2 -2
  144. data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +26 -2
  145. data/spec/test_data/v5.1/expected_wand.rbi +24 -12
  146. data/spec/test_data/v5.1/expected_wizard.rbi +123 -60
  147. data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +26 -2
  148. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +123 -60
  149. data/spec/test_data/v5.2/expected_application_job.rbi +2 -2
  150. data/spec/test_data/v5.2/expected_attachment.rbi +26 -2
  151. data/spec/test_data/v5.2/expected_award_house_point_hourglasses.rbi +2 -2
  152. data/spec/test_data/v5.2/expected_blob.rbi +27 -3
  153. data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
  154. data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
  155. data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
  156. data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
  157. data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  158. data/spec/test_data/v5.2/expected_headmaster.rbi +26 -2
  159. data/spec/test_data/v5.2/expected_internal_metadata.rbi +2 -2
  160. data/spec/test_data/v5.2/expected_potion.rbi +14 -2
  161. data/spec/test_data/v5.2/expected_robe.rbi +14 -2
  162. data/spec/test_data/v5.2/expected_routes.rbi +4 -0
  163. data/spec/test_data/v5.2/expected_schema_migration.rbi +2 -2
  164. data/spec/test_data/v5.2/expected_school.rbi +14 -2
  165. data/spec/test_data/v5.2/expected_spell.rbi +2 -2
  166. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +26 -2
  167. data/spec/test_data/v5.2/expected_spell_book.rbi +23 -11
  168. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +26 -2
  169. data/spec/test_data/v5.2/expected_squib.rbi +91 -4
  170. data/spec/test_data/v5.2/expected_subject.rbi +2 -2
  171. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +26 -2
  172. data/spec/test_data/v5.2/expected_wand.rbi +24 -12
  173. data/spec/test_data/v5.2/expected_wizard.rbi +149 -62
  174. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +26 -2
  175. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +149 -62
  176. data/spec/test_data/v6.0/expected_application_job.rbi +2 -2
  177. data/spec/test_data/v6.0/expected_attachment.rbi +26 -2
  178. data/spec/test_data/v6.0/expected_award_house_point_hourglasses.rbi +2 -2
  179. data/spec/test_data/v6.0/expected_blob.rbi +27 -3
  180. data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
  181. data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
  182. data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  183. data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  184. data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  185. data/spec/test_data/v6.0/expected_headmaster.rbi +26 -2
  186. data/spec/test_data/v6.0/expected_internal_metadata.rbi +2 -2
  187. data/spec/test_data/v6.0/expected_potion.rbi +14 -2
  188. data/spec/test_data/v6.0/expected_robe.rbi +14 -2
  189. data/spec/test_data/v6.0/expected_routes.rbi +4 -0
  190. data/spec/test_data/v6.0/expected_schema_migration.rbi +2 -2
  191. data/spec/test_data/v6.0/expected_school.rbi +14 -2
  192. data/spec/test_data/v6.0/expected_spell.rbi +2 -2
  193. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +26 -2
  194. data/spec/test_data/v6.0/expected_spell_book.rbi +23 -11
  195. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +26 -2
  196. data/spec/test_data/v6.0/expected_squib.rbi +91 -4
  197. data/spec/test_data/v6.0/expected_subject.rbi +2 -2
  198. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +26 -2
  199. data/spec/test_data/v6.0/expected_wand.rbi +24 -12
  200. data/spec/test_data/v6.0/expected_wizard.rbi +149 -62
  201. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +26 -2
  202. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +149 -62
  203. data/spec/tstruct_comparable.rb +13 -0
  204. metadata +61 -15
  205. data/lib/bundled_rbi/parameters.rbi +0 -28
  206. data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -42
  207. data/lib/sorbet-rails/custom_types/integer_string.rb +0 -45
  208. data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -57
  209. data/spec/boolean_string_spec.rb +0 -59
  210. data/spec/custom_params_methods_spec.rb +0 -138
  211. data/spec/integer_string_spec.rb +0 -46
File without changes
@@ -2,10 +2,10 @@
2
2
  # This is an autogenerated file for Rails' jobs.
3
3
  # Please rerun bundle exec rake rails_rbi:jobs to regenerate.
4
4
  class ApplicationJob
5
- sig { params(_: T.untyped).void }
5
+ sig { params(_: T.untyped).returns(ApplicationJob) }
6
6
  def self.perform_later(*_); end
7
7
 
8
- sig { params(_: T.untyped).void }
8
+ sig { params(_: T.untyped).returns(ApplicationJob) }
9
9
  def self.perform_now(*_); end
10
10
 
11
11
  sig do
@@ -2,10 +2,10 @@
2
2
  # This is an autogenerated file for Rails' jobs.
3
3
  # Please rerun bundle exec rake rails_rbi:jobs to regenerate.
4
4
  class AwardHousePointHourglasses
5
- sig { params(student: Wizard, point: Integer).void }
5
+ sig { params(student: Wizard, point: Integer).returns(AwardHousePointHourglasses) }
6
6
  def self.perform_later(student:, point:); end
7
7
 
8
- sig { params(student: Wizard, point: Integer).void }
8
+ sig { params(student: Wizard, point: Integer).returns(AwardHousePointHourglasses) }
9
9
  def self.perform_now(student:, point:); end
10
10
 
11
11
  sig do
@@ -0,0 +1,21 @@
1
+ # typed: strong
2
+ # == Custom Generator ==
3
+ # This is an autogenerated file for Rails' jobs.
4
+ # Please rerun bundle exec rake rails_rbi:jobs to regenerate.
5
+ class ApplicationJob
6
+ sig { params(_: T.untyped).returns(ApplicationJob) }
7
+ def self.perform_later(*_); end
8
+
9
+ sig { params(_: T.untyped).returns(ApplicationJob) }
10
+ def self.perform_now(*_); end
11
+
12
+ sig do
13
+ params(
14
+ wait: T.nilable(ActiveSupport::Duration),
15
+ wait_until: T.nilable(T.any(ActiveSupport::TimeWithZone, Date, Time)),
16
+ queue: T.nilable(T.any(String, Symbol)),
17
+ priority: T.nilable(Integer)
18
+ ).returns(T.self_type)
19
+ end
20
+ def self.set(wait: nil, wait_until: nil, queue: nil, priority: nil); end
21
+ end
@@ -0,0 +1,6 @@
1
+ # typed: strong
2
+ # == Custom Generator ==
3
+ # This is an autogenerated file for Rails' mailers.
4
+ # Please rerun bundle exec rake rails_rbi:mailers to regenerate.
5
+ class ApplicationMailer
6
+ end
@@ -0,0 +1,21 @@
1
+ # typed: strong
2
+ # == Custom Generator ==
3
+ # This is an autogenerated file for Rails' jobs.
4
+ # Please rerun bundle exec rake rails_rbi:jobs to regenerate.
5
+ class AwardHousePointHourglasses
6
+ sig { params(student: Wizard, point: Integer).returns(AwardHousePointHourglasses) }
7
+ def self.perform_later(student:, point:); end
8
+
9
+ sig { params(student: Wizard, point: Integer).returns(AwardHousePointHourglasses) }
10
+ def self.perform_now(student:, point:); end
11
+
12
+ sig do
13
+ params(
14
+ wait: T.nilable(ActiveSupport::Duration),
15
+ wait_until: T.nilable(T.any(ActiveSupport::TimeWithZone, Date, Time)),
16
+ queue: T.nilable(T.any(String, Symbol)),
17
+ priority: T.nilable(Integer)
18
+ ).returns(T.self_type)
19
+ end
20
+ def self.set(wait: nil, wait_until: nil, queue: nil, priority: nil); end
21
+ end
@@ -0,0 +1,8 @@
1
+ # typed: strong
2
+ # == Custom Generator ==
3
+ # This is an autogenerated file for Rails' mailers.
4
+ # Please rerun bundle exec rake rails_rbi:mailers to regenerate.
5
+ class DailyProphetMailer
6
+ sig { params(wizards: T::Array[Wizard], hotnews_only: T::Boolean).returns(ActionMailer::MessageDelivery) }
7
+ def self.notify_subscribers(wizards:, hotnews_only:); end
8
+ end
@@ -0,0 +1,21 @@
1
+ # typed: strong
2
+ # == Custom Generator ==
3
+ # This is an autogenerated file for Rails' mailers.
4
+ # Please rerun bundle exec rake rails_rbi:mailers to regenerate.
5
+ class HogwartsAcceptanceMailer
6
+ sig { params(student: Wizard).returns(ActionMailer::MessageDelivery) }
7
+ def self.notify(student); end
8
+
9
+ sig { params(student: T.untyped).returns(ActionMailer::MessageDelivery) }
10
+ def self.notify_retry(student); end
11
+
12
+ sig do
13
+ params(
14
+ teacher: Wizard,
15
+ note: String,
16
+ student: Wizard,
17
+ special: T::Boolean
18
+ ).returns(ActionMailer::MessageDelivery)
19
+ end
20
+ def self.notify_teacher(teacher, note = nil, student:, special: false); end
21
+ end
@@ -40,14 +40,38 @@ module Headmaster::GeneratedAssociationMethods
40
40
  sig { returns(::School) }
41
41
  def school; end
42
42
 
43
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
44
+ def build_school(*args, &block); end
45
+
46
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
47
+ def create_school(*args, &block); end
48
+
49
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
50
+ def create_school!(*args, &block); end
51
+
43
52
  sig { params(value: ::School).void }
44
53
  def school=(value); end
45
54
 
55
+ sig { returns(::School) }
56
+ def reload_school; end
57
+
46
58
  sig { returns(::Wizard) }
47
59
  def wizard; end
48
60
 
61
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
62
+ def build_wizard(*args, &block); end
63
+
64
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
65
+ def create_wizard(*args, &block); end
66
+
67
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
68
+ def create_wizard!(*args, &block); end
69
+
49
70
  sig { params(value: ::Wizard).void }
50
71
  def wizard=(value); end
72
+
73
+ sig { returns(::Wizard) }
74
+ def reload_wizard; end
51
75
  end
52
76
 
53
77
  module Headmaster::CustomFinderMethods
@@ -168,7 +192,7 @@ module Headmaster::QueryMethodsReturningRelation
168
192
  load: T.nilable(T::Boolean),
169
193
  error_on_ignore: T.nilable(T::Boolean),
170
194
  block: T.nilable(T.proc.params(e: Headmaster::ActiveRecord_Relation).void)
171
- ).returns(T::Enumerable[Headmaster::ActiveRecord_Relation])
195
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
172
196
  end
173
197
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
174
198
  end
@@ -266,7 +290,7 @@ module Headmaster::QueryMethodsReturningAssociationRelation
266
290
  load: T.nilable(T::Boolean),
267
291
  error_on_ignore: T.nilable(T::Boolean),
268
292
  block: T.nilable(T.proc.params(e: Headmaster::ActiveRecord_AssociationRelation).void)
269
- ).returns(T::Enumerable[Headmaster::ActiveRecord_AssociationRelation])
293
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
270
294
  end
271
295
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
272
296
  end
@@ -162,7 +162,7 @@ module ActiveRecord::InternalMetadata::QueryMethodsReturningRelation
162
162
  load: T.nilable(T::Boolean),
163
163
  error_on_ignore: T.nilable(T::Boolean),
164
164
  block: T.nilable(T.proc.params(e: ActiveRecord::InternalMetadata::ActiveRecord_Relation).void)
165
- ).returns(T::Enumerable[ActiveRecord::InternalMetadata::ActiveRecord_Relation])
165
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
166
166
  end
167
167
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
168
168
  end
@@ -260,7 +260,7 @@ module ActiveRecord::InternalMetadata::QueryMethodsReturningAssociationRelation
260
260
  load: T.nilable(T::Boolean),
261
261
  error_on_ignore: T.nilable(T::Boolean),
262
262
  block: T.nilable(T.proc.params(e: ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation).void)
263
- ).returns(T::Enumerable[ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation])
263
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
264
264
  end
265
265
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
266
266
  end
@@ -11,8 +11,20 @@ module Potion::GeneratedAssociationMethods
11
11
  sig { returns(T.nilable(::Wizard)) }
12
12
  def wizard; end
13
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
+
14
23
  sig { params(value: T.nilable(::Wizard)).void }
15
24
  def wizard=(value); end
25
+
26
+ sig { returns(T.nilable(::Wizard)) }
27
+ def reload_wizard; end
16
28
  end
17
29
 
18
30
  module Potion::CustomFinderMethods
@@ -132,7 +144,7 @@ module Potion::QueryMethodsReturningRelation
132
144
  load: T.nilable(T::Boolean),
133
145
  error_on_ignore: T.nilable(T::Boolean),
134
146
  block: T.nilable(T.proc.params(e: Potion::ActiveRecord_Relation).void)
135
- ).returns(T::Enumerable[Potion::ActiveRecord_Relation])
147
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
136
148
  end
137
149
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
138
150
  end
@@ -230,7 +242,7 @@ module Potion::QueryMethodsReturningAssociationRelation
230
242
  load: T.nilable(T::Boolean),
231
243
  error_on_ignore: T.nilable(T::Boolean),
232
244
  block: T.nilable(T.proc.params(e: Potion::ActiveRecord_AssociationRelation).void)
233
- ).returns(T::Enumerable[Potion::ActiveRecord_AssociationRelation])
245
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
234
246
  end
235
247
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
236
248
  end
@@ -31,8 +31,20 @@ module Robe::GeneratedAssociationMethods
31
31
  sig { returns(T.nilable(::Wizard)) }
32
32
  def wizard; end
33
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
35
+ def build_wizard(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
38
+ def create_wizard(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
41
+ def create_wizard!(*args, &block); end
42
+
34
43
  sig { params(value: T.nilable(::Wizard)).void }
35
44
  def wizard=(value); end
45
+
46
+ sig { returns(T.nilable(::Wizard)) }
47
+ def reload_wizard; end
36
48
  end
37
49
 
38
50
  module Robe::CustomFinderMethods
@@ -153,7 +165,7 @@ module Robe::QueryMethodsReturningRelation
153
165
  load: T.nilable(T::Boolean),
154
166
  error_on_ignore: T.nilable(T::Boolean),
155
167
  block: T.nilable(T.proc.params(e: Robe::ActiveRecord_Relation).void)
156
- ).returns(T::Enumerable[Robe::ActiveRecord_Relation])
168
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
157
169
  end
158
170
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
159
171
  end
@@ -251,7 +263,7 @@ module Robe::QueryMethodsReturningAssociationRelation
251
263
  load: T.nilable(T::Boolean),
252
264
  error_on_ignore: T.nilable(T::Boolean),
253
265
  block: T.nilable(T.proc.params(e: Robe::ActiveRecord_AssociationRelation).void)
254
- ).returns(T::Enumerable[Robe::ActiveRecord_AssociationRelation])
266
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
255
267
  end
256
268
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
257
269
  end
@@ -5,6 +5,10 @@ class ActionController::Base
5
5
  include GeneratedUrlHelpers
6
6
  end
7
7
 
8
+ class ActionController::API
9
+ include GeneratedUrlHelpers
10
+ end
11
+
8
12
  module ActionView::Helpers
9
13
  include GeneratedUrlHelpers
10
14
  end
@@ -135,7 +135,7 @@ module ActiveRecord::SchemaMigration::QueryMethodsReturningRelation
135
135
  load: T.nilable(T::Boolean),
136
136
  error_on_ignore: T.nilable(T::Boolean),
137
137
  block: T.nilable(T.proc.params(e: ActiveRecord::SchemaMigration::ActiveRecord_Relation).void)
138
- ).returns(T::Enumerable[ActiveRecord::SchemaMigration::ActiveRecord_Relation])
138
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
139
139
  end
140
140
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
141
141
  end
@@ -233,7 +233,7 @@ module ActiveRecord::SchemaMigration::QueryMethodsReturningAssociationRelation
233
233
  load: T.nilable(T::Boolean),
234
234
  error_on_ignore: T.nilable(T::Boolean),
235
235
  block: T.nilable(T.proc.params(e: ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation).void)
236
- ).returns(T::Enumerable[ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation])
236
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
237
237
  end
238
238
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
239
239
  end
@@ -31,8 +31,20 @@ module School::GeneratedAssociationMethods
31
31
  sig { returns(::Headmaster) }
32
32
  def headmaster; end
33
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) }
35
+ def build_headmaster(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) }
38
+ def create_headmaster(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) }
41
+ def create_headmaster!(*args, &block); end
42
+
34
43
  sig { params(value: ::Headmaster).void }
35
44
  def headmaster=(value); end
45
+
46
+ sig { returns(::Headmaster) }
47
+ def reload_headmaster; end
36
48
  end
37
49
 
38
50
  module School::CustomFinderMethods
@@ -153,7 +165,7 @@ module School::QueryMethodsReturningRelation
153
165
  load: T.nilable(T::Boolean),
154
166
  error_on_ignore: T.nilable(T::Boolean),
155
167
  block: T.nilable(T.proc.params(e: School::ActiveRecord_Relation).void)
156
- ).returns(T::Enumerable[School::ActiveRecord_Relation])
168
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
157
169
  end
158
170
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
159
171
  end
@@ -251,7 +263,7 @@ module School::QueryMethodsReturningAssociationRelation
251
263
  load: T.nilable(T::Boolean),
252
264
  error_on_ignore: T.nilable(T::Boolean),
253
265
  block: T.nilable(T.proc.params(e: School::ActiveRecord_AssociationRelation).void)
254
- ).returns(T::Enumerable[School::ActiveRecord_AssociationRelation])
266
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
255
267
  end
256
268
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
257
269
  end
@@ -156,7 +156,7 @@ module Spell::QueryMethodsReturningRelation
156
156
  load: T.nilable(T::Boolean),
157
157
  error_on_ignore: T.nilable(T::Boolean),
158
158
  block: T.nilable(T.proc.params(e: Spell::ActiveRecord_Relation).void)
159
- ).returns(T::Enumerable[Spell::ActiveRecord_Relation])
159
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
160
160
  end
161
161
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
162
162
  end
@@ -254,7 +254,7 @@ module Spell::QueryMethodsReturningAssociationRelation
254
254
  load: T.nilable(T::Boolean),
255
255
  error_on_ignore: T.nilable(T::Boolean),
256
256
  block: T.nilable(T.proc.params(e: Spell::ActiveRecord_AssociationRelation).void)
257
- ).returns(T::Enumerable[Spell::ActiveRecord_AssociationRelation])
257
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
258
258
  end
259
259
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
260
260
  end
@@ -31,14 +31,38 @@ module Spell::HABTM_SpellBooks::GeneratedAssociationMethods
31
31
  sig { returns(T.nilable(::Spell)) }
32
32
  def left_side; end
33
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
35
+ def build_left_side(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
38
+ def create_left_side(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
41
+ def create_left_side!(*args, &block); end
42
+
34
43
  sig { params(value: T.nilable(::Spell)).void }
35
44
  def left_side=(value); end
36
45
 
46
+ sig { returns(T.nilable(::Spell)) }
47
+ def reload_left_side; end
48
+
37
49
  sig { returns(::SpellBook) }
38
50
  def spell_book; end
39
51
 
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
53
+ def build_spell_book(*args, &block); end
54
+
55
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
56
+ def create_spell_book(*args, &block); end
57
+
58
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
59
+ def create_spell_book!(*args, &block); end
60
+
40
61
  sig { params(value: ::SpellBook).void }
41
62
  def spell_book=(value); end
63
+
64
+ sig { returns(::SpellBook) }
65
+ def reload_spell_book; end
42
66
  end
43
67
 
44
68
  module Spell::HABTM_SpellBooks::CustomFinderMethods
@@ -159,7 +183,7 @@ module Spell::HABTM_SpellBooks::QueryMethodsReturningRelation
159
183
  load: T.nilable(T::Boolean),
160
184
  error_on_ignore: T.nilable(T::Boolean),
161
185
  block: T.nilable(T.proc.params(e: Spell::HABTM_SpellBooks::ActiveRecord_Relation).void)
162
- ).returns(T::Enumerable[Spell::HABTM_SpellBooks::ActiveRecord_Relation])
186
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
163
187
  end
164
188
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
165
189
  end
@@ -257,7 +281,7 @@ module Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
257
281
  load: T.nilable(T::Boolean),
258
282
  error_on_ignore: T.nilable(T::Boolean),
259
283
  block: T.nilable(T.proc.params(e: Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation).void)
260
- ).returns(T::Enumerable[Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation])
284
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
261
285
  end
262
286
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
263
287
  end
@@ -65,15 +65,6 @@ module SpellBook::GeneratedAttributeMethods
65
65
  def wizard_id?; end
66
66
  end
67
67
 
68
- class SpellBook::BookType < T::Enum
69
- enums do
70
- Unclassified = new(%q{unclassified})
71
- Biology = new(%q{biology})
72
- DarkArt = new(%q{dark_art})
73
- end
74
-
75
- end
76
-
77
68
  module SpellBook::GeneratedAssociationMethods
78
69
  sig { returns(::Spell::ActiveRecord_Associations_CollectionProxy) }
79
70
  def spells; end
@@ -87,8 +78,20 @@ module SpellBook::GeneratedAssociationMethods
87
78
  sig { returns(::Wizard) }
88
79
  def wizard; end
89
80
 
81
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
82
+ def build_wizard(*args, &block); end
83
+
84
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
85
+ def create_wizard(*args, &block); end
86
+
87
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
88
+ def create_wizard!(*args, &block); end
89
+
90
90
  sig { params(value: ::Wizard).void }
91
91
  def wizard=(value); end
92
+
93
+ sig { returns(::Wizard) }
94
+ def reload_wizard; end
92
95
  end
93
96
 
94
97
  module SpellBook::CustomFinderMethods
@@ -136,6 +139,15 @@ class SpellBook < ApplicationRecord
136
139
 
137
140
  sig { params(value: SpellBook::BookType).void }
138
141
  def typed_book_type=(value); end
142
+
143
+ class BookType < T::Enum
144
+ enums do
145
+ Unclassified = new(%q{unclassified})
146
+ Biology = new(%q{biology})
147
+ DarkArt = new(%q{dark_art})
148
+ end
149
+
150
+ end
139
151
  end
140
152
 
141
153
  class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
@@ -299,7 +311,7 @@ module SpellBook::QueryMethodsReturningRelation
299
311
  load: T.nilable(T::Boolean),
300
312
  error_on_ignore: T.nilable(T::Boolean),
301
313
  block: T.nilable(T.proc.params(e: SpellBook::ActiveRecord_Relation).void)
302
- ).returns(T::Enumerable[SpellBook::ActiveRecord_Relation])
314
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
303
315
  end
304
316
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
305
317
  end
@@ -397,7 +409,7 @@ module SpellBook::QueryMethodsReturningAssociationRelation
397
409
  load: T.nilable(T::Boolean),
398
410
  error_on_ignore: T.nilable(T::Boolean),
399
411
  block: T.nilable(T.proc.params(e: SpellBook::ActiveRecord_AssociationRelation).void)
400
- ).returns(T::Enumerable[SpellBook::ActiveRecord_AssociationRelation])
412
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
401
413
  end
402
414
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
403
415
  end