sorbet-rails 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -7
  3. data/lib/sorbet-rails/active_record_rbi_formatter.rb +2 -2
  4. data/lib/sorbet-rails/helper_rbi_formatter.rb +1 -1
  5. data/lib/sorbet-rails/job_rbi_formatter.rb +4 -2
  6. data/lib/sorbet-rails/mailer_rbi_formatter.rb +3 -3
  7. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +1 -1
  8. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +10 -10
  9. data/lib/sorbet-rails/routes_rbi_formatter.rb +2 -2
  10. data/sorbet-rails.gemspec +2 -2
  11. data/spec/generators/sorbet_test_cases.rb +4 -2
  12. data/spec/sorbet_spec.rb +6 -6
  13. data/spec/support/v5.0/Gemfile.lock +8 -7
  14. data/spec/support/v5.0/sorbet_test_cases.rb +4 -2
  15. data/spec/support/v5.1/Gemfile.lock +8 -7
  16. data/spec/support/v5.1/sorbet_test_cases.rb +4 -2
  17. data/spec/support/v5.2/Gemfile.lock +8 -7
  18. data/spec/support/v5.2/sorbet_test_cases.rb +4 -2
  19. data/spec/support/v6.0/Gemfile.lock +8 -7
  20. data/spec/support/v6.0/sorbet_test_cases.rb +4 -2
  21. data/spec/test_data/v5.0/expected_application_job.rbi +2 -2
  22. data/spec/test_data/v5.0/expected_award_house_point_hourglasses.rbi +2 -2
  23. data/spec/test_data/v5.0/expected_custom_application_job.rbi +2 -2
  24. data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +2 -2
  25. data/spec/test_data/v5.0/expected_spell_book.rbi +9 -9
  26. data/spec/test_data/v5.0/expected_wand.rbi +10 -10
  27. data/spec/test_data/v5.0/expected_wizard.rbi +58 -58
  28. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +58 -58
  29. data/spec/test_data/v5.1/expected_application_job.rbi +2 -2
  30. data/spec/test_data/v5.1/expected_award_house_point_hourglasses.rbi +2 -2
  31. data/spec/test_data/v5.1/expected_custom_application_job.rbi +2 -2
  32. data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +2 -2
  33. data/spec/test_data/v5.1/expected_spell_book.rbi +9 -9
  34. data/spec/test_data/v5.1/expected_wand.rbi +10 -10
  35. data/spec/test_data/v5.1/expected_wizard.rbi +58 -58
  36. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +58 -58
  37. data/spec/test_data/v5.2/expected_application_job.rbi +2 -2
  38. data/spec/test_data/v5.2/expected_award_house_point_hourglasses.rbi +2 -2
  39. data/spec/test_data/v5.2/expected_custom_application_job.rbi +2 -2
  40. data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +2 -2
  41. data/spec/test_data/v5.2/expected_spell_book.rbi +9 -9
  42. data/spec/test_data/v5.2/expected_wand.rbi +10 -10
  43. data/spec/test_data/v5.2/expected_wizard.rbi +58 -58
  44. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +58 -58
  45. data/spec/test_data/v6.0/expected_application_job.rbi +2 -2
  46. data/spec/test_data/v6.0/expected_award_house_point_hourglasses.rbi +2 -2
  47. data/spec/test_data/v6.0/expected_custom_application_job.rbi +2 -2
  48. data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +2 -2
  49. data/spec/test_data/v6.0/expected_spell_book.rbi +9 -9
  50. data/spec/test_data/v6.0/expected_wand.rbi +10 -10
  51. data/spec/test_data/v6.0/expected_wizard.rbi +58 -58
  52. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +58 -58
  53. metadata +5 -5
@@ -170,16 +170,6 @@ module Wand::GeneratedAttributeMethods
170
170
  def wood_type?; end
171
171
  end
172
172
 
173
- class Wand::CoreType < T::Enum
174
- enums do
175
- PhoenixFeather = new(%q{phoenix_feather})
176
- DragonHeartstring = new(%q{dragon_heartstring})
177
- UnicornTailHair = new(%q{unicorn_tail_hair})
178
- BasiliskHorn = new(%q{basilisk_horn})
179
- end
180
-
181
- end
182
-
183
173
  module Wand::GeneratedAssociationMethods
184
174
  sig { returns(::Wizard) }
185
175
  def wizard; end
@@ -243,6 +233,16 @@ class Wand < ApplicationRecord
243
233
  sig { params(value: T.nilable(Wand::CoreType)).void }
244
234
  def typed_core_type=(value); end
245
235
 
236
+ class CoreType < T::Enum
237
+ enums do
238
+ PhoenixFeather = new(%q{phoenix_feather})
239
+ DragonHeartstring = new(%q{dragon_heartstring})
240
+ UnicornTailHair = new(%q{unicorn_tail_hair})
241
+ BasiliskHorn = new(%q{basilisk_horn})
242
+ end
243
+
244
+ end
245
+
246
246
  sig { returns(T::Array[Wand]) }
247
247
  def self.mythicals; end
248
248
  end
@@ -230,64 +230,6 @@ module Wizard::GeneratedAttributeMethods
230
230
  def updated_at?; end
231
231
  end
232
232
 
233
- class Wizard::Broom < T::Enum
234
- enums do
235
- Nimbus = new(%q{nimbus})
236
- Firebolt = new(%q{firebolt})
237
- end
238
-
239
- end
240
-
241
- class Wizard::EyeColor < T::Enum
242
- enums do
243
- Brown = new(%q{brown})
244
- Green = new(%q{green})
245
- Blue = new(%q{blue})
246
- end
247
-
248
- end
249
-
250
- class Wizard::HairColor < T::Enum
251
- enums do
252
- Brown = new(%q{brown})
253
- Black = new(%q{black})
254
- Blonde = new(%q{blonde})
255
- end
256
-
257
- end
258
-
259
- class Wizard::House < T::Enum
260
- enums do
261
- Gryffindor = new(%q{Gryffindor})
262
- Hufflepuff = new(%q{Hufflepuff})
263
- Ravenclaw = new(%q{Ravenclaw})
264
- Slytherin = new(%q{Slytherin})
265
- end
266
-
267
- end
268
-
269
- class Wizard::ProfessorEnum < T::Enum
270
- enums do
271
- SeverusSnape = new(%q{Severus Snape})
272
- MinervaMcGonagall = new(%q{Minerva McGonagall})
273
- PomonaSprout = new(%q{Pomona Sprout})
274
- FiliusFlitwick = new(%q{Filius Flitwick})
275
- Hagrid = new(%q{Hagrid})
276
- AlastorMadEyeMoody = new(%q{Alastor 'Mad-Eye' Moody})
277
- end
278
-
279
- end
280
-
281
- class Wizard::QuidditchPosition < T::Enum
282
- enums do
283
- Keeper = new(%q{keeper})
284
- Seeker = new(%q{seeker})
285
- Beater = new(%q{beater})
286
- Chaser = new(%q{chaser})
287
- end
288
-
289
- end
290
-
291
233
  module Wizard::GeneratedAssociationMethods
292
234
  sig { returns(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
293
235
  def hats_attachments; end
@@ -524,6 +466,64 @@ class Wizard < ApplicationRecord
524
466
 
525
467
  sig { params(value: T.nilable(Wizard::QuidditchPosition)).void }
526
468
  def typed_quidditch_position=(value); end
469
+
470
+ class Broom < T::Enum
471
+ enums do
472
+ Nimbus = new(%q{nimbus})
473
+ Firebolt = new(%q{firebolt})
474
+ end
475
+
476
+ end
477
+
478
+ class EyeColor < T::Enum
479
+ enums do
480
+ Brown = new(%q{brown})
481
+ Green = new(%q{green})
482
+ Blue = new(%q{blue})
483
+ end
484
+
485
+ end
486
+
487
+ class HairColor < T::Enum
488
+ enums do
489
+ Brown = new(%q{brown})
490
+ Black = new(%q{black})
491
+ Blonde = new(%q{blonde})
492
+ end
493
+
494
+ end
495
+
496
+ class House < T::Enum
497
+ enums do
498
+ Gryffindor = new(%q{Gryffindor})
499
+ Hufflepuff = new(%q{Hufflepuff})
500
+ Ravenclaw = new(%q{Ravenclaw})
501
+ Slytherin = new(%q{Slytherin})
502
+ end
503
+
504
+ end
505
+
506
+ class ProfessorEnum < T::Enum
507
+ enums do
508
+ SeverusSnape = new(%q{Severus Snape})
509
+ MinervaMcGonagall = new(%q{Minerva McGonagall})
510
+ PomonaSprout = new(%q{Pomona Sprout})
511
+ FiliusFlitwick = new(%q{Filius Flitwick})
512
+ Hagrid = new(%q{Hagrid})
513
+ AlastorMadEyeMoody = new(%q{Alastor 'Mad-Eye' Moody})
514
+ end
515
+
516
+ end
517
+
518
+ class QuidditchPosition < T::Enum
519
+ enums do
520
+ Keeper = new(%q{keeper})
521
+ Seeker = new(%q{seeker})
522
+ Beater = new(%q{beater})
523
+ Chaser = new(%q{chaser})
524
+ end
525
+
526
+ end
527
527
  end
528
528
 
529
529
  class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
@@ -230,64 +230,6 @@ module Wizard::GeneratedAttributeMethods
230
230
  def updated_at?; end
231
231
  end
232
232
 
233
- class Wizard::Broom < T::Enum
234
- enums do
235
- Nimbus = new(%q{nimbus})
236
- Firebolt = new(%q{firebolt})
237
- end
238
-
239
- end
240
-
241
- class Wizard::EyeColor < T::Enum
242
- enums do
243
- Brown = new(%q{brown})
244
- Green = new(%q{green})
245
- Blue = new(%q{blue})
246
- end
247
-
248
- end
249
-
250
- class Wizard::HairColor < T::Enum
251
- enums do
252
- Brown = new(%q{brown})
253
- Black = new(%q{black})
254
- Blonde = new(%q{blonde})
255
- end
256
-
257
- end
258
-
259
- class Wizard::House < T::Enum
260
- enums do
261
- Gryffindor = new(%q{Gryffindor})
262
- Hufflepuff = new(%q{Hufflepuff})
263
- Ravenclaw = new(%q{Ravenclaw})
264
- Slytherin = new(%q{Slytherin})
265
- end
266
-
267
- end
268
-
269
- class Wizard::ProfessorEnum < T::Enum
270
- enums do
271
- SeverusSnape = new(%q{Severus Snape})
272
- MinervaMcGonagall = new(%q{Minerva McGonagall})
273
- PomonaSprout = new(%q{Pomona Sprout})
274
- FiliusFlitwick = new(%q{Filius Flitwick})
275
- Hagrid = new(%q{Hagrid})
276
- AlastorMadEyeMoody = new(%q{Alastor 'Mad-Eye' Moody})
277
- end
278
-
279
- end
280
-
281
- class Wizard::QuidditchPosition < T::Enum
282
- enums do
283
- Keeper = new(%q{keeper})
284
- Seeker = new(%q{seeker})
285
- Beater = new(%q{beater})
286
- Chaser = new(%q{chaser})
287
- end
288
-
289
- end
290
-
291
233
  module Wizard::GeneratedAssociationMethods
292
234
  sig { returns(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
293
235
  def hats_attachments; end
@@ -518,6 +460,64 @@ class Wizard < ApplicationRecord
518
460
 
519
461
  sig { params(value: T.nilable(Wizard::QuidditchPosition)).void }
520
462
  def typed_quidditch_position=(value); end
463
+
464
+ class Broom < T::Enum
465
+ enums do
466
+ Nimbus = new(%q{nimbus})
467
+ Firebolt = new(%q{firebolt})
468
+ end
469
+
470
+ end
471
+
472
+ class EyeColor < T::Enum
473
+ enums do
474
+ Brown = new(%q{brown})
475
+ Green = new(%q{green})
476
+ Blue = new(%q{blue})
477
+ end
478
+
479
+ end
480
+
481
+ class HairColor < T::Enum
482
+ enums do
483
+ Brown = new(%q{brown})
484
+ Black = new(%q{black})
485
+ Blonde = new(%q{blonde})
486
+ end
487
+
488
+ end
489
+
490
+ class House < T::Enum
491
+ enums do
492
+ Gryffindor = new(%q{Gryffindor})
493
+ Hufflepuff = new(%q{Hufflepuff})
494
+ Ravenclaw = new(%q{Ravenclaw})
495
+ Slytherin = new(%q{Slytherin})
496
+ end
497
+
498
+ end
499
+
500
+ class ProfessorEnum < T::Enum
501
+ enums do
502
+ SeverusSnape = new(%q{Severus Snape})
503
+ MinervaMcGonagall = new(%q{Minerva McGonagall})
504
+ PomonaSprout = new(%q{Pomona Sprout})
505
+ FiliusFlitwick = new(%q{Filius Flitwick})
506
+ Hagrid = new(%q{Hagrid})
507
+ AlastorMadEyeMoody = new(%q{Alastor 'Mad-Eye' Moody})
508
+ end
509
+
510
+ end
511
+
512
+ class QuidditchPosition < T::Enum
513
+ enums do
514
+ Keeper = new(%q{keeper})
515
+ Seeker = new(%q{seeker})
516
+ Beater = new(%q{beater})
517
+ Chaser = new(%q{chaser})
518
+ end
519
+
520
+ end
521
521
  end
522
522
 
523
523
  class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
@@ -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
@@ -3,10 +3,10 @@
3
3
  # This is an autogenerated file for Rails' jobs.
4
4
  # Please rerun bundle exec rake rails_rbi:jobs to regenerate.
5
5
  class ApplicationJob
6
- sig { params(_: T.untyped).void }
6
+ sig { params(_: T.untyped).returns(ApplicationJob) }
7
7
  def self.perform_later(*_); end
8
8
 
9
- sig { params(_: T.untyped).void }
9
+ sig { params(_: T.untyped).returns(ApplicationJob) }
10
10
  def self.perform_now(*_); end
11
11
 
12
12
  sig do
@@ -3,10 +3,10 @@
3
3
  # This is an autogenerated file for Rails' jobs.
4
4
  # Please rerun bundle exec rake rails_rbi:jobs to regenerate.
5
5
  class AwardHousePointHourglasses
6
- sig { params(student: Wizard, point: Integer).void }
6
+ sig { params(student: Wizard, point: Integer).returns(AwardHousePointHourglasses) }
7
7
  def self.perform_later(student:, point:); end
8
8
 
9
- sig { params(student: Wizard, point: Integer).void }
9
+ sig { params(student: Wizard, point: Integer).returns(AwardHousePointHourglasses) }
10
10
  def self.perform_now(student:, point:); end
11
11
 
12
12
  sig do
@@ -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
@@ -154,6 +145,15 @@ class SpellBook < ApplicationRecord
154
145
 
155
146
  sig { params(value: SpellBook::BookType).void }
156
147
  def typed_book_type=(value); end
148
+
149
+ class BookType < T::Enum
150
+ enums do
151
+ Unclassified = new(%q{unclassified})
152
+ Biology = new(%q{biology})
153
+ DarkArt = new(%q{dark_art})
154
+ end
155
+
156
+ end
157
157
  end
158
158
 
159
159
  class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
@@ -170,16 +170,6 @@ module Wand::GeneratedAttributeMethods
170
170
  def wood_type?; end
171
171
  end
172
172
 
173
- class Wand::CoreType < T::Enum
174
- enums do
175
- PhoenixFeather = new(%q{phoenix_feather})
176
- DragonHeartstring = new(%q{dragon_heartstring})
177
- UnicornTailHair = new(%q{unicorn_tail_hair})
178
- BasiliskHorn = new(%q{basilisk_horn})
179
- end
180
-
181
- end
182
-
183
173
  module Wand::GeneratedAssociationMethods
184
174
  sig { returns(::Wizard) }
185
175
  def wizard; end
@@ -255,6 +245,16 @@ class Wand < ApplicationRecord
255
245
  sig { params(value: T.nilable(Wand::CoreType)).void }
256
246
  def typed_core_type=(value); end
257
247
 
248
+ class CoreType < T::Enum
249
+ enums do
250
+ PhoenixFeather = new(%q{phoenix_feather})
251
+ DragonHeartstring = new(%q{dragon_heartstring})
252
+ UnicornTailHair = new(%q{unicorn_tail_hair})
253
+ BasiliskHorn = new(%q{basilisk_horn})
254
+ end
255
+
256
+ end
257
+
258
258
  sig { returns(T::Array[Wand]) }
259
259
  def self.mythicals; end
260
260
  end
@@ -230,64 +230,6 @@ module Wizard::GeneratedAttributeMethods
230
230
  def updated_at?; end
231
231
  end
232
232
 
233
- class Wizard::Broom < T::Enum
234
- enums do
235
- Nimbus = new(%q{nimbus})
236
- Firebolt = new(%q{firebolt})
237
- end
238
-
239
- end
240
-
241
- class Wizard::EyeColor < T::Enum
242
- enums do
243
- Brown = new(%q{brown})
244
- Green = new(%q{green})
245
- Blue = new(%q{blue})
246
- end
247
-
248
- end
249
-
250
- class Wizard::HairColor < T::Enum
251
- enums do
252
- Brown = new(%q{brown})
253
- Black = new(%q{black})
254
- Blonde = new(%q{blonde})
255
- end
256
-
257
- end
258
-
259
- class Wizard::House < T::Enum
260
- enums do
261
- Gryffindor = new(%q{Gryffindor})
262
- Hufflepuff = new(%q{Hufflepuff})
263
- Ravenclaw = new(%q{Ravenclaw})
264
- Slytherin = new(%q{Slytherin})
265
- end
266
-
267
- end
268
-
269
- class Wizard::ProfessorEnum < T::Enum
270
- enums do
271
- SeverusSnape = new(%q{Severus Snape})
272
- MinervaMcGonagall = new(%q{Minerva McGonagall})
273
- PomonaSprout = new(%q{Pomona Sprout})
274
- FiliusFlitwick = new(%q{Filius Flitwick})
275
- Hagrid = new(%q{Hagrid})
276
- AlastorMadEyeMoody = new(%q{Alastor 'Mad-Eye' Moody})
277
- end
278
-
279
- end
280
-
281
- class Wizard::QuidditchPosition < T::Enum
282
- enums do
283
- Keeper = new(%q{keeper})
284
- Seeker = new(%q{seeker})
285
- Beater = new(%q{beater})
286
- Chaser = new(%q{chaser})
287
- end
288
-
289
- end
290
-
291
233
  module Wizard::CustomFinderMethods
292
234
  sig { params(limit: Integer).returns(T::Array[Wizard]) }
293
235
  def first_n(limit); end
@@ -477,6 +419,64 @@ class Wizard < ApplicationRecord
477
419
 
478
420
  sig { params(value: T.nilable(Wizard::QuidditchPosition)).void }
479
421
  def typed_quidditch_position=(value); end
422
+
423
+ class Broom < T::Enum
424
+ enums do
425
+ Nimbus = new(%q{nimbus})
426
+ Firebolt = new(%q{firebolt})
427
+ end
428
+
429
+ end
430
+
431
+ class EyeColor < T::Enum
432
+ enums do
433
+ Brown = new(%q{brown})
434
+ Green = new(%q{green})
435
+ Blue = new(%q{blue})
436
+ end
437
+
438
+ end
439
+
440
+ class HairColor < T::Enum
441
+ enums do
442
+ Brown = new(%q{brown})
443
+ Black = new(%q{black})
444
+ Blonde = new(%q{blonde})
445
+ end
446
+
447
+ end
448
+
449
+ class House < T::Enum
450
+ enums do
451
+ Gryffindor = new(%q{Gryffindor})
452
+ Hufflepuff = new(%q{Hufflepuff})
453
+ Ravenclaw = new(%q{Ravenclaw})
454
+ Slytherin = new(%q{Slytherin})
455
+ end
456
+
457
+ end
458
+
459
+ class ProfessorEnum < T::Enum
460
+ enums do
461
+ SeverusSnape = new(%q{Severus Snape})
462
+ MinervaMcGonagall = new(%q{Minerva McGonagall})
463
+ PomonaSprout = new(%q{Pomona Sprout})
464
+ FiliusFlitwick = new(%q{Filius Flitwick})
465
+ Hagrid = new(%q{Hagrid})
466
+ AlastorMadEyeMoody = new(%q{Alastor 'Mad-Eye' Moody})
467
+ end
468
+
469
+ end
470
+
471
+ class QuidditchPosition < T::Enum
472
+ enums do
473
+ Keeper = new(%q{keeper})
474
+ Seeker = new(%q{seeker})
475
+ Beater = new(%q{beater})
476
+ Chaser = new(%q{chaser})
477
+ end
478
+
479
+ end
480
480
  end
481
481
 
482
482
  class Wizard::ActiveRecord_Relation < ActiveRecord::Relation