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
@@ -8,8 +8,6 @@ module ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module ActiveRecord::SchemaMigration::GeneratedAttributeMethods
|
11
|
-
extend T::Sig
|
12
|
-
|
13
11
|
sig { returns(String) }
|
14
12
|
def version; end
|
15
13
|
|
@@ -40,102 +38,11 @@ end
|
|
40
38
|
class ActiveRecord::SchemaMigration < ActiveRecord::Base
|
41
39
|
include ActiveRecord::SchemaMigration::GeneratedAttributeMethods
|
42
40
|
extend ActiveRecord::SchemaMigration::CustomFinderMethods
|
43
|
-
extend
|
44
|
-
extend T::Generic
|
41
|
+
extend ActiveRecord::SchemaMigration::QueryMethodsReturningRelation
|
45
42
|
RelationType = T.type_alias { T.any(ActiveRecord::SchemaMigration::ActiveRecord_Relation, ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy, ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
46
|
-
|
47
|
-
sig { returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
48
|
-
def self.all; end
|
49
|
-
|
50
|
-
sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
51
|
-
def self.unscoped(&block); end
|
52
|
-
|
53
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
54
|
-
def self.select(*args); end
|
55
|
-
|
56
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
57
|
-
def self.order(*args); end
|
58
|
-
|
59
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
60
|
-
def self.reorder(*args); end
|
61
|
-
|
62
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
63
|
-
def self.group(*args); end
|
64
|
-
|
65
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
66
|
-
def self.limit(*args); end
|
67
|
-
|
68
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
69
|
-
def self.offset(*args); end
|
70
|
-
|
71
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
72
|
-
def self.joins(*args); end
|
73
|
-
|
74
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
75
|
-
def self.left_joins(*args); end
|
76
|
-
|
77
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
78
|
-
def self.left_outer_joins(*args); end
|
79
|
-
|
80
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
81
|
-
def self.where(*args); end
|
82
|
-
|
83
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
84
|
-
def self.rewhere(*args); end
|
85
|
-
|
86
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
87
|
-
def self.preload(*args); end
|
88
|
-
|
89
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
90
|
-
def self.eager_load(*args); end
|
91
|
-
|
92
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
93
|
-
def self.includes(*args); end
|
94
|
-
|
95
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
96
|
-
def self.from(*args); end
|
97
|
-
|
98
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
99
|
-
def self.lock(*args); end
|
100
|
-
|
101
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
102
|
-
def self.readonly(*args); end
|
103
|
-
|
104
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
105
|
-
def self.or(*args); end
|
106
|
-
|
107
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
108
|
-
def self.having(*args); end
|
109
|
-
|
110
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
111
|
-
def self.create_with(*args); end
|
112
|
-
|
113
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
114
|
-
def self.distinct(*args); end
|
115
|
-
|
116
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
117
|
-
def self.references(*args); end
|
118
|
-
|
119
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
120
|
-
def self.none(*args); end
|
121
|
-
|
122
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
123
|
-
def self.unscope(*args); end
|
124
|
-
|
125
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
126
|
-
def self.except(*args); end
|
127
|
-
|
128
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
129
|
-
def self.extending(*args, &block); end
|
130
43
|
end
|
131
44
|
|
132
|
-
|
133
|
-
include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
|
134
|
-
include ActiveRecord::SchemaMigration::CustomFinderMethods
|
135
|
-
extend T::Sig
|
136
|
-
extend T::Generic
|
137
|
-
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
138
|
-
|
45
|
+
module ActiveRecord::SchemaMigration::QueryMethodsReturningRelation
|
139
46
|
sig { returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
140
47
|
def all; end
|
141
48
|
|
@@ -219,19 +126,25 @@ class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ActiveRecord::Relat
|
|
219
126
|
|
220
127
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
221
128
|
def extending(*args, &block); end
|
222
|
-
end
|
223
129
|
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
130
|
+
sig do
|
131
|
+
params(
|
132
|
+
of: T.nilable(Integer),
|
133
|
+
start: T.nilable(Integer),
|
134
|
+
finish: T.nilable(Integer),
|
135
|
+
load: T.nilable(T::Boolean),
|
136
|
+
error_on_ignore: T.nilable(T::Boolean),
|
137
|
+
block: T.nilable(T.proc.params(e: ActiveRecord::SchemaMigration::ActiveRecord_Relation).void)
|
138
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
139
|
+
end
|
140
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
141
|
+
end
|
230
142
|
|
143
|
+
module ActiveRecord::SchemaMigration::QueryMethodsReturningAssociationRelation
|
231
144
|
sig { returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
232
145
|
def all; end
|
233
146
|
|
234
|
-
sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::
|
147
|
+
sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
235
148
|
def unscoped(&block); end
|
236
149
|
|
237
150
|
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
@@ -311,97 +224,38 @@ class ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation < ActiveRe
|
|
311
224
|
|
312
225
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
313
226
|
def extending(*args, &block); end
|
227
|
+
|
228
|
+
sig do
|
229
|
+
params(
|
230
|
+
of: T.nilable(Integer),
|
231
|
+
start: T.nilable(Integer),
|
232
|
+
finish: T.nilable(Integer),
|
233
|
+
load: T.nilable(T::Boolean),
|
234
|
+
error_on_ignore: T.nilable(T::Boolean),
|
235
|
+
block: T.nilable(T.proc.params(e: ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation).void)
|
236
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
237
|
+
end
|
238
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
314
239
|
end
|
315
240
|
|
316
|
-
class ActiveRecord::SchemaMigration::
|
241
|
+
class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ActiveRecord::Relation
|
242
|
+
include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
|
317
243
|
include ActiveRecord::SchemaMigration::CustomFinderMethods
|
318
|
-
|
319
|
-
extend T::Generic
|
244
|
+
include ActiveRecord::SchemaMigration::QueryMethodsReturningRelation
|
320
245
|
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
246
|
+
end
|
321
247
|
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
329
|
-
def select(*args); end
|
330
|
-
|
331
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
332
|
-
def order(*args); end
|
333
|
-
|
334
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
335
|
-
def reorder(*args); end
|
336
|
-
|
337
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
338
|
-
def group(*args); end
|
339
|
-
|
340
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
341
|
-
def limit(*args); end
|
342
|
-
|
343
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
344
|
-
def offset(*args); end
|
345
|
-
|
346
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
347
|
-
def joins(*args); end
|
348
|
-
|
349
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
350
|
-
def left_joins(*args); end
|
351
|
-
|
352
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
353
|
-
def left_outer_joins(*args); end
|
354
|
-
|
355
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
356
|
-
def where(*args); end
|
357
|
-
|
358
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
359
|
-
def rewhere(*args); end
|
360
|
-
|
361
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
362
|
-
def preload(*args); end
|
363
|
-
|
364
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
365
|
-
def eager_load(*args); end
|
366
|
-
|
367
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
368
|
-
def includes(*args); end
|
369
|
-
|
370
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
371
|
-
def from(*args); end
|
372
|
-
|
373
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
374
|
-
def lock(*args); end
|
375
|
-
|
376
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
377
|
-
def readonly(*args); end
|
378
|
-
|
379
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
380
|
-
def or(*args); end
|
381
|
-
|
382
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
383
|
-
def having(*args); end
|
384
|
-
|
385
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
386
|
-
def create_with(*args); end
|
387
|
-
|
388
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
389
|
-
def distinct(*args); end
|
390
|
-
|
391
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
392
|
-
def references(*args); end
|
393
|
-
|
394
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
395
|
-
def none(*args); end
|
396
|
-
|
397
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
398
|
-
def unscope(*args); end
|
399
|
-
|
400
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
401
|
-
def except(*args); end
|
248
|
+
class ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
249
|
+
include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
|
250
|
+
include ActiveRecord::SchemaMigration::CustomFinderMethods
|
251
|
+
include ActiveRecord::SchemaMigration::QueryMethodsReturningAssociationRelation
|
252
|
+
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
253
|
+
end
|
402
254
|
|
403
|
-
|
404
|
-
|
255
|
+
class ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
256
|
+
include ActiveRecord::SchemaMigration::CustomFinderMethods
|
257
|
+
include ActiveRecord::SchemaMigration::QueryMethodsReturningAssociationRelation
|
258
|
+
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
405
259
|
|
406
260
|
sig { params(records: T.any(ActiveRecord::SchemaMigration, T::Array[ActiveRecord::SchemaMigration])).returns(T.self_type) }
|
407
261
|
def <<(*records); end
|
@@ -8,8 +8,6 @@ module School::ActiveRelation_WhereNot
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module School::GeneratedAttributeMethods
|
11
|
-
extend T::Sig
|
12
|
-
|
13
11
|
sig { returns(Integer) }
|
14
12
|
def id; end
|
15
13
|
|
@@ -30,11 +28,18 @@ module School::GeneratedAttributeMethods
|
|
30
28
|
end
|
31
29
|
|
32
30
|
module School::GeneratedAssociationMethods
|
33
|
-
extend T::Sig
|
34
|
-
|
35
31
|
sig { returns(::Headmaster) }
|
36
32
|
def headmaster; end
|
37
33
|
|
34
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) }
|
35
|
+
def build_headmaster(*args, &block); end
|
36
|
+
|
37
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) }
|
38
|
+
def create_headmaster(*args, &block); end
|
39
|
+
|
40
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) }
|
41
|
+
def create_headmaster!(*args, &block); end
|
42
|
+
|
38
43
|
sig { params(value: ::Headmaster).void }
|
39
44
|
def headmaster=(value); end
|
40
45
|
end
|
@@ -60,102 +65,11 @@ class School < ApplicationRecord
|
|
60
65
|
include School::GeneratedAttributeMethods
|
61
66
|
include School::GeneratedAssociationMethods
|
62
67
|
extend School::CustomFinderMethods
|
63
|
-
extend
|
64
|
-
extend T::Generic
|
68
|
+
extend School::QueryMethodsReturningRelation
|
65
69
|
RelationType = T.type_alias { T.any(School::ActiveRecord_Relation, School::ActiveRecord_Associations_CollectionProxy, School::ActiveRecord_AssociationRelation) }
|
66
|
-
|
67
|
-
sig { returns(School::ActiveRecord_Relation) }
|
68
|
-
def self.all; end
|
69
|
-
|
70
|
-
sig { params(block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
71
|
-
def self.unscoped(&block); end
|
72
|
-
|
73
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
74
|
-
def self.select(*args); end
|
75
|
-
|
76
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
77
|
-
def self.order(*args); end
|
78
|
-
|
79
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
80
|
-
def self.reorder(*args); end
|
81
|
-
|
82
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
83
|
-
def self.group(*args); end
|
84
|
-
|
85
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
86
|
-
def self.limit(*args); end
|
87
|
-
|
88
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
89
|
-
def self.offset(*args); end
|
90
|
-
|
91
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
92
|
-
def self.joins(*args); end
|
93
|
-
|
94
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
95
|
-
def self.left_joins(*args); end
|
96
|
-
|
97
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
98
|
-
def self.left_outer_joins(*args); end
|
99
|
-
|
100
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
101
|
-
def self.where(*args); end
|
102
|
-
|
103
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
104
|
-
def self.rewhere(*args); end
|
105
|
-
|
106
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
107
|
-
def self.preload(*args); end
|
108
|
-
|
109
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
110
|
-
def self.eager_load(*args); end
|
111
|
-
|
112
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
113
|
-
def self.includes(*args); end
|
114
|
-
|
115
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
116
|
-
def self.from(*args); end
|
117
|
-
|
118
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
119
|
-
def self.lock(*args); end
|
120
|
-
|
121
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
122
|
-
def self.readonly(*args); end
|
123
|
-
|
124
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
125
|
-
def self.or(*args); end
|
126
|
-
|
127
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
128
|
-
def self.having(*args); end
|
129
|
-
|
130
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
131
|
-
def self.create_with(*args); end
|
132
|
-
|
133
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
134
|
-
def self.distinct(*args); end
|
135
|
-
|
136
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
137
|
-
def self.references(*args); end
|
138
|
-
|
139
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
140
|
-
def self.none(*args); end
|
141
|
-
|
142
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
143
|
-
def self.unscope(*args); end
|
144
|
-
|
145
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
146
|
-
def self.except(*args); end
|
147
|
-
|
148
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
149
|
-
def self.extending(*args, &block); end
|
150
70
|
end
|
151
71
|
|
152
|
-
|
153
|
-
include School::ActiveRelation_WhereNot
|
154
|
-
include School::CustomFinderMethods
|
155
|
-
extend T::Sig
|
156
|
-
extend T::Generic
|
157
|
-
Elem = type_member(fixed: School)
|
158
|
-
|
72
|
+
module School::QueryMethodsReturningRelation
|
159
73
|
sig { returns(School::ActiveRecord_Relation) }
|
160
74
|
def all; end
|
161
75
|
|
@@ -239,19 +153,25 @@ class School::ActiveRecord_Relation < ActiveRecord::Relation
|
|
239
153
|
|
240
154
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
241
155
|
def extending(*args, &block); end
|
242
|
-
end
|
243
156
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
157
|
+
sig do
|
158
|
+
params(
|
159
|
+
of: T.nilable(Integer),
|
160
|
+
start: T.nilable(Integer),
|
161
|
+
finish: T.nilable(Integer),
|
162
|
+
load: T.nilable(T::Boolean),
|
163
|
+
error_on_ignore: T.nilable(T::Boolean),
|
164
|
+
block: T.nilable(T.proc.params(e: School::ActiveRecord_Relation).void)
|
165
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
166
|
+
end
|
167
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
168
|
+
end
|
250
169
|
|
170
|
+
module School::QueryMethodsReturningAssociationRelation
|
251
171
|
sig { returns(School::ActiveRecord_AssociationRelation) }
|
252
172
|
def all; end
|
253
173
|
|
254
|
-
sig { params(block: T.nilable(T.proc.void)).returns(School::
|
174
|
+
sig { params(block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
255
175
|
def unscoped(&block); end
|
256
176
|
|
257
177
|
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
@@ -331,97 +251,38 @@ class School::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
|
|
331
251
|
|
332
252
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_AssociationRelation) }
|
333
253
|
def extending(*args, &block); end
|
254
|
+
|
255
|
+
sig do
|
256
|
+
params(
|
257
|
+
of: T.nilable(Integer),
|
258
|
+
start: T.nilable(Integer),
|
259
|
+
finish: T.nilable(Integer),
|
260
|
+
load: T.nilable(T::Boolean),
|
261
|
+
error_on_ignore: T.nilable(T::Boolean),
|
262
|
+
block: T.nilable(T.proc.params(e: School::ActiveRecord_AssociationRelation).void)
|
263
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
264
|
+
end
|
265
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
334
266
|
end
|
335
267
|
|
336
|
-
class School::
|
268
|
+
class School::ActiveRecord_Relation < ActiveRecord::Relation
|
269
|
+
include School::ActiveRelation_WhereNot
|
337
270
|
include School::CustomFinderMethods
|
338
|
-
|
339
|
-
extend T::Generic
|
271
|
+
include School::QueryMethodsReturningRelation
|
340
272
|
Elem = type_member(fixed: School)
|
273
|
+
end
|
341
274
|
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
349
|
-
def select(*args); end
|
350
|
-
|
351
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
352
|
-
def order(*args); end
|
353
|
-
|
354
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
355
|
-
def reorder(*args); end
|
356
|
-
|
357
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
358
|
-
def group(*args); end
|
359
|
-
|
360
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
361
|
-
def limit(*args); end
|
362
|
-
|
363
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
364
|
-
def offset(*args); end
|
365
|
-
|
366
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
367
|
-
def joins(*args); end
|
368
|
-
|
369
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
370
|
-
def left_joins(*args); end
|
371
|
-
|
372
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
373
|
-
def left_outer_joins(*args); end
|
374
|
-
|
375
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
376
|
-
def where(*args); end
|
377
|
-
|
378
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
379
|
-
def rewhere(*args); end
|
380
|
-
|
381
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
382
|
-
def preload(*args); end
|
383
|
-
|
384
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
385
|
-
def eager_load(*args); end
|
386
|
-
|
387
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
388
|
-
def includes(*args); end
|
389
|
-
|
390
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
391
|
-
def from(*args); end
|
392
|
-
|
393
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
394
|
-
def lock(*args); end
|
395
|
-
|
396
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
397
|
-
def readonly(*args); end
|
398
|
-
|
399
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
400
|
-
def or(*args); end
|
401
|
-
|
402
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
403
|
-
def having(*args); end
|
404
|
-
|
405
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
406
|
-
def create_with(*args); end
|
407
|
-
|
408
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
409
|
-
def distinct(*args); end
|
410
|
-
|
411
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
412
|
-
def references(*args); end
|
413
|
-
|
414
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
415
|
-
def none(*args); end
|
416
|
-
|
417
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
418
|
-
def unscope(*args); end
|
419
|
-
|
420
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
421
|
-
def except(*args); end
|
275
|
+
class School::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
276
|
+
include School::ActiveRelation_WhereNot
|
277
|
+
include School::CustomFinderMethods
|
278
|
+
include School::QueryMethodsReturningAssociationRelation
|
279
|
+
Elem = type_member(fixed: School)
|
280
|
+
end
|
422
281
|
|
423
|
-
|
424
|
-
|
282
|
+
class School::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
283
|
+
include School::CustomFinderMethods
|
284
|
+
include School::QueryMethodsReturningAssociationRelation
|
285
|
+
Elem = type_member(fixed: School)
|
425
286
|
|
426
287
|
sig { params(records: T.any(School, T::Array[School])).returns(T.self_type) }
|
427
288
|
def <<(*records); end
|