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,12 +249,10 @@ module Squib::GeneratedAttributeMethods
|
|
253
249
|
end
|
254
250
|
|
255
251
|
module Squib::GeneratedAssociationMethods
|
256
|
-
extend T::Sig
|
257
|
-
|
258
252
|
sig { returns(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
|
259
253
|
def hats_attachments; end
|
260
254
|
|
261
|
-
sig { returns(T::Array[
|
255
|
+
sig { returns(T::Array[T.untyped]) }
|
262
256
|
def hats_attachment_ids; end
|
263
257
|
|
264
258
|
sig { params(value: T::Enumerable[::ActiveStorage::Attachment]).void }
|
@@ -267,7 +261,7 @@ module Squib::GeneratedAssociationMethods
|
|
267
261
|
sig { returns(::ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy) }
|
268
262
|
def hats_blobs; end
|
269
263
|
|
270
|
-
sig { returns(T::Array[
|
264
|
+
sig { returns(T::Array[T.untyped]) }
|
271
265
|
def hats_blob_ids; end
|
272
266
|
|
273
267
|
sig { params(value: T::Enumerable[::ActiveStorage::Blob]).void }
|
@@ -276,18 +270,45 @@ module Squib::GeneratedAssociationMethods
|
|
276
270
|
sig { returns(T.nilable(::School)) }
|
277
271
|
def school; end
|
278
272
|
|
273
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
|
274
|
+
def build_school(*args, &block); end
|
275
|
+
|
276
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
|
277
|
+
def create_school(*args, &block); end
|
278
|
+
|
279
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
|
280
|
+
def create_school!(*args, &block); end
|
281
|
+
|
279
282
|
sig { params(value: T.nilable(::School)).void }
|
280
283
|
def school=(value); end
|
281
284
|
|
282
285
|
sig { returns(T.nilable(::ActiveStorage::Attachment)) }
|
283
286
|
def school_photo_attachment; end
|
284
287
|
|
288
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
|
289
|
+
def build_school_photo_attachment(*args, &block); end
|
290
|
+
|
291
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
|
292
|
+
def create_school_photo_attachment(*args, &block); end
|
293
|
+
|
294
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
|
295
|
+
def create_school_photo_attachment!(*args, &block); end
|
296
|
+
|
285
297
|
sig { params(value: T.nilable(::ActiveStorage::Attachment)).void }
|
286
298
|
def school_photo_attachment=(value); end
|
287
299
|
|
288
300
|
sig { returns(T.nilable(::ActiveStorage::Blob)) }
|
289
301
|
def school_photo_blob; end
|
290
302
|
|
303
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
|
304
|
+
def build_school_photo_blob(*args, &block); end
|
305
|
+
|
306
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
|
307
|
+
def create_school_photo_blob(*args, &block); end
|
308
|
+
|
309
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
|
310
|
+
def create_school_photo_blob!(*args, &block); end
|
311
|
+
|
291
312
|
sig { params(value: T.nilable(::ActiveStorage::Blob)).void }
|
292
313
|
def school_photo_blob=(value); end
|
293
314
|
|
@@ -312,6 +333,15 @@ module Squib::GeneratedAssociationMethods
|
|
312
333
|
sig { returns(T.nilable(::Wand)) }
|
313
334
|
def wand; end
|
314
335
|
|
336
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
337
|
+
def build_wand(*args, &block); end
|
338
|
+
|
339
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
340
|
+
def create_wand(*args, &block); end
|
341
|
+
|
342
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
343
|
+
def create_wand!(*args, &block); end
|
344
|
+
|
315
345
|
sig { params(value: T.nilable(::Wand)).void }
|
316
346
|
def wand=(value); end
|
317
347
|
end
|
@@ -338,8 +368,7 @@ class Squib < Wizard
|
|
338
368
|
include Squib::GeneratedAttributeMethods
|
339
369
|
include Squib::GeneratedAssociationMethods
|
340
370
|
extend Squib::CustomFinderMethods
|
341
|
-
extend
|
342
|
-
extend T::Generic
|
371
|
+
extend Squib::QueryMethodsReturningRelation
|
343
372
|
RelationType = T.type_alias { T.any(Squib::ActiveRecord_Relation, Squib::ActiveRecord_Associations_CollectionProxy, Squib::ActiveRecord_AssociationRelation) }
|
344
373
|
|
345
374
|
sig { returns(T::Hash[T.any(String, Symbol), String]) }
|
@@ -419,100 +448,12 @@ class Squib < Wizard
|
|
419
448
|
|
420
449
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
421
450
|
def self.with_attached_school_photo(*args); end
|
422
|
-
|
423
|
-
sig { returns(Squib::ActiveRecord_Relation) }
|
424
|
-
def self.all; end
|
425
|
-
|
426
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
427
|
-
def self.unscoped(&block); end
|
428
|
-
|
429
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
430
|
-
def self.select(*args); end
|
431
|
-
|
432
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
433
|
-
def self.order(*args); end
|
434
|
-
|
435
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
436
|
-
def self.reorder(*args); end
|
437
|
-
|
438
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
439
|
-
def self.group(*args); end
|
440
|
-
|
441
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
442
|
-
def self.limit(*args); end
|
443
|
-
|
444
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
445
|
-
def self.offset(*args); end
|
446
|
-
|
447
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
448
|
-
def self.joins(*args); end
|
449
|
-
|
450
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
451
|
-
def self.left_joins(*args); end
|
452
|
-
|
453
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
454
|
-
def self.left_outer_joins(*args); end
|
455
|
-
|
456
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
457
|
-
def self.where(*args); end
|
458
|
-
|
459
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
460
|
-
def self.rewhere(*args); end
|
461
|
-
|
462
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
463
|
-
def self.preload(*args); end
|
464
|
-
|
465
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
466
|
-
def self.eager_load(*args); end
|
467
|
-
|
468
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
469
|
-
def self.includes(*args); end
|
470
|
-
|
471
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
472
|
-
def self.from(*args); end
|
473
|
-
|
474
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
475
|
-
def self.lock(*args); end
|
476
|
-
|
477
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
478
|
-
def self.readonly(*args); end
|
479
|
-
|
480
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
481
|
-
def self.or(*args); end
|
482
|
-
|
483
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
484
|
-
def self.having(*args); end
|
485
|
-
|
486
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
487
|
-
def self.create_with(*args); end
|
488
|
-
|
489
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
490
|
-
def self.distinct(*args); end
|
491
|
-
|
492
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
493
|
-
def self.references(*args); end
|
494
|
-
|
495
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
496
|
-
def self.none(*args); end
|
497
|
-
|
498
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
499
|
-
def self.unscope(*args); end
|
500
|
-
|
501
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
502
|
-
def self.merge(*args); end
|
503
|
-
|
504
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
505
|
-
def self.except(*args); end
|
506
|
-
|
507
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
508
|
-
def self.extending(*args, &block); end
|
509
451
|
end
|
510
452
|
|
511
453
|
class Squib::ActiveRecord_Relation < ActiveRecord::Relation
|
512
454
|
include Squib::ActiveRelation_WhereNot
|
513
455
|
include Squib::CustomFinderMethods
|
514
|
-
|
515
|
-
extend T::Generic
|
456
|
+
include Squib::QueryMethodsReturningRelation
|
516
457
|
Elem = type_member(fixed: Squib)
|
517
458
|
|
518
459
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
@@ -574,100 +515,78 @@ class Squib::ActiveRecord_Relation < ActiveRecord::Relation
|
|
574
515
|
|
575
516
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
576
517
|
def with_attached_school_photo(*args); end
|
518
|
+
end
|
577
519
|
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
585
|
-
def select(*args); end
|
586
|
-
|
587
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
588
|
-
def order(*args); end
|
589
|
-
|
590
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
591
|
-
def reorder(*args); end
|
592
|
-
|
593
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
594
|
-
def group(*args); end
|
595
|
-
|
596
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
597
|
-
def limit(*args); end
|
598
|
-
|
599
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
600
|
-
def offset(*args); end
|
601
|
-
|
602
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
603
|
-
def joins(*args); end
|
520
|
+
class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
521
|
+
include Squib::ActiveRelation_WhereNot
|
522
|
+
include Squib::CustomFinderMethods
|
523
|
+
include Squib::QueryMethodsReturningAssociationRelation
|
524
|
+
Elem = type_member(fixed: Squib)
|
604
525
|
|
605
|
-
sig { params(args: T.untyped).returns(Squib::
|
606
|
-
def
|
526
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
527
|
+
def Gryffindor(*args); end
|
607
528
|
|
608
|
-
sig { params(args: T.untyped).returns(Squib::
|
609
|
-
def
|
529
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
530
|
+
def Hagrid(*args); end
|
610
531
|
|
611
|
-
sig { params(args: T.untyped).returns(Squib::
|
612
|
-
def
|
532
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
533
|
+
def Hufflepuff(*args); end
|
613
534
|
|
614
|
-
sig { params(args: T.untyped).returns(Squib::
|
615
|
-
def
|
535
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
536
|
+
def Ravenclaw(*args); end
|
616
537
|
|
617
|
-
sig { params(args: T.untyped).returns(Squib::
|
618
|
-
def
|
538
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
539
|
+
def Slytherin(*args); end
|
619
540
|
|
620
|
-
sig { params(args: T.untyped).returns(Squib::
|
621
|
-
def
|
541
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
542
|
+
def black_hair(*args); end
|
622
543
|
|
623
|
-
sig { params(args: T.untyped).returns(Squib::
|
624
|
-
def
|
544
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
545
|
+
def blonde_hair(*args); end
|
625
546
|
|
626
|
-
sig { params(args: T.untyped).returns(Squib::
|
627
|
-
def
|
547
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
548
|
+
def broom_firebolt(*args); end
|
628
549
|
|
629
|
-
sig { params(args: T.untyped).returns(Squib::
|
630
|
-
def
|
550
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
551
|
+
def broom_nimbus(*args); end
|
631
552
|
|
632
|
-
sig { params(args: T.untyped).returns(Squib::
|
633
|
-
def
|
553
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
554
|
+
def brown_hair(*args); end
|
634
555
|
|
635
|
-
sig { params(args: T.untyped).returns(Squib::
|
636
|
-
def
|
556
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
557
|
+
def color_blue_eyes(*args); end
|
637
558
|
|
638
|
-
sig { params(args: T.untyped).returns(Squib::
|
639
|
-
def
|
559
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
560
|
+
def color_brown_eyes(*args); end
|
640
561
|
|
641
|
-
sig { params(args: T.untyped).returns(Squib::
|
642
|
-
def
|
562
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
563
|
+
def color_green_eyes(*args); end
|
643
564
|
|
644
|
-
sig { params(args: T.untyped).returns(Squib::
|
645
|
-
def
|
565
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
566
|
+
def quidditch_beater(*args); end
|
646
567
|
|
647
|
-
sig { params(args: T.untyped).returns(Squib::
|
648
|
-
def
|
568
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
569
|
+
def quidditch_chaser(*args); end
|
649
570
|
|
650
|
-
sig { params(args: T.untyped).returns(Squib::
|
651
|
-
def
|
571
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
572
|
+
def quidditch_keeper(*args); end
|
652
573
|
|
653
|
-
sig { params(args: T.untyped).returns(Squib::
|
654
|
-
def
|
574
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
575
|
+
def quidditch_seeker(*args); end
|
655
576
|
|
656
|
-
sig { params(args: T.untyped).returns(Squib::
|
657
|
-
def
|
577
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
578
|
+
def recent(*args); end
|
658
579
|
|
659
|
-
sig { params(args: T.untyped).returns(Squib::
|
660
|
-
def
|
580
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
581
|
+
def with_attached_hats(*args); end
|
661
582
|
|
662
|
-
sig { params(args: T.untyped
|
663
|
-
def
|
583
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
584
|
+
def with_attached_school_photo(*args); end
|
664
585
|
end
|
665
586
|
|
666
|
-
class Squib::
|
667
|
-
include Squib::ActiveRelation_WhereNot
|
587
|
+
class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
668
588
|
include Squib::CustomFinderMethods
|
669
|
-
|
670
|
-
extend T::Generic
|
589
|
+
include Squib::QueryMethodsReturningAssociationRelation
|
671
590
|
Elem = type_member(fixed: Squib)
|
672
591
|
|
673
592
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
@@ -730,164 +649,125 @@ class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelatio
|
|
730
649
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
731
650
|
def with_attached_school_photo(*args); end
|
732
651
|
|
733
|
-
sig {
|
652
|
+
sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
|
653
|
+
def <<(*records); end
|
654
|
+
|
655
|
+
sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
|
656
|
+
def append(*records); end
|
657
|
+
|
658
|
+
sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
|
659
|
+
def push(*records); end
|
660
|
+
|
661
|
+
sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
|
662
|
+
def concat(*records); end
|
663
|
+
end
|
664
|
+
|
665
|
+
module Squib::QueryMethodsReturningRelation
|
666
|
+
sig { returns(Squib::ActiveRecord_Relation) }
|
734
667
|
def all; end
|
735
668
|
|
736
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Squib::
|
669
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
737
670
|
def unscoped(&block); end
|
738
671
|
|
739
|
-
sig { params(args: T.untyped).returns(Squib::
|
672
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
740
673
|
def select(*args); end
|
741
674
|
|
742
|
-
sig { params(args: T.untyped).returns(Squib::
|
675
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
743
676
|
def order(*args); end
|
744
677
|
|
745
|
-
sig { params(args: T.untyped).returns(Squib::
|
678
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
746
679
|
def reorder(*args); end
|
747
680
|
|
748
|
-
sig { params(args: T.untyped).returns(Squib::
|
681
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
749
682
|
def group(*args); end
|
750
683
|
|
751
|
-
sig { params(args: T.untyped).returns(Squib::
|
684
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
752
685
|
def limit(*args); end
|
753
686
|
|
754
|
-
sig { params(args: T.untyped).returns(Squib::
|
687
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
755
688
|
def offset(*args); end
|
756
689
|
|
757
|
-
sig { params(args: T.untyped).returns(Squib::
|
690
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
758
691
|
def joins(*args); end
|
759
692
|
|
760
|
-
sig { params(args: T.untyped).returns(Squib::
|
693
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
761
694
|
def left_joins(*args); end
|
762
695
|
|
763
|
-
sig { params(args: T.untyped).returns(Squib::
|
696
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
764
697
|
def left_outer_joins(*args); end
|
765
698
|
|
766
|
-
sig { params(args: T.untyped).returns(Squib::
|
699
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
767
700
|
def where(*args); end
|
768
701
|
|
769
|
-
sig { params(args: T.untyped).returns(Squib::
|
702
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
770
703
|
def rewhere(*args); end
|
771
704
|
|
772
|
-
sig { params(args: T.untyped).returns(Squib::
|
705
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
773
706
|
def preload(*args); end
|
774
707
|
|
775
|
-
sig { params(args: T.untyped).returns(Squib::
|
708
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
776
709
|
def eager_load(*args); end
|
777
710
|
|
778
|
-
sig { params(args: T.untyped).returns(Squib::
|
711
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
779
712
|
def includes(*args); end
|
780
713
|
|
781
|
-
sig { params(args: T.untyped).returns(Squib::
|
714
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
782
715
|
def from(*args); end
|
783
716
|
|
784
|
-
sig { params(args: T.untyped).returns(Squib::
|
717
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
785
718
|
def lock(*args); end
|
786
719
|
|
787
|
-
sig { params(args: T.untyped).returns(Squib::
|
720
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
788
721
|
def readonly(*args); end
|
789
722
|
|
790
|
-
sig { params(args: T.untyped).returns(Squib::
|
723
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
791
724
|
def or(*args); end
|
792
725
|
|
793
|
-
sig { params(args: T.untyped).returns(Squib::
|
726
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
794
727
|
def having(*args); end
|
795
728
|
|
796
|
-
sig { params(args: T.untyped).returns(Squib::
|
729
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
797
730
|
def create_with(*args); end
|
798
731
|
|
799
|
-
sig { params(args: T.untyped).returns(Squib::
|
732
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
800
733
|
def distinct(*args); end
|
801
734
|
|
802
|
-
sig { params(args: T.untyped).returns(Squib::
|
735
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
803
736
|
def references(*args); end
|
804
737
|
|
805
|
-
sig { params(args: T.untyped).returns(Squib::
|
738
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
806
739
|
def none(*args); end
|
807
740
|
|
808
|
-
sig { params(args: T.untyped).returns(Squib::
|
741
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
809
742
|
def unscope(*args); end
|
810
743
|
|
811
|
-
sig { params(args: T.untyped).returns(Squib::
|
744
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
812
745
|
def merge(*args); end
|
813
746
|
|
814
|
-
sig { params(args: T.untyped).returns(Squib::
|
747
|
+
sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
|
815
748
|
def except(*args); end
|
816
749
|
|
817
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::
|
750
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
818
751
|
def extending(*args, &block); end
|
819
|
-
end
|
820
|
-
|
821
|
-
class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
822
|
-
include Squib::CustomFinderMethods
|
823
|
-
extend T::Sig
|
824
|
-
extend T::Generic
|
825
|
-
Elem = type_member(fixed: Squib)
|
826
|
-
|
827
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
828
|
-
def Gryffindor(*args); end
|
829
|
-
|
830
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
831
|
-
def Hagrid(*args); end
|
832
|
-
|
833
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
834
|
-
def Hufflepuff(*args); end
|
835
|
-
|
836
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
837
|
-
def Ravenclaw(*args); end
|
838
|
-
|
839
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
840
|
-
def Slytherin(*args); end
|
841
|
-
|
842
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
843
|
-
def black_hair(*args); end
|
844
|
-
|
845
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
846
|
-
def blonde_hair(*args); end
|
847
|
-
|
848
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
849
|
-
def broom_firebolt(*args); end
|
850
|
-
|
851
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
852
|
-
def broom_nimbus(*args); end
|
853
|
-
|
854
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
855
|
-
def brown_hair(*args); end
|
856
752
|
|
857
|
-
sig
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
def
|
868
|
-
|
869
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
870
|
-
def quidditch_chaser(*args); end
|
871
|
-
|
872
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
873
|
-
def quidditch_keeper(*args); end
|
874
|
-
|
875
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
876
|
-
def quidditch_seeker(*args); end
|
877
|
-
|
878
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
879
|
-
def recent(*args); end
|
880
|
-
|
881
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
882
|
-
def with_attached_hats(*args); end
|
883
|
-
|
884
|
-
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
885
|
-
def with_attached_school_photo(*args); end
|
753
|
+
sig do
|
754
|
+
params(
|
755
|
+
of: T.nilable(Integer),
|
756
|
+
start: T.nilable(Integer),
|
757
|
+
finish: T.nilable(Integer),
|
758
|
+
load: T.nilable(T::Boolean),
|
759
|
+
error_on_ignore: T.nilable(T::Boolean),
|
760
|
+
block: T.nilable(T.proc.params(e: Squib::ActiveRecord_Relation).void)
|
761
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
762
|
+
end
|
763
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
764
|
+
end
|
886
765
|
|
766
|
+
module Squib::QueryMethodsReturningAssociationRelation
|
887
767
|
sig { returns(Squib::ActiveRecord_AssociationRelation) }
|
888
768
|
def all; end
|
889
769
|
|
890
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Squib::
|
770
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
891
771
|
def unscoped(&block); end
|
892
772
|
|
893
773
|
sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
|
@@ -971,15 +851,15 @@ class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associati
|
|
971
851
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
|
972
852
|
def extending(*args, &block); end
|
973
853
|
|
974
|
-
sig
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
def
|
854
|
+
sig do
|
855
|
+
params(
|
856
|
+
of: T.nilable(Integer),
|
857
|
+
start: T.nilable(Integer),
|
858
|
+
finish: T.nilable(Integer),
|
859
|
+
load: T.nilable(T::Boolean),
|
860
|
+
error_on_ignore: T.nilable(T::Boolean),
|
861
|
+
block: T.nilable(T.proc.params(e: Squib::ActiveRecord_AssociationRelation).void)
|
862
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
863
|
+
end
|
864
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
985
865
|
end
|