sorbet-rails 0.6.3 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +1 -2
- data/.gitignore +2 -1
- data/.travis.yml +3 -1
- data/README.md +54 -7
- data/Rakefile +3 -3
- data/lib/bundled_rbi/customizabel_rbi_formatter.rbi +29 -0
- data/lib/bundled_rbi/pluck_to_tstruct.rbi +2 -1
- data/lib/bundled_rbi/typed_enum.rbi +7 -0
- data/lib/sorbet-rails.rb +1 -3
- data/lib/sorbet-rails/active_record_rbi_formatter.rb +8 -2
- data/lib/sorbet-rails/config.rb +11 -0
- data/lib/sorbet-rails/deprecation.rb +1 -0
- data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
- data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +8 -0
- data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
- data/lib/sorbet-rails/job_rbi_formatter.rb +73 -62
- data/lib/sorbet-rails/mailer_rbi_formatter.rb +40 -27
- data/lib/sorbet-rails/model_column_utils.rb +129 -0
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +37 -3
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +0 -103
- data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -1
- data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +15 -6
- data/lib/sorbet-rails/model_plugins/active_record_querying.rb +34 -3
- data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
- data/lib/sorbet-rails/model_plugins/base.rb +0 -9
- data/lib/sorbet-rails/model_rbi_formatter.rb +4 -8
- data/lib/sorbet-rails/model_utils.rb +73 -32
- data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
- data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +17 -7
- data/lib/sorbet-rails/railtie.rb +0 -2
- data/lib/sorbet-rails/sorbet_utils.rb +152 -150
- data/lib/sorbet-rails/tasks/rails_rbi.rake +18 -26
- data/sorbet-rails.gemspec +1 -1
- data/spec/generators/rails-template.rb +3 -6
- data/spec/generators/sorbet_test_cases.rb +66 -88
- data/spec/job_rbi_formatter_spec.rb +1 -1
- data/spec/pluck_to_tstruct_spec.rb +74 -1
- data/spec/rails_helper.rb +2 -2
- data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
- data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
- data/spec/support/v5.0/Gemfile +1 -1
- data/spec/support/v5.0/Gemfile.lock +9 -9
- data/spec/support/v5.0/app/models/spell_book.rb +2 -0
- data/spec/support/v5.0/app/models/wizard.rb +1 -1
- data/spec/support/v5.0/sorbet_test_cases.rb +66 -88
- data/spec/support/v5.1/Gemfile.lock +7 -7
- data/spec/support/v5.1/app/models/spell_book.rb +2 -0
- data/spec/support/v5.1/app/models/wizard.rb +1 -1
- data/spec/support/v5.1/sorbet_test_cases.rb +66 -88
- data/spec/support/v5.2/Gemfile +1 -1
- data/spec/support/v5.2/Gemfile.lock +9 -9
- data/spec/support/v5.2/app/models/spell_book.rb +2 -0
- data/spec/support/v5.2/app/models/wizard.rb +1 -1
- data/spec/support/v5.2/sorbet_test_cases.rb +66 -88
- data/spec/support/v6.0/.gitignore +6 -0
- data/spec/support/v6.0/Gemfile +3 -3
- data/spec/support/v6.0/Gemfile.lock +77 -76
- data/spec/support/v6.0/app/models/spell_book.rb +2 -0
- data/spec/support/v6.0/app/models/wizard.rb +1 -1
- data/spec/support/v6.0/bin/bundle +22 -13
- data/spec/support/v6.0/config/environments/test.rb +1 -1
- data/spec/support/v6.0/sorbet_test_cases.rb +66 -88
- data/spec/support/v6.0/tmp/pids/.keep +0 -0
- data/spec/test_data/v5.0/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.0/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.0/expected_headmaster.rbi +60 -190
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +42 -188
- data/spec/test_data/v5.0/expected_potion.rbi +51 -188
- data/spec/test_data/v5.0/expected_robe.rbi +51 -190
- data/spec/test_data/v5.0/expected_schema_migration.rbi +42 -188
- data/spec/test_data/v5.0/expected_school.rbi +51 -190
- data/spec/test_data/v5.0/expected_spell.rbi +42 -190
- data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +60 -190
- data/spec/test_data/v5.0/expected_spell_book.rbi +86 -215
- data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +60 -190
- data/spec/test_data/v5.0/expected_squib.rbi +131 -263
- data/spec/test_data/v5.0/expected_subject.rbi +42 -190
- data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +60 -190
- data/spec/test_data/v5.0/expected_wand.rbi +84 -225
- data/spec/test_data/v5.0/expected_wizard.rbi +131 -263
- data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +60 -190
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +131 -263
- data/spec/test_data/v5.1/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.1/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.1/expected_headmaster.rbi +60 -196
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +42 -194
- data/spec/test_data/v5.1/expected_potion.rbi +51 -194
- data/spec/test_data/v5.1/expected_robe.rbi +51 -196
- data/spec/test_data/v5.1/expected_schema_migration.rbi +42 -194
- data/spec/test_data/v5.1/expected_school.rbi +51 -196
- data/spec/test_data/v5.1/expected_spell.rbi +42 -196
- data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +60 -196
- data/spec/test_data/v5.1/expected_spell_book.rbi +86 -221
- data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +60 -196
- data/spec/test_data/v5.1/expected_squib.rbi +132 -270
- data/spec/test_data/v5.1/expected_subject.rbi +42 -196
- data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +60 -196
- data/spec/test_data/v5.1/expected_wand.rbi +84 -231
- data/spec/test_data/v5.1/expected_wizard.rbi +132 -270
- data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +60 -196
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +132 -270
- data/spec/test_data/v5.2/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.2/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.2/expected_attachment.rbi +60 -194
- data/spec/test_data/v5.2/expected_blob.rbi +80 -214
- data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.2/expected_headmaster.rbi +60 -196
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +42 -194
- data/spec/test_data/v5.2/expected_potion.rbi +51 -194
- data/spec/test_data/v5.2/expected_robe.rbi +51 -196
- data/spec/test_data/v5.2/expected_schema_migration.rbi +42 -194
- data/spec/test_data/v5.2/expected_school.rbi +51 -196
- data/spec/test_data/v5.2/expected_spell.rbi +42 -196
- data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +60 -196
- data/spec/test_data/v5.2/expected_spell_book.rbi +86 -221
- data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +60 -196
- data/spec/test_data/v5.2/expected_squib.rbi +156 -276
- data/spec/test_data/v5.2/expected_subject.rbi +42 -196
- data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +60 -196
- data/spec/test_data/v5.2/expected_wand.rbi +84 -231
- data/spec/test_data/v5.2/expected_wizard.rbi +156 -276
- data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +60 -196
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +156 -276
- data/spec/test_data/v6.0/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v6.0/expected_active_record_relation.rbi +10 -10
- data/spec/test_data/v6.0/expected_attachment.rbi +60 -218
- data/spec/test_data/v6.0/expected_blob.rbi +80 -238
- data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v6.0/expected_headmaster.rbi +60 -220
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +42 -218
- data/spec/test_data/v6.0/expected_potion.rbi +51 -218
- data/spec/test_data/v6.0/expected_robe.rbi +51 -220
- data/spec/test_data/v6.0/expected_routes.rbi +14 -7
- data/spec/test_data/v6.0/expected_schema_migration.rbi +42 -218
- data/spec/test_data/v6.0/expected_school.rbi +51 -220
- data/spec/test_data/v6.0/expected_spell.rbi +42 -220
- data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +60 -220
- data/spec/test_data/v6.0/expected_spell_book.rbi +98 -257
- data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +60 -220
- data/spec/test_data/v6.0/expected_squib.rbi +182 -326
- data/spec/test_data/v6.0/expected_subject.rbi +42 -220
- data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +60 -220
- data/spec/test_data/v6.0/expected_wand.rbi +100 -271
- data/spec/test_data/v6.0/expected_wizard.rbi +182 -326
- data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +60 -220
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +182 -326
- metadata +46 -11
- data/lib/bundled_rbi/parameters.rbi +0 -28
- data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -42
- data/lib/sorbet-rails/custom_types/integer_string.rb +0 -45
- data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -57
- data/spec/boolean_string_spec.rb +0 -59
- data/spec/custom_params_methods_spec.rb +0 -138
- data/spec/integer_string_spec.rb +0 -46
@@ -3,8 +3,6 @@
|
|
3
3
|
|
4
4
|
# typed: strong
|
5
5
|
module Squib::EnumInstanceMethods
|
6
|
-
extend T::Sig
|
7
|
-
|
8
6
|
sig { returns(T::Boolean) }
|
9
7
|
def broom_nimbus?; end
|
10
8
|
|
@@ -114,8 +112,6 @@ module Squib::ActiveRelation_WhereNot
|
|
114
112
|
end
|
115
113
|
|
116
114
|
module Squib::GeneratedAttributeMethods
|
117
|
-
extend T::Sig
|
118
|
-
|
119
115
|
sig { returns(T.nilable(String)) }
|
120
116
|
def broom; end
|
121
117
|
|
@@ -253,11 +249,18 @@ module Squib::GeneratedAttributeMethods
|
|
253
249
|
end
|
254
250
|
|
255
251
|
module Squib::GeneratedAssociationMethods
|
256
|
-
extend T::Sig
|
257
|
-
|
258
252
|
sig { returns(T.nilable(::School)) }
|
259
253
|
def school; end
|
260
254
|
|
255
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
|
256
|
+
def build_school(*args, &block); end
|
257
|
+
|
258
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
|
259
|
+
def create_school(*args, &block); end
|
260
|
+
|
261
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
|
262
|
+
def create_school!(*args, &block); end
|
263
|
+
|
261
264
|
sig { params(value: T.nilable(::School)).void }
|
262
265
|
def school=(value); end
|
263
266
|
|
@@ -282,6 +285,15 @@ module Squib::GeneratedAssociationMethods
|
|
282
285
|
sig { returns(T.nilable(::Wand)) }
|
283
286
|
def wand; end
|
284
287
|
|
288
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
289
|
+
def build_wand(*args, &block); end
|
290
|
+
|
291
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
292
|
+
def create_wand(*args, &block); end
|
293
|
+
|
294
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
295
|
+
def create_wand!(*args, &block); end
|
296
|
+
|
285
297
|
sig { params(value: T.nilable(::Wand)).void }
|
286
298
|
def wand=(value); end
|
287
299
|
end
|
@@ -308,8 +320,7 @@ class Squib < Wizard
|
|
308
320
|
include Squib::GeneratedAttributeMethods
|
309
321
|
include Squib::GeneratedAssociationMethods
|
310
322
|
extend Squib::CustomFinderMethods
|
311
|
-
extend
|
312
|
-
extend T::Generic
|
323
|
+
extend Squib::QueryMethodsReturningRelation
|
313
324
|
RelationType = T.type_alias { T.any(Squib::ActiveRecord_Relation, Squib::ActiveRecord_Associations_CollectionProxy, Squib::ActiveRecord_AssociationRelation) }
|
314
325
|
|
315
326
|
sig { returns(T::Hash[T.any(String, Symbol), String]) }
|
@@ -383,97 +394,12 @@ class Squib < Wizard
|
|
383
394
|
|
384
395
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
385
396
|
def self.recent(*args); end
|
386
|
-
|
387
|
-
sig { returns(Squib::ActiveRecord_Relation) }
|
388
|
-
def self.all; end
|
389
|
-
|
390
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
391
|
-
def self.unscoped(&block); end
|
392
|
-
|
393
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
394
|
-
def self.select(*args); end
|
395
|
-
|
396
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
397
|
-
def self.order(*args); end
|
398
|
-
|
399
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
400
|
-
def self.reorder(*args); end
|
401
|
-
|
402
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
403
|
-
def self.group(*args); end
|
404
|
-
|
405
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
406
|
-
def self.limit(*args); end
|
407
|
-
|
408
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
409
|
-
def self.offset(*args); end
|
410
|
-
|
411
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
412
|
-
def self.joins(*args); end
|
413
|
-
|
414
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
415
|
-
def self.left_joins(*args); end
|
416
|
-
|
417
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
418
|
-
def self.left_outer_joins(*args); end
|
419
|
-
|
420
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
421
|
-
def self.where(*args); end
|
422
|
-
|
423
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
424
|
-
def self.rewhere(*args); end
|
425
|
-
|
426
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
427
|
-
def self.preload(*args); end
|
428
|
-
|
429
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
430
|
-
def self.eager_load(*args); end
|
431
|
-
|
432
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
433
|
-
def self.includes(*args); end
|
434
|
-
|
435
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
436
|
-
def self.from(*args); end
|
437
|
-
|
438
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
439
|
-
def self.lock(*args); end
|
440
|
-
|
441
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
442
|
-
def self.readonly(*args); end
|
443
|
-
|
444
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
445
|
-
def self.or(*args); end
|
446
|
-
|
447
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
448
|
-
def self.having(*args); end
|
449
|
-
|
450
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
451
|
-
def self.create_with(*args); end
|
452
|
-
|
453
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
454
|
-
def self.distinct(*args); end
|
455
|
-
|
456
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
457
|
-
def self.references(*args); end
|
458
|
-
|
459
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
460
|
-
def self.none(*args); end
|
461
|
-
|
462
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
463
|
-
def self.unscope(*args); end
|
464
|
-
|
465
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
466
|
-
def self.except(*args); end
|
467
|
-
|
468
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
469
|
-
def self.extending(*args, &block); end
|
470
397
|
end
|
471
398
|
|
472
399
|
class Squib::ActiveRecord_Relation < ActiveRecord::Relation
|
473
400
|
include Squib::ActiveRelation_WhereNot
|
474
401
|
include Squib::CustomFinderMethods
|
475
|
-
|
476
|
-
extend T::Generic
|
402
|
+
include Squib::QueryMethodsReturningRelation
|
477
403
|
Elem = type_member(fixed: Squib)
|
478
404
|
|
479
405
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
@@ -529,97 +455,72 @@ class Squib::ActiveRecord_Relation < ActiveRecord::Relation
|
|
529
455
|
|
530
456
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
531
457
|
def recent(*args); end
|
458
|
+
end
|
532
459
|
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
540
|
-
def select(*args); end
|
541
|
-
|
542
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
543
|
-
def order(*args); end
|
544
|
-
|
545
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
546
|
-
def reorder(*args); end
|
547
|
-
|
548
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
549
|
-
def group(*args); end
|
550
|
-
|
551
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
552
|
-
def limit(*args); end
|
553
|
-
|
554
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
555
|
-
def offset(*args); end
|
556
|
-
|
557
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
558
|
-
def joins(*args); end
|
559
|
-
|
560
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
561
|
-
def left_joins(*args); end
|
460
|
+
class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
461
|
+
include Squib::ActiveRelation_WhereNot
|
462
|
+
include Squib::CustomFinderMethods
|
463
|
+
include Squib::QueryMethodsReturningAssociationRelation
|
464
|
+
Elem = type_member(fixed: Squib)
|
562
465
|
|
563
|
-
sig { params(args: T.untyped).returns(Squib::
|
564
|
-
def
|
466
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
467
|
+
def Gryffindor(*args); end
|
565
468
|
|
566
|
-
sig { params(args: T.untyped).returns(Squib::
|
567
|
-
def
|
469
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
470
|
+
def Hagrid(*args); end
|
568
471
|
|
569
|
-
sig { params(args: T.untyped).returns(Squib::
|
570
|
-
def
|
472
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
473
|
+
def Hufflepuff(*args); end
|
571
474
|
|
572
|
-
sig { params(args: T.untyped).returns(Squib::
|
573
|
-
def
|
475
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
476
|
+
def Ravenclaw(*args); end
|
574
477
|
|
575
|
-
sig { params(args: T.untyped).returns(Squib::
|
576
|
-
def
|
478
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
479
|
+
def Slytherin(*args); end
|
577
480
|
|
578
|
-
sig { params(args: T.untyped).returns(Squib::
|
579
|
-
def
|
481
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
482
|
+
def black_hair(*args); end
|
580
483
|
|
581
|
-
sig { params(args: T.untyped).returns(Squib::
|
582
|
-
def
|
484
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
485
|
+
def blonde_hair(*args); end
|
583
486
|
|
584
|
-
sig { params(args: T.untyped).returns(Squib::
|
585
|
-
def
|
487
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
488
|
+
def broom_firebolt(*args); end
|
586
489
|
|
587
|
-
sig { params(args: T.untyped).returns(Squib::
|
588
|
-
def
|
490
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
491
|
+
def broom_nimbus(*args); end
|
589
492
|
|
590
|
-
sig { params(args: T.untyped).returns(Squib::
|
591
|
-
def
|
493
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
494
|
+
def brown_hair(*args); end
|
592
495
|
|
593
|
-
sig { params(args: T.untyped).returns(Squib::
|
594
|
-
def
|
496
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
497
|
+
def color_blue_eyes(*args); end
|
595
498
|
|
596
|
-
sig { params(args: T.untyped).returns(Squib::
|
597
|
-
def
|
499
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
500
|
+
def color_brown_eyes(*args); end
|
598
501
|
|
599
|
-
sig { params(args: T.untyped).returns(Squib::
|
600
|
-
def
|
502
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
503
|
+
def color_green_eyes(*args); end
|
601
504
|
|
602
|
-
sig { params(args: T.untyped).returns(Squib::
|
603
|
-
def
|
505
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
506
|
+
def quidditch_beater(*args); end
|
604
507
|
|
605
|
-
sig { params(args: T.untyped).returns(Squib::
|
606
|
-
def
|
508
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
509
|
+
def quidditch_chaser(*args); end
|
607
510
|
|
608
|
-
sig { params(args: T.untyped).returns(Squib::
|
609
|
-
def
|
511
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
512
|
+
def quidditch_keeper(*args); end
|
610
513
|
|
611
|
-
sig { params(args: T.untyped).returns(Squib::
|
612
|
-
def
|
514
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
515
|
+
def quidditch_seeker(*args); end
|
613
516
|
|
614
|
-
sig { params(args: T.untyped
|
615
|
-
def
|
517
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
518
|
+
def recent(*args); end
|
616
519
|
end
|
617
520
|
|
618
|
-
class Squib::
|
619
|
-
include Squib::ActiveRelation_WhereNot
|
521
|
+
class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
620
522
|
include Squib::CustomFinderMethods
|
621
|
-
|
622
|
-
extend T::Generic
|
523
|
+
include Squib::QueryMethodsReturningAssociationRelation
|
623
524
|
Elem = type_member(fixed: Squib)
|
624
525
|
|
625
526
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
@@ -676,155 +577,122 @@ class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelatio
|
|
676
577
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
677
578
|
def recent(*args); end
|
678
579
|
|
679
|
-
sig {
|
580
|
+
sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
|
581
|
+
def <<(*records); end
|
582
|
+
|
583
|
+
sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
|
584
|
+
def append(*records); end
|
585
|
+
|
586
|
+
sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
|
587
|
+
def push(*records); end
|
588
|
+
|
589
|
+
sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
|
590
|
+
def concat(*records); end
|
591
|
+
end
|
592
|
+
|
593
|
+
module Squib::QueryMethodsReturningRelation
|
594
|
+
sig { returns(Squib::ActiveRecord_Relation) }
|
680
595
|
def all; end
|
681
596
|
|
682
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Squib::
|
597
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
683
598
|
def unscoped(&block); end
|
684
599
|
|
685
|
-
sig { params(args: T.untyped).returns(Squib::
|
600
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
686
601
|
def select(*args); end
|
687
602
|
|
688
|
-
sig { params(args: T.untyped).returns(Squib::
|
603
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
689
604
|
def order(*args); end
|
690
605
|
|
691
|
-
sig { params(args: T.untyped).returns(Squib::
|
606
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
692
607
|
def reorder(*args); end
|
693
608
|
|
694
|
-
sig { params(args: T.untyped).returns(Squib::
|
609
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
695
610
|
def group(*args); end
|
696
611
|
|
697
|
-
sig { params(args: T.untyped).returns(Squib::
|
612
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
698
613
|
def limit(*args); end
|
699
614
|
|
700
|
-
sig { params(args: T.untyped).returns(Squib::
|
615
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
701
616
|
def offset(*args); end
|
702
617
|
|
703
|
-
sig { params(args: T.untyped).returns(Squib::
|
618
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
704
619
|
def joins(*args); end
|
705
620
|
|
706
|
-
sig { params(args: T.untyped).returns(Squib::
|
621
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
707
622
|
def left_joins(*args); end
|
708
623
|
|
709
|
-
sig { params(args: T.untyped).returns(Squib::
|
624
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
710
625
|
def left_outer_joins(*args); end
|
711
626
|
|
712
|
-
sig { params(args: T.untyped).returns(Squib::
|
627
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
713
628
|
def where(*args); end
|
714
629
|
|
715
|
-
sig { params(args: T.untyped).returns(Squib::
|
630
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
716
631
|
def rewhere(*args); end
|
717
632
|
|
718
|
-
sig { params(args: T.untyped).returns(Squib::
|
633
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
719
634
|
def preload(*args); end
|
720
635
|
|
721
|
-
sig { params(args: T.untyped).returns(Squib::
|
636
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
722
637
|
def eager_load(*args); end
|
723
638
|
|
724
|
-
sig { params(args: T.untyped).returns(Squib::
|
639
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
725
640
|
def includes(*args); end
|
726
641
|
|
727
|
-
sig { params(args: T.untyped).returns(Squib::
|
642
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
728
643
|
def from(*args); end
|
729
644
|
|
730
|
-
sig { params(args: T.untyped).returns(Squib::
|
645
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
731
646
|
def lock(*args); end
|
732
647
|
|
733
|
-
sig { params(args: T.untyped).returns(Squib::
|
648
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
734
649
|
def readonly(*args); end
|
735
650
|
|
736
|
-
sig { params(args: T.untyped).returns(Squib::
|
651
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
737
652
|
def or(*args); end
|
738
653
|
|
739
|
-
sig { params(args: T.untyped).returns(Squib::
|
654
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
740
655
|
def having(*args); end
|
741
656
|
|
742
|
-
sig { params(args: T.untyped).returns(Squib::
|
657
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
743
658
|
def create_with(*args); end
|
744
659
|
|
745
|
-
sig { params(args: T.untyped).returns(Squib::
|
660
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
746
661
|
def distinct(*args); end
|
747
662
|
|
748
|
-
sig { params(args: T.untyped).returns(Squib::
|
663
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
749
664
|
def references(*args); end
|
750
665
|
|
751
|
-
sig { params(args: T.untyped).returns(Squib::
|
666
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
752
667
|
def none(*args); end
|
753
668
|
|
754
|
-
sig { params(args: T.untyped).returns(Squib::
|
669
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
755
670
|
def unscope(*args); end
|
756
671
|
|
757
|
-
sig { params(args: T.untyped).returns(Squib::
|
672
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
758
673
|
def except(*args); end
|
759
674
|
|
760
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::
|
675
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
761
676
|
def extending(*args, &block); end
|
762
|
-
end
|
763
|
-
|
764
|
-
class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
765
|
-
include Squib::CustomFinderMethods
|
766
|
-
extend T::Sig
|
767
|
-
extend T::Generic
|
768
|
-
Elem = type_member(fixed: Squib)
|
769
|
-
|
770
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
771
|
-
def Gryffindor(*args); end
|
772
|
-
|
773
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
774
|
-
def Hagrid(*args); end
|
775
|
-
|
776
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
777
|
-
def Hufflepuff(*args); end
|
778
|
-
|
779
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
780
|
-
def Ravenclaw(*args); end
|
781
|
-
|
782
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
783
|
-
def Slytherin(*args); end
|
784
|
-
|
785
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
786
|
-
def black_hair(*args); end
|
787
|
-
|
788
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
789
|
-
def blonde_hair(*args); end
|
790
|
-
|
791
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
792
|
-
def broom_firebolt(*args); end
|
793
|
-
|
794
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
795
|
-
def broom_nimbus(*args); end
|
796
677
|
|
797
|
-
sig
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
def
|
808
|
-
|
809
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
810
|
-
def quidditch_beater(*args); end
|
811
|
-
|
812
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
813
|
-
def quidditch_chaser(*args); end
|
814
|
-
|
815
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
816
|
-
def quidditch_keeper(*args); end
|
817
|
-
|
818
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
819
|
-
def quidditch_seeker(*args); end
|
820
|
-
|
821
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
822
|
-
def recent(*args); end
|
678
|
+
sig do
|
679
|
+
params(
|
680
|
+
of: T.nilable(Integer),
|
681
|
+
start: T.nilable(Integer),
|
682
|
+
finish: T.nilable(Integer),
|
683
|
+
load: T.nilable(T::Boolean),
|
684
|
+
error_on_ignore: T.nilable(T::Boolean),
|
685
|
+
block: T.nilable(T.proc.params(e: Squib::ActiveRecord_Relation).void)
|
686
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
687
|
+
end
|
688
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
689
|
+
end
|
823
690
|
|
691
|
+
module Squib::QueryMethodsReturningAssociationRelation
|
824
692
|
sig { returns(Squib::ActiveRecord_AssociationRelation) }
|
825
693
|
def all; end
|
826
694
|
|
827
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Squib::
|
695
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
828
696
|
def unscoped(&block); end
|
829
697
|
|
830
698
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
@@ -905,15 +773,15 @@ class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associati
|
|
905
773
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
|
906
774
|
def extending(*args, &block); end
|
907
775
|
|
908
|
-
sig
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
def
|
776
|
+
sig do
|
777
|
+
params(
|
778
|
+
of: T.nilable(Integer),
|
779
|
+
start: T.nilable(Integer),
|
780
|
+
finish: T.nilable(Integer),
|
781
|
+
load: T.nilable(T::Boolean),
|
782
|
+
error_on_ignore: T.nilable(T::Boolean),
|
783
|
+
block: T.nilable(T.proc.params(e: Squib::ActiveRecord_AssociationRelation).void)
|
784
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
785
|
+
end
|
786
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
919
787
|
end
|