sorbet-rails 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CONTRIBUTING.md +2 -2
  4. data/README.md +22 -1
  5. data/lib/sorbet-rails/actionmailer.rbi +7 -0
  6. data/lib/sorbet-rails/activerecord.rbi +3 -0
  7. data/lib/sorbet-rails/config.rb +5 -0
  8. data/lib/sorbet-rails/helper_rbi_formatter.rb +3 -0
  9. data/lib/sorbet-rails/mailer_rbi_formatter.rb +38 -0
  10. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +26 -6
  11. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +4 -5
  12. data/lib/sorbet-rails/model_plugins/active_record_enum.rb +37 -3
  13. data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +2 -0
  14. data/lib/sorbet-rails/model_plugins/active_record_overrides.rb +27 -0
  15. data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +60 -0
  16. data/lib/sorbet-rails/model_plugins/plugins.rb +4 -0
  17. data/lib/sorbet-rails/sorbet_utils.rb +68 -0
  18. data/lib/sorbet-rails/tasks/rails_rbi.rake +20 -0
  19. data/lib/sorbet-rails/utils.rb +5 -0
  20. data/sorbet-rails.gemspec +1 -1
  21. data/spec/generators/rails-template.rb +145 -16
  22. data/spec/generators/sorbet_test_cases.rb +11 -0
  23. data/spec/helper_rbi_formatter_spec.rb +19 -0
  24. data/spec/mailer_rbi_formatter_spec.rb +13 -0
  25. data/spec/model_rbi_formatter_spec.rb +12 -2
  26. data/spec/rails_helper.rb +20 -0
  27. data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
  28. data/spec/rake_rails_rbi_models_spec.rb +1 -21
  29. data/spec/sorbet_spec.rb +13 -0
  30. data/spec/sorbet_utils_spec.rb +126 -0
  31. data/spec/support/v4.2/Gemfile.lock +5 -5
  32. data/spec/support/v4.2/app/mailers/application_mailer.rb +3 -0
  33. data/spec/support/v4.2/app/mailers/daily_prophet_mailer.rb +9 -0
  34. data/spec/support/v4.2/app/mailers/hogwarts_acceptance_mailer.rb +13 -0
  35. data/spec/support/v4.2/app/models/wizard.rb +14 -0
  36. data/spec/support/v4.2/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
  37. data/spec/support/v4.2/db/schema.rb +2 -1
  38. data/spec/support/v4.2/sorbet_test_cases.rb +11 -0
  39. data/spec/support/v5.0/Gemfile.lock +6 -6
  40. data/spec/support/v5.0/app/mailers/daily_prophet_mailer.rb +9 -0
  41. data/spec/support/v5.0/app/mailers/hogwarts_acceptance_mailer.rb +13 -0
  42. data/spec/support/v5.0/app/models/wizard.rb +33 -0
  43. data/spec/support/v5.0/config/initializers/new_framework_defaults.rb +1 -1
  44. data/spec/support/v5.0/db/migrate/20190620000001_create_wizards.rb +1 -1
  45. data/spec/support/v5.0/db/migrate/20190620000002_create_wands.rb +1 -1
  46. data/spec/support/v5.0/db/migrate/20190620000003_create_spell_books.rb +1 -1
  47. data/spec/support/v5.0/db/migrate/20190620000004_add_more_column_types_to_wands.rb +1 -1
  48. data/spec/support/v5.0/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
  49. data/spec/support/v5.0/db/migrate/20190620000006_add_more_enums_to_wizard.rb +9 -0
  50. data/spec/support/v5.0/db/schema.rb +9 -4
  51. data/spec/support/v5.0/sorbet_test_cases.rb +11 -0
  52. data/spec/support/v5.1/Gemfile.lock +6 -6
  53. data/spec/support/v5.1/app/mailers/daily_prophet_mailer.rb +9 -0
  54. data/spec/support/v5.1/app/mailers/hogwarts_acceptance_mailer.rb +13 -0
  55. data/spec/support/v5.1/app/models/wizard.rb +33 -0
  56. data/spec/support/v5.1/db/migrate/20190620000001_create_wizards.rb +1 -1
  57. data/spec/support/v5.1/db/migrate/20190620000002_create_wands.rb +1 -1
  58. data/spec/support/v5.1/db/migrate/20190620000003_create_spell_books.rb +1 -1
  59. data/spec/support/v5.1/db/migrate/20190620000004_add_more_column_types_to_wands.rb +1 -1
  60. data/spec/support/v5.1/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
  61. data/spec/support/v5.1/db/migrate/20190620000006_add_more_enums_to_wizard.rb +9 -0
  62. data/spec/support/v5.1/db/schema.rb +7 -2
  63. data/spec/support/v5.1/sorbet_test_cases.rb +11 -0
  64. data/spec/support/v5.2/Gemfile.lock +6 -6
  65. data/spec/support/v5.2/app/mailers/daily_prophet_mailer.rb +9 -0
  66. data/spec/support/v5.2/app/mailers/hogwarts_acceptance_mailer.rb +13 -0
  67. data/spec/support/v5.2/app/models/wizard.rb +34 -0
  68. data/spec/support/v5.2/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
  69. data/spec/support/v5.2/db/migrate/20190620000006_add_more_enums_to_wizard.rb +9 -0
  70. data/spec/support/v5.2/db/schema.rb +7 -2
  71. data/spec/support/v5.2/sorbet_test_cases.rb +11 -0
  72. data/spec/support/v6.0/Gemfile.lock +6 -6
  73. data/spec/support/v6.0/app/mailers/daily_prophet_mailer.rb +9 -0
  74. data/spec/support/v6.0/app/mailers/hogwarts_acceptance_mailer.rb +13 -0
  75. data/spec/support/v6.0/app/models/wizard.rb +35 -1
  76. data/spec/support/v6.0/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
  77. data/spec/support/v6.0/db/migrate/20190620000006_add_more_enums_to_wizard.rb +9 -0
  78. data/spec/support/v6.0/db/schema.rb +6 -1
  79. data/spec/support/v6.0/sorbet_test_cases.rb +11 -0
  80. data/spec/test_data/v4.2/expected_application_mailer.rbi +5 -0
  81. data/spec/test_data/v4.2/expected_daily_prophet_mailer.rbi +7 -0
  82. data/spec/test_data/v4.2/expected_helpers_with_application_and_devise_helpers.rbi +29 -0
  83. data/spec/test_data/v4.2/expected_hogwarts_acceptance_mailer.rbi +10 -0
  84. data/spec/test_data/v4.2/expected_srb_tc_output.txt +57 -1
  85. data/spec/test_data/v4.2/expected_wizard.rbi +69 -0
  86. data/spec/test_data/v4.2/expected_wizard_wo_spellbook.rbi +69 -0
  87. data/spec/test_data/v5.0/expected_application_mailer.rbi +5 -0
  88. data/spec/test_data/v5.0/expected_daily_prophet_mailer.rbi +7 -0
  89. data/spec/test_data/v5.0/expected_helpers_with_application_and_devise_helpers.rbi +29 -0
  90. data/spec/test_data/v5.0/expected_hogwarts_acceptance_mailer.rbi +10 -0
  91. data/spec/test_data/v5.0/expected_spell_book.rbi +2 -2
  92. data/spec/test_data/v5.0/expected_wizard.rbi +294 -0
  93. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +294 -0
  94. data/spec/test_data/v5.1/expected_application_mailer.rbi +5 -0
  95. data/spec/test_data/v5.1/expected_daily_prophet_mailer.rbi +7 -0
  96. data/spec/test_data/v5.1/expected_helpers_with_application_and_devise_helpers.rbi +29 -0
  97. data/spec/test_data/v5.1/expected_hogwarts_acceptance_mailer.rbi +10 -0
  98. data/spec/test_data/v5.1/expected_spell_book.rbi +2 -2
  99. data/spec/test_data/v5.1/expected_wizard.rbi +294 -0
  100. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +294 -0
  101. data/spec/test_data/v5.2-no-sorbet/expected_helpers_with_application_and_devise_helpers.rbi +29 -0
  102. data/spec/test_data/v5.2/expected_application_mailer.rbi +5 -0
  103. data/spec/test_data/v5.2/expected_attachment.rbi +4 -4
  104. data/spec/test_data/v5.2/expected_daily_prophet_mailer.rbi +7 -0
  105. data/spec/test_data/v5.2/expected_helpers_with_application_and_devise_helpers.rbi +29 -0
  106. data/spec/test_data/v5.2/expected_hogwarts_acceptance_mailer.rbi +10 -0
  107. data/spec/test_data/v5.2/expected_spell_book.rbi +2 -2
  108. data/spec/test_data/v5.2/expected_wizard.rbi +342 -0
  109. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +342 -0
  110. data/spec/test_data/v6.0/expected_application_mailer.rbi +5 -0
  111. data/spec/test_data/v6.0/expected_attachment.rbi +4 -4
  112. data/spec/test_data/v6.0/expected_blob.rbi +28 -22
  113. data/spec/test_data/v6.0/expected_daily_prophet_mailer.rbi +7 -0
  114. data/spec/test_data/v6.0/expected_helpers_with_application_and_devise_helpers.rbi +29 -0
  115. data/spec/test_data/v6.0/expected_hogwarts_acceptance_mailer.rbi +10 -0
  116. data/spec/test_data/v6.0/expected_spell_book.rbi +2 -2
  117. data/spec/test_data/v6.0/expected_wizard.rbi +526 -16
  118. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +526 -16
  119. metadata +94 -1
@@ -0,0 +1,29 @@
1
+ # typed: strong
2
+ # This is an autogenerated file for Rails helpers.
3
+ # Please rerun rake rails_rbi:helpers to regenerate.
4
+ module ApplicationHelper
5
+ include Kernel
6
+ include ActionView::Helpers
7
+ include DeviseHelper
8
+ end
9
+
10
+ module BarHelper
11
+ include Kernel
12
+ include ActionView::Helpers
13
+ include ApplicationHelper
14
+ include DeviseHelper
15
+ end
16
+
17
+ module BazHelper
18
+ include Kernel
19
+ include ActionView::Helpers
20
+ include ApplicationHelper
21
+ include DeviseHelper
22
+ end
23
+
24
+ module FooHelper
25
+ include Kernel
26
+ include ActionView::Helpers
27
+ include ApplicationHelper
28
+ include DeviseHelper
29
+ end
@@ -0,0 +1,10 @@
1
+ # typed: strong
2
+ # This is an autogenerated file for Rails helpers.
3
+ # Please rerun rake rails_rbi:mailers to regenerate.
4
+ class HogwartsAcceptanceMailer
5
+ sig { params(student: Wizard).returns(ActionMailer::MessageDelivery) }
6
+ def self.notify(student); end
7
+
8
+ sig { params(student: T.untyped).returns(ActionMailer::MessageDelivery) }
9
+ def self.notify_retry(student); end
10
+ end
@@ -1 +1,57 @@
1
- No errors! Great job.
1
+ sorbet_test_cases.rb:167: Method `broom_nimbus?` does not exist on `Wizard` https://srb.help/7003
2
+ 167 | T.assert_type!(wizard.broom_nimbus?, T::Boolean)
3
+ ^^^^^^^^^^^^^^^^^^^^
4
+ Autocorrect: Use `-a` to autocorrect
5
+ sorbet_test_cases.rb:167: Replace with `nimbus?`
6
+ 167 | T.assert_type!(wizard.broom_nimbus?, T::Boolean)
7
+ ^^^^^^^^^^^^^
8
+
9
+
10
+ sorbet_test_cases.rb:167: The typechecker was unable to infer the type of the asserted value https://srb.help/7007
11
+ 167 | T.assert_type!(wizard.broom_nimbus?, T::Boolean)
12
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
+ Got T.untyped originating from:
14
+ sorbet_test_cases.rb:167:
15
+ 167 | T.assert_type!(wizard.broom_nimbus?, T::Boolean)
16
+ ^^^^^^^^^^^^^^^^^^^^
17
+ You may need to add additional `sig` annotations
18
+
19
+ sorbet_test_cases.rb:168: Method `color_brown_eyes?` does not exist on `Wizard` https://srb.help/7003
20
+ 168 | T.assert_type!(wizard.color_brown_eyes?, T::Boolean)
21
+ ^^^^^^^^^^^^^^^^^^^^^^^^
22
+
23
+ sorbet_test_cases.rb:168: The typechecker was unable to infer the type of the asserted value https://srb.help/7007
24
+ 168 | T.assert_type!(wizard.color_brown_eyes?, T::Boolean)
25
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
+ Got T.untyped originating from:
27
+ sorbet_test_cases.rb:168:
28
+ 168 | T.assert_type!(wizard.color_brown_eyes?, T::Boolean)
29
+ ^^^^^^^^^^^^^^^^^^^^^^^^
30
+ You may need to add additional `sig` annotations
31
+
32
+ sorbet_test_cases.rb:169: Method `quidditch_keeper?` does not exist on `Wizard` https://srb.help/7003
33
+ 169 | T.assert_type!(wizard.quidditch_keeper?, T::Boolean)
34
+ ^^^^^^^^^^^^^^^^^^^^^^^^
35
+
36
+ sorbet_test_cases.rb:169: The typechecker was unable to infer the type of the asserted value https://srb.help/7007
37
+ 169 | T.assert_type!(wizard.quidditch_keeper?, T::Boolean)
38
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
+ Got T.untyped originating from:
40
+ sorbet_test_cases.rb:169:
41
+ 169 | T.assert_type!(wizard.quidditch_keeper?, T::Boolean)
42
+ ^^^^^^^^^^^^^^^^^^^^^^^^
43
+ You may need to add additional `sig` annotations
44
+
45
+ sorbet_test_cases.rb:170: Method `brown_hair?` does not exist on `Wizard` https://srb.help/7003
46
+ 170 | T.assert_type!(wizard.brown_hair?, T::Boolean)
47
+ ^^^^^^^^^^^^^^^^^^
48
+
49
+ sorbet_test_cases.rb:170: The typechecker was unable to infer the type of the asserted value https://srb.help/7007
50
+ 170 | T.assert_type!(wizard.brown_hair?, T::Boolean)
51
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52
+ Got T.untyped originating from:
53
+ sorbet_test_cases.rb:170:
54
+ 170 | T.assert_type!(wizard.brown_hair?, T::Boolean)
55
+ ^^^^^^^^^^^^^^^^^^
56
+ You may need to add additional `sig` annotations
57
+ Errors: 8
@@ -5,6 +5,18 @@
5
5
  module Wizard::EnumInstanceMethods
6
6
  extend T::Sig
7
7
 
8
+ sig { returns(T::Boolean) }
9
+ def nimbus?; end
10
+
11
+ sig { void }
12
+ def nimbus!; end
13
+
14
+ sig { returns(T::Boolean) }
15
+ def firebolt?; end
16
+
17
+ sig { void }
18
+ def firebolt!; end
19
+
8
20
  sig { returns(T::Boolean) }
9
21
  def Gryffindor?; end
10
22
 
@@ -28,6 +40,12 @@ module Wizard::EnumInstanceMethods
28
40
 
29
41
  sig { void }
30
42
  def Slytherin!; end
43
+
44
+ sig { returns(T::Boolean) }
45
+ def Hagrid?; end
46
+
47
+ sig { void }
48
+ def Hagrid!; end
31
49
  end
32
50
 
33
51
  module Wizard::ActiveRelation_WhereNot
@@ -38,6 +56,15 @@ end
38
56
  module Wizard::GeneratedAttributeMethods
39
57
  extend T::Sig
40
58
 
59
+ sig { returns(T.nilable(String)) }
60
+ def broom; end
61
+
62
+ sig { params(value: T.nilable(T.any(Integer, String, Symbol))).void }
63
+ def broom=(value); end
64
+
65
+ sig { returns(T::Boolean) }
66
+ def broom?; end
67
+
41
68
  sig { returns(T.nilable(Time)) }
42
69
  def created_at; end
43
70
 
@@ -143,12 +170,21 @@ class Wizard < ApplicationRecord
143
170
  extend T::Sig
144
171
  extend T::Generic
145
172
 
173
+ sig { returns(T::Hash[T.any(String, Symbol), String]) }
174
+ def self.brooms; end
175
+
146
176
  sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
147
177
  def self.houses; end
148
178
 
179
+ sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
180
+ def self.professors; end
181
+
149
182
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
150
183
  def self.Gryffindor(*args); end
151
184
 
185
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
186
+ def self.Hagrid(*args); end
187
+
152
188
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
153
189
  def self.Hufflepuff(*args); end
154
190
 
@@ -158,6 +194,12 @@ class Wizard < ApplicationRecord
158
194
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
159
195
  def self.Slytherin(*args); end
160
196
 
197
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
198
+ def self.firebolt(*args); end
199
+
200
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
201
+ def self.nimbus(*args); end
202
+
161
203
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
162
204
  def self.recent(*args); end
163
205
 
@@ -305,6 +347,9 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
305
347
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
306
348
  def Gryffindor(*args); end
307
349
 
350
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
351
+ def Hagrid(*args); end
352
+
308
353
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
309
354
  def Hufflepuff(*args); end
310
355
 
@@ -314,6 +359,12 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
314
359
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
315
360
  def Slytherin(*args); end
316
361
 
362
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
363
+ def firebolt(*args); end
364
+
365
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
366
+ def nimbus(*args); end
367
+
317
368
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
318
369
  def recent(*args); end
319
370
 
@@ -478,6 +529,9 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
478
529
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
479
530
  def Gryffindor(*args); end
480
531
 
532
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
533
+ def Hagrid(*args); end
534
+
481
535
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
482
536
  def Hufflepuff(*args); end
483
537
 
@@ -487,6 +541,12 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
487
541
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
488
542
  def Slytherin(*args); end
489
543
 
544
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
545
+ def firebolt(*args); end
546
+
547
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
548
+ def nimbus(*args); end
549
+
490
550
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
491
551
  def recent(*args); end
492
552
 
@@ -650,6 +710,9 @@ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
650
710
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
651
711
  def Gryffindor(*args); end
652
712
 
713
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
714
+ def Hagrid(*args); end
715
+
653
716
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
654
717
  def Hufflepuff(*args); end
655
718
 
@@ -659,6 +722,12 @@ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
659
722
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
660
723
  def Slytherin(*args); end
661
724
 
725
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
726
+ def firebolt(*args); end
727
+
728
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
729
+ def nimbus(*args); end
730
+
662
731
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
663
732
  def recent(*args); end
664
733
 
@@ -5,6 +5,18 @@
5
5
  module Wizard::EnumInstanceMethods
6
6
  extend T::Sig
7
7
 
8
+ sig { returns(T::Boolean) }
9
+ def nimbus?; end
10
+
11
+ sig { void }
12
+ def nimbus!; end
13
+
14
+ sig { returns(T::Boolean) }
15
+ def firebolt?; end
16
+
17
+ sig { void }
18
+ def firebolt!; end
19
+
8
20
  sig { returns(T::Boolean) }
9
21
  def Gryffindor?; end
10
22
 
@@ -28,6 +40,12 @@ module Wizard::EnumInstanceMethods
28
40
 
29
41
  sig { void }
30
42
  def Slytherin!; end
43
+
44
+ sig { returns(T::Boolean) }
45
+ def Hagrid?; end
46
+
47
+ sig { void }
48
+ def Hagrid!; end
31
49
  end
32
50
 
33
51
  module Wizard::ActiveRelation_WhereNot
@@ -38,6 +56,15 @@ end
38
56
  module Wizard::GeneratedAttributeMethods
39
57
  extend T::Sig
40
58
 
59
+ sig { returns(T.nilable(String)) }
60
+ def broom; end
61
+
62
+ sig { params(value: T.nilable(T.any(Integer, String, Symbol))).void }
63
+ def broom=(value); end
64
+
65
+ sig { returns(T::Boolean) }
66
+ def broom?; end
67
+
41
68
  sig { returns(T.nilable(Time)) }
42
69
  def created_at; end
43
70
 
@@ -143,12 +170,21 @@ class Wizard < ApplicationRecord
143
170
  extend T::Sig
144
171
  extend T::Generic
145
172
 
173
+ sig { returns(T::Hash[T.any(String, Symbol), String]) }
174
+ def self.brooms; end
175
+
146
176
  sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
147
177
  def self.houses; end
148
178
 
179
+ sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
180
+ def self.professors; end
181
+
149
182
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
150
183
  def self.Gryffindor(*args); end
151
184
 
185
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
186
+ def self.Hagrid(*args); end
187
+
152
188
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
153
189
  def self.Hufflepuff(*args); end
154
190
 
@@ -158,6 +194,12 @@ class Wizard < ApplicationRecord
158
194
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
159
195
  def self.Slytherin(*args); end
160
196
 
197
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
198
+ def self.firebolt(*args); end
199
+
200
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
201
+ def self.nimbus(*args); end
202
+
161
203
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
162
204
  def self.recent(*args); end
163
205
 
@@ -305,6 +347,9 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
305
347
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
306
348
  def Gryffindor(*args); end
307
349
 
350
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
351
+ def Hagrid(*args); end
352
+
308
353
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
309
354
  def Hufflepuff(*args); end
310
355
 
@@ -314,6 +359,12 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
314
359
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
315
360
  def Slytherin(*args); end
316
361
 
362
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
363
+ def firebolt(*args); end
364
+
365
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
366
+ def nimbus(*args); end
367
+
317
368
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
318
369
  def recent(*args); end
319
370
 
@@ -478,6 +529,9 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
478
529
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
479
530
  def Gryffindor(*args); end
480
531
 
532
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
533
+ def Hagrid(*args); end
534
+
481
535
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
482
536
  def Hufflepuff(*args); end
483
537
 
@@ -487,6 +541,12 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
487
541
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
488
542
  def Slytherin(*args); end
489
543
 
544
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
545
+ def firebolt(*args); end
546
+
547
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
548
+ def nimbus(*args); end
549
+
490
550
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
491
551
  def recent(*args); end
492
552
 
@@ -650,6 +710,9 @@ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
650
710
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
651
711
  def Gryffindor(*args); end
652
712
 
713
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
714
+ def Hagrid(*args); end
715
+
653
716
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
654
717
  def Hufflepuff(*args); end
655
718
 
@@ -659,6 +722,12 @@ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
659
722
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
660
723
  def Slytherin(*args); end
661
724
 
725
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
726
+ def firebolt(*args); end
727
+
728
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
729
+ def nimbus(*args); end
730
+
662
731
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
663
732
  def recent(*args); end
664
733
 
@@ -0,0 +1,5 @@
1
+ # typed: strong
2
+ # This is an autogenerated file for Rails helpers.
3
+ # Please rerun rake rails_rbi:mailers to regenerate.
4
+ class ApplicationMailer
5
+ end
@@ -0,0 +1,7 @@
1
+ # typed: strong
2
+ # This is an autogenerated file for Rails helpers.
3
+ # Please rerun rake rails_rbi:mailers to regenerate.
4
+ class DailyProphetMailer
5
+ sig { params(wizards: T::Array[Wizard], hotnews_only: T::Boolean).returns(ActionMailer::MessageDelivery) }
6
+ def self.notify_subscribers(wizards, hotnews_only); end
7
+ end
@@ -0,0 +1,29 @@
1
+ # typed: strong
2
+ # This is an autogenerated file for Rails helpers.
3
+ # Please rerun rake rails_rbi:helpers to regenerate.
4
+ module ApplicationHelper
5
+ include Kernel
6
+ include ActionView::Helpers
7
+ include DeviseHelper
8
+ end
9
+
10
+ module BarHelper
11
+ include Kernel
12
+ include ActionView::Helpers
13
+ include ApplicationHelper
14
+ include DeviseHelper
15
+ end
16
+
17
+ module BazHelper
18
+ include Kernel
19
+ include ActionView::Helpers
20
+ include ApplicationHelper
21
+ include DeviseHelper
22
+ end
23
+
24
+ module FooHelper
25
+ include Kernel
26
+ include ActionView::Helpers
27
+ include ApplicationHelper
28
+ include DeviseHelper
29
+ end
@@ -0,0 +1,10 @@
1
+ # typed: strong
2
+ # This is an autogenerated file for Rails helpers.
3
+ # Please rerun rake rails_rbi:mailers to regenerate.
4
+ class HogwartsAcceptanceMailer
5
+ sig { params(student: Wizard).returns(ActionMailer::MessageDelivery) }
6
+ def self.notify(student); end
7
+
8
+ sig { params(student: T.untyped).returns(ActionMailer::MessageDelivery) }
9
+ def self.notify_retry(student); end
10
+ end