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