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 Subject::ActiveRelation_WhereNot
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module Subject::GeneratedAttributeMethods
|
11
|
-
extend T::Sig
|
12
|
-
|
13
11
|
sig { returns(Integer) }
|
14
12
|
def id; end
|
15
13
|
|
@@ -30,8 +28,6 @@ module Subject::GeneratedAttributeMethods
|
|
30
28
|
end
|
31
29
|
|
32
30
|
module Subject::GeneratedAssociationMethods
|
33
|
-
extend T::Sig
|
34
|
-
|
35
31
|
sig { returns(::Wizard::ActiveRecord_Associations_CollectionProxy) }
|
36
32
|
def wizards; end
|
37
33
|
|
@@ -63,102 +59,11 @@ class Subject < ApplicationRecord
|
|
63
59
|
include Subject::GeneratedAttributeMethods
|
64
60
|
include Subject::GeneratedAssociationMethods
|
65
61
|
extend Subject::CustomFinderMethods
|
66
|
-
extend
|
67
|
-
extend T::Generic
|
62
|
+
extend Subject::QueryMethodsReturningRelation
|
68
63
|
RelationType = T.type_alias { T.any(Subject::ActiveRecord_Relation, Subject::ActiveRecord_Associations_CollectionProxy, Subject::ActiveRecord_AssociationRelation) }
|
69
|
-
|
70
|
-
sig { returns(Subject::ActiveRecord_Relation) }
|
71
|
-
def self.all; end
|
72
|
-
|
73
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Subject::ActiveRecord_Relation) }
|
74
|
-
def self.unscoped(&block); end
|
75
|
-
|
76
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
77
|
-
def self.select(*args); end
|
78
|
-
|
79
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
80
|
-
def self.order(*args); end
|
81
|
-
|
82
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
83
|
-
def self.reorder(*args); end
|
84
|
-
|
85
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
86
|
-
def self.group(*args); end
|
87
|
-
|
88
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
89
|
-
def self.limit(*args); end
|
90
|
-
|
91
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
92
|
-
def self.offset(*args); end
|
93
|
-
|
94
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
95
|
-
def self.joins(*args); end
|
96
|
-
|
97
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
98
|
-
def self.left_joins(*args); end
|
99
|
-
|
100
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
101
|
-
def self.left_outer_joins(*args); end
|
102
|
-
|
103
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
104
|
-
def self.where(*args); end
|
105
|
-
|
106
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
107
|
-
def self.rewhere(*args); end
|
108
|
-
|
109
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
110
|
-
def self.preload(*args); end
|
111
|
-
|
112
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
113
|
-
def self.eager_load(*args); end
|
114
|
-
|
115
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
116
|
-
def self.includes(*args); end
|
117
|
-
|
118
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
119
|
-
def self.from(*args); end
|
120
|
-
|
121
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
122
|
-
def self.lock(*args); end
|
123
|
-
|
124
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
125
|
-
def self.readonly(*args); end
|
126
|
-
|
127
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
128
|
-
def self.or(*args); end
|
129
|
-
|
130
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
131
|
-
def self.having(*args); end
|
132
|
-
|
133
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
134
|
-
def self.create_with(*args); end
|
135
|
-
|
136
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
137
|
-
def self.distinct(*args); end
|
138
|
-
|
139
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
140
|
-
def self.references(*args); end
|
141
|
-
|
142
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
143
|
-
def self.none(*args); end
|
144
|
-
|
145
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
146
|
-
def self.unscope(*args); end
|
147
|
-
|
148
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_Relation) }
|
149
|
-
def self.except(*args); end
|
150
|
-
|
151
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::ActiveRecord_Relation) }
|
152
|
-
def self.extending(*args, &block); end
|
153
64
|
end
|
154
65
|
|
155
|
-
|
156
|
-
include Subject::ActiveRelation_WhereNot
|
157
|
-
include Subject::CustomFinderMethods
|
158
|
-
extend T::Sig
|
159
|
-
extend T::Generic
|
160
|
-
Elem = type_member(fixed: Subject)
|
161
|
-
|
66
|
+
module Subject::QueryMethodsReturningRelation
|
162
67
|
sig { returns(Subject::ActiveRecord_Relation) }
|
163
68
|
def all; end
|
164
69
|
|
@@ -242,19 +147,25 @@ class Subject::ActiveRecord_Relation < ActiveRecord::Relation
|
|
242
147
|
|
243
148
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::ActiveRecord_Relation) }
|
244
149
|
def extending(*args, &block); end
|
245
|
-
end
|
246
150
|
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
151
|
+
sig do
|
152
|
+
params(
|
153
|
+
of: T.nilable(Integer),
|
154
|
+
start: T.nilable(Integer),
|
155
|
+
finish: T.nilable(Integer),
|
156
|
+
load: T.nilable(T::Boolean),
|
157
|
+
error_on_ignore: T.nilable(T::Boolean),
|
158
|
+
block: T.nilable(T.proc.params(e: Subject::ActiveRecord_Relation).void)
|
159
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
160
|
+
end
|
161
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
162
|
+
end
|
253
163
|
|
164
|
+
module Subject::QueryMethodsReturningAssociationRelation
|
254
165
|
sig { returns(Subject::ActiveRecord_AssociationRelation) }
|
255
166
|
def all; end
|
256
167
|
|
257
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Subject::
|
168
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Subject::ActiveRecord_Relation) }
|
258
169
|
def unscoped(&block); end
|
259
170
|
|
260
171
|
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
@@ -334,97 +245,38 @@ class Subject::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelat
|
|
334
245
|
|
335
246
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::ActiveRecord_AssociationRelation) }
|
336
247
|
def extending(*args, &block); end
|
248
|
+
|
249
|
+
sig do
|
250
|
+
params(
|
251
|
+
of: T.nilable(Integer),
|
252
|
+
start: T.nilable(Integer),
|
253
|
+
finish: T.nilable(Integer),
|
254
|
+
load: T.nilable(T::Boolean),
|
255
|
+
error_on_ignore: T.nilable(T::Boolean),
|
256
|
+
block: T.nilable(T.proc.params(e: Subject::ActiveRecord_AssociationRelation).void)
|
257
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
258
|
+
end
|
259
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
337
260
|
end
|
338
261
|
|
339
|
-
class Subject::
|
262
|
+
class Subject::ActiveRecord_Relation < ActiveRecord::Relation
|
263
|
+
include Subject::ActiveRelation_WhereNot
|
340
264
|
include Subject::CustomFinderMethods
|
341
|
-
|
342
|
-
extend T::Generic
|
265
|
+
include Subject::QueryMethodsReturningRelation
|
343
266
|
Elem = type_member(fixed: Subject)
|
267
|
+
end
|
344
268
|
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
352
|
-
def select(*args); end
|
353
|
-
|
354
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
355
|
-
def order(*args); end
|
356
|
-
|
357
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
358
|
-
def reorder(*args); end
|
359
|
-
|
360
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
361
|
-
def group(*args); end
|
362
|
-
|
363
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
364
|
-
def limit(*args); end
|
365
|
-
|
366
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
367
|
-
def offset(*args); end
|
368
|
-
|
369
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
370
|
-
def joins(*args); end
|
371
|
-
|
372
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
373
|
-
def left_joins(*args); end
|
374
|
-
|
375
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
376
|
-
def left_outer_joins(*args); end
|
377
|
-
|
378
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
379
|
-
def where(*args); end
|
380
|
-
|
381
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
382
|
-
def rewhere(*args); end
|
383
|
-
|
384
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
385
|
-
def preload(*args); end
|
386
|
-
|
387
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
388
|
-
def eager_load(*args); end
|
389
|
-
|
390
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
391
|
-
def includes(*args); end
|
392
|
-
|
393
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
394
|
-
def from(*args); end
|
395
|
-
|
396
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
397
|
-
def lock(*args); end
|
398
|
-
|
399
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
400
|
-
def readonly(*args); end
|
401
|
-
|
402
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
403
|
-
def or(*args); end
|
404
|
-
|
405
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
406
|
-
def having(*args); end
|
407
|
-
|
408
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
409
|
-
def create_with(*args); end
|
410
|
-
|
411
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
412
|
-
def distinct(*args); end
|
413
|
-
|
414
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
415
|
-
def references(*args); end
|
416
|
-
|
417
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
418
|
-
def none(*args); end
|
419
|
-
|
420
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
421
|
-
def unscope(*args); end
|
422
|
-
|
423
|
-
sig { params(args: T.untyped).returns(Subject::ActiveRecord_AssociationRelation) }
|
424
|
-
def except(*args); end
|
269
|
+
class Subject::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
270
|
+
include Subject::ActiveRelation_WhereNot
|
271
|
+
include Subject::CustomFinderMethods
|
272
|
+
include Subject::QueryMethodsReturningAssociationRelation
|
273
|
+
Elem = type_member(fixed: Subject)
|
274
|
+
end
|
425
275
|
|
426
|
-
|
427
|
-
|
276
|
+
class Subject::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
277
|
+
include Subject::CustomFinderMethods
|
278
|
+
include Subject::QueryMethodsReturningAssociationRelation
|
279
|
+
Elem = type_member(fixed: Subject)
|
428
280
|
|
429
281
|
sig { params(records: T.any(Subject, T::Array[Subject])).returns(T.self_type) }
|
430
282
|
def <<(*records); end
|
@@ -8,8 +8,6 @@ module Subject::HABTM_Wizards::ActiveRelation_WhereNot
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module Subject::HABTM_Wizards::GeneratedAttributeMethods
|
11
|
-
extend T::Sig
|
12
|
-
|
13
11
|
sig { returns(T.nilable(Integer)) }
|
14
12
|
def subject_id; end
|
15
13
|
|
@@ -30,17 +28,33 @@ module Subject::HABTM_Wizards::GeneratedAttributeMethods
|
|
30
28
|
end
|
31
29
|
|
32
30
|
module Subject::HABTM_Wizards::GeneratedAssociationMethods
|
33
|
-
extend T::Sig
|
34
|
-
|
35
31
|
sig { returns(T.nilable(::Subject)) }
|
36
32
|
def left_side; end
|
37
33
|
|
34
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
|
35
|
+
def build_left_side(*args, &block); end
|
36
|
+
|
37
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
|
38
|
+
def create_left_side(*args, &block); end
|
39
|
+
|
40
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
|
41
|
+
def create_left_side!(*args, &block); end
|
42
|
+
|
38
43
|
sig { params(value: T.nilable(::Subject)).void }
|
39
44
|
def left_side=(value); end
|
40
45
|
|
41
46
|
sig { returns(T.nilable(::Wizard)) }
|
42
47
|
def wizard; end
|
43
48
|
|
49
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
|
50
|
+
def build_wizard(*args, &block); end
|
51
|
+
|
52
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
|
53
|
+
def create_wizard(*args, &block); end
|
54
|
+
|
55
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
|
56
|
+
def create_wizard!(*args, &block); end
|
57
|
+
|
44
58
|
sig { params(value: T.nilable(::Wizard)).void }
|
45
59
|
def wizard=(value); end
|
46
60
|
end
|
@@ -66,102 +80,11 @@ class Subject::HABTM_Wizards < ActiveRecord::Base
|
|
66
80
|
include Subject::HABTM_Wizards::GeneratedAttributeMethods
|
67
81
|
include Subject::HABTM_Wizards::GeneratedAssociationMethods
|
68
82
|
extend Subject::HABTM_Wizards::CustomFinderMethods
|
69
|
-
extend
|
70
|
-
extend T::Generic
|
83
|
+
extend Subject::HABTM_Wizards::QueryMethodsReturningRelation
|
71
84
|
RelationType = T.type_alias { T.any(Subject::HABTM_Wizards::ActiveRecord_Relation, Subject::HABTM_Wizards::ActiveRecord_Associations_CollectionProxy, Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
72
|
-
|
73
|
-
sig { returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
74
|
-
def self.all; end
|
75
|
-
|
76
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
77
|
-
def self.unscoped(&block); end
|
78
|
-
|
79
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
80
|
-
def self.select(*args); end
|
81
|
-
|
82
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
83
|
-
def self.order(*args); end
|
84
|
-
|
85
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
86
|
-
def self.reorder(*args); end
|
87
|
-
|
88
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
89
|
-
def self.group(*args); end
|
90
|
-
|
91
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
92
|
-
def self.limit(*args); end
|
93
|
-
|
94
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
95
|
-
def self.offset(*args); end
|
96
|
-
|
97
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
98
|
-
def self.joins(*args); end
|
99
|
-
|
100
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
101
|
-
def self.left_joins(*args); end
|
102
|
-
|
103
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
104
|
-
def self.left_outer_joins(*args); end
|
105
|
-
|
106
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
107
|
-
def self.where(*args); end
|
108
|
-
|
109
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
110
|
-
def self.rewhere(*args); end
|
111
|
-
|
112
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
113
|
-
def self.preload(*args); end
|
114
|
-
|
115
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
116
|
-
def self.eager_load(*args); end
|
117
|
-
|
118
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
119
|
-
def self.includes(*args); end
|
120
|
-
|
121
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
122
|
-
def self.from(*args); end
|
123
|
-
|
124
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
125
|
-
def self.lock(*args); end
|
126
|
-
|
127
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
128
|
-
def self.readonly(*args); end
|
129
|
-
|
130
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
131
|
-
def self.or(*args); end
|
132
|
-
|
133
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
134
|
-
def self.having(*args); end
|
135
|
-
|
136
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
137
|
-
def self.create_with(*args); end
|
138
|
-
|
139
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
140
|
-
def self.distinct(*args); end
|
141
|
-
|
142
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
143
|
-
def self.references(*args); end
|
144
|
-
|
145
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
146
|
-
def self.none(*args); end
|
147
|
-
|
148
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
149
|
-
def self.unscope(*args); end
|
150
|
-
|
151
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
152
|
-
def self.except(*args); end
|
153
|
-
|
154
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
155
|
-
def self.extending(*args, &block); end
|
156
85
|
end
|
157
86
|
|
158
|
-
|
159
|
-
include Subject::HABTM_Wizards::ActiveRelation_WhereNot
|
160
|
-
include Subject::HABTM_Wizards::CustomFinderMethods
|
161
|
-
extend T::Sig
|
162
|
-
extend T::Generic
|
163
|
-
Elem = type_member(fixed: Subject::HABTM_Wizards)
|
164
|
-
|
87
|
+
module Subject::HABTM_Wizards::QueryMethodsReturningRelation
|
165
88
|
sig { returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
166
89
|
def all; end
|
167
90
|
|
@@ -245,19 +168,25 @@ class Subject::HABTM_Wizards::ActiveRecord_Relation < ActiveRecord::Relation
|
|
245
168
|
|
246
169
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
247
170
|
def extending(*args, &block); end
|
248
|
-
end
|
249
171
|
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
172
|
+
sig do
|
173
|
+
params(
|
174
|
+
of: T.nilable(Integer),
|
175
|
+
start: T.nilable(Integer),
|
176
|
+
finish: T.nilable(Integer),
|
177
|
+
load: T.nilable(T::Boolean),
|
178
|
+
error_on_ignore: T.nilable(T::Boolean),
|
179
|
+
block: T.nilable(T.proc.params(e: Subject::HABTM_Wizards::ActiveRecord_Relation).void)
|
180
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
181
|
+
end
|
182
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
183
|
+
end
|
256
184
|
|
185
|
+
module Subject::HABTM_Wizards::QueryMethodsReturningAssociationRelation
|
257
186
|
sig { returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
258
187
|
def all; end
|
259
188
|
|
260
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Subject::HABTM_Wizards::
|
189
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
261
190
|
def unscoped(&block); end
|
262
191
|
|
263
192
|
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
@@ -337,97 +266,38 @@ class Subject::HABTM_Wizards::ActiveRecord_AssociationRelation < ActiveRecord::A
|
|
337
266
|
|
338
267
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
339
268
|
def extending(*args, &block); end
|
269
|
+
|
270
|
+
sig do
|
271
|
+
params(
|
272
|
+
of: T.nilable(Integer),
|
273
|
+
start: T.nilable(Integer),
|
274
|
+
finish: T.nilable(Integer),
|
275
|
+
load: T.nilable(T::Boolean),
|
276
|
+
error_on_ignore: T.nilable(T::Boolean),
|
277
|
+
block: T.nilable(T.proc.params(e: Subject::HABTM_Wizards::ActiveRecord_AssociationRelation).void)
|
278
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
279
|
+
end
|
280
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
340
281
|
end
|
341
282
|
|
342
|
-
class Subject::HABTM_Wizards::
|
283
|
+
class Subject::HABTM_Wizards::ActiveRecord_Relation < ActiveRecord::Relation
|
284
|
+
include Subject::HABTM_Wizards::ActiveRelation_WhereNot
|
343
285
|
include Subject::HABTM_Wizards::CustomFinderMethods
|
344
|
-
|
345
|
-
extend T::Generic
|
286
|
+
include Subject::HABTM_Wizards::QueryMethodsReturningRelation
|
346
287
|
Elem = type_member(fixed: Subject::HABTM_Wizards)
|
288
|
+
end
|
347
289
|
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
355
|
-
def select(*args); end
|
356
|
-
|
357
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
358
|
-
def order(*args); end
|
359
|
-
|
360
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
361
|
-
def reorder(*args); end
|
362
|
-
|
363
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
364
|
-
def group(*args); end
|
365
|
-
|
366
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
367
|
-
def limit(*args); end
|
368
|
-
|
369
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
370
|
-
def offset(*args); end
|
371
|
-
|
372
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
373
|
-
def joins(*args); end
|
374
|
-
|
375
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
376
|
-
def left_joins(*args); end
|
377
|
-
|
378
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
379
|
-
def left_outer_joins(*args); end
|
380
|
-
|
381
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
382
|
-
def where(*args); end
|
383
|
-
|
384
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
385
|
-
def rewhere(*args); end
|
386
|
-
|
387
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
388
|
-
def preload(*args); end
|
389
|
-
|
390
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
391
|
-
def eager_load(*args); end
|
392
|
-
|
393
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
394
|
-
def includes(*args); end
|
395
|
-
|
396
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
397
|
-
def from(*args); end
|
398
|
-
|
399
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
400
|
-
def lock(*args); end
|
401
|
-
|
402
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
403
|
-
def readonly(*args); end
|
404
|
-
|
405
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
406
|
-
def or(*args); end
|
407
|
-
|
408
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
409
|
-
def having(*args); end
|
410
|
-
|
411
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
412
|
-
def create_with(*args); end
|
413
|
-
|
414
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
415
|
-
def distinct(*args); end
|
416
|
-
|
417
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
418
|
-
def references(*args); end
|
419
|
-
|
420
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
421
|
-
def none(*args); end
|
422
|
-
|
423
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
424
|
-
def unscope(*args); end
|
425
|
-
|
426
|
-
sig { params(args: T.untyped).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
427
|
-
def except(*args); end
|
290
|
+
class Subject::HABTM_Wizards::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
291
|
+
include Subject::HABTM_Wizards::ActiveRelation_WhereNot
|
292
|
+
include Subject::HABTM_Wizards::CustomFinderMethods
|
293
|
+
include Subject::HABTM_Wizards::QueryMethodsReturningAssociationRelation
|
294
|
+
Elem = type_member(fixed: Subject::HABTM_Wizards)
|
295
|
+
end
|
428
296
|
|
429
|
-
|
430
|
-
|
297
|
+
class Subject::HABTM_Wizards::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
298
|
+
include Subject::HABTM_Wizards::CustomFinderMethods
|
299
|
+
include Subject::HABTM_Wizards::QueryMethodsReturningAssociationRelation
|
300
|
+
Elem = type_member(fixed: Subject::HABTM_Wizards)
|
431
301
|
|
432
302
|
sig { params(records: T.any(Subject::HABTM_Wizards, T::Array[Subject::HABTM_Wizards])).returns(T.self_type) }
|
433
303
|
def <<(*records); end
|