rails-on-sorbet 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/rails/on/sorbet/version.rb +1 -1
- data/lib/tapioca/dsl/compilers/rails_on_sorbet_active_record.rb +12 -1
- data/rbi/typed_relation.rbi +9 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c69ce8e6ba929ec4b1b32e4c95a67a8ae725df81e960e0cccceb05472c114e5
|
4
|
+
data.tar.gz: b5736376c29c5a0d82275a5a82eb48743401293a4ed0cad2343d063abc9e1803
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd4ac3dc4916298efbee9e558750f52d848b438d9b89f0c0f4e5844d2ce0296e58608c4749b7efbe3fb870cd2783daa7a58dc5f878168aef2703aed62bb4c8f9
|
7
|
+
data.tar.gz: '0419b6a41c67225f443ab3b2575eee9d66009fc3f51fd2b41fcdcaa697118a8197db9fc6eeaa24803e7e2574e4e9a104d27f0f5cdef04a44992fd5fbc2da0bd3'
|
data/CHANGELOG.md
CHANGED
@@ -12,6 +12,20 @@ Add changes in new features here. Do not change the gem's version in pull/merge
|
|
12
12
|
### Changes
|
13
13
|
-
|
14
14
|
|
15
|
+
## [0.3.6] - 21.10.2025
|
16
|
+
|
17
|
+
[Diff](https://github.com/espago/rails-on-sorbet/compare/v0.3.5...v0.3.6)
|
18
|
+
|
19
|
+
### Changes
|
20
|
+
- Another fix for `TypedRelation` tapioca compiler (type member declarations)
|
21
|
+
|
22
|
+
## [0.3.5] - 21.10.2025
|
23
|
+
|
24
|
+
[Diff](https://github.com/espago/rails-on-sorbet/compare/v0.3.4...v0.3.5)
|
25
|
+
|
26
|
+
### Changes
|
27
|
+
- Fix `TypedRelation` RBI and tapioca compiler
|
28
|
+
|
15
29
|
## [0.3.4] - 21.10.2025
|
16
30
|
|
17
31
|
[Diff](https://github.com/espago/rails-on-sorbet/compare/v0.3.3...v0.3.4)
|
@@ -22,28 +22,39 @@ module Tapioca
|
|
22
22
|
root.create_path(constant) do |klass|
|
23
23
|
private_relation = klass.create_class('PrivateRelation', superclass_name: '::ActiveRecord::Relation')
|
24
24
|
private_relation.create_include('::TypedRelation')
|
25
|
+
private_relation.create_type_variable('Elem', type: 'type_member', fixed: klass.fully_qualified_name)
|
25
26
|
|
26
27
|
private_relation_group_chain = klass.create_class('PrivateRelationGroupChain',
|
27
28
|
superclass_name: 'PrivateRelation',)
|
28
29
|
private_relation_group_chain.create_include('::TypedRelation::GroupChain')
|
30
|
+
private_relation_group_chain.create_type_variable('Elem', type: 'type_member',
|
31
|
+
fixed: klass.fully_qualified_name,)
|
29
32
|
|
30
33
|
private_relation_where_chain = klass.create_class('PrivateRelationWhereChain', superclass_name: '::ActiveRecord::QueryMethods::WhereChain')
|
31
34
|
private_relation_where_chain.create_include('::TypedRelation::WhereChain')
|
32
|
-
|
35
|
+
private_relation_where_chain.create_type_variable('Elem', type: 'type_member',
|
36
|
+
fixed: klass.fully_qualified_name,)
|
33
37
|
|
34
38
|
private_association_relation = klass.create_class('PrivateAssociationRelation', superclass_name: '::ActiveRecord::AssociationRelation')
|
35
39
|
private_association_relation.create_include('::TypedAssociation::Relation')
|
40
|
+
private_association_relation.create_type_variable('Elem', type: 'type_member',
|
41
|
+
fixed: klass.fully_qualified_name,)
|
36
42
|
|
37
43
|
private_relation_group_chain = klass.create_class('PrivateAssociationRelationGroupChain',
|
38
44
|
superclass_name: 'PrivateAssociationRelation',)
|
39
45
|
private_relation_group_chain.create_include('::TypedAssociation::Relation::GroupChain')
|
46
|
+
private_relation_group_chain.create_type_variable('Elem', type: 'type_member',
|
47
|
+
fixed: klass.fully_qualified_name,)
|
40
48
|
|
41
49
|
private_relation_where_chain = klass.create_class('PrivateAssociationRelationWhereChain',
|
42
50
|
superclass_name: '::ActiveRecord::QueryMethods::WhereChain',)
|
43
51
|
private_relation_where_chain.create_include('::TypedAssociation::Relation::WhereChain')
|
52
|
+
private_relation_where_chain.create_type_variable('Elem', type: 'type_member',
|
53
|
+
fixed: klass.fully_qualified_name,)
|
44
54
|
|
45
55
|
private_collection_proxy = klass.create_class('PrivateCollectionProxy', superclass_name: '::ActiveRecord::Associations::CollectionProxy')
|
46
56
|
private_collection_proxy.create_include('::TypedAssociation::CollectionProxy')
|
57
|
+
private_collection_proxy.create_type_variable('Elem', type: 'type_member', fixed: klass.fully_qualified_name)
|
47
58
|
end
|
48
59
|
end
|
49
60
|
|
data/rbi/typed_relation.rbi
CHANGED
@@ -425,9 +425,9 @@ module TypedRelation
|
|
425
425
|
Elem = type_member(:out)
|
426
426
|
|
427
427
|
class << self
|
428
|
-
#: (ActiveRecord::Relation) -> GroupChain[untyped]
|
428
|
+
#: (ActiveRecord::Relation) -> TypedRelation::GroupChain[untyped]
|
429
429
|
def GroupChain(val); end
|
430
|
-
#: (ActiveRecord::QueryMethods::WhereChain) -> WhereChain[untyped]
|
430
|
+
#: (ActiveRecord::QueryMethods::WhereChain) -> TypedRelation::WhereChain[untyped]
|
431
431
|
def WhereChain(val); end
|
432
432
|
end
|
433
433
|
|
@@ -807,7 +807,7 @@ end
|
|
807
807
|
|
808
808
|
module TypedAssociation
|
809
809
|
class << self
|
810
|
-
#: (::ActiveRecord::Relation) -> Relation[untyped]
|
810
|
+
#: (::ActiveRecord::Relation) -> TypedAssociation::Relation[untyped]
|
811
811
|
def Relation(val); end
|
812
812
|
#: (::ActiveRecord::Associations::CollectionProxy) -> CollectionProxy[untyped]
|
813
813
|
def CollectionProxy(val); end
|
@@ -822,9 +822,9 @@ module TypedAssociation
|
|
822
822
|
Elem = type_member(:out)
|
823
823
|
|
824
824
|
class << self
|
825
|
-
#: (ActiveRecord::Relation) -> GroupChain[untyped]
|
825
|
+
#: (ActiveRecord::Relation) -> TypedAssociation::Relation::GroupChain[untyped]
|
826
826
|
def GroupChain(val); end
|
827
|
-
#: (ActiveRecord::QueryMethods::WhereChain) -> WhereChain[untyped]
|
827
|
+
#: (ActiveRecord::QueryMethods::WhereChain) -> TypedAssociation::Relation::WhereChain[untyped]
|
828
828
|
def WhereChain(val); end
|
829
829
|
end
|
830
830
|
|
@@ -833,20 +833,20 @@ module TypedAssociation
|
|
833
833
|
extend T::Generic
|
834
834
|
Elem = type_member(:out)
|
835
835
|
|
836
|
-
sig { abstract.params(args: T.untyped).returns(Relation[Elem]) }
|
836
|
+
sig { abstract.params(args: T.untyped).returns(TypedAssociation::Relation[Elem]) }
|
837
837
|
def associated(*args); end
|
838
838
|
|
839
|
-
sig { abstract.params(args: T.untyped).returns(Relation[Elem]) }
|
839
|
+
sig { abstract.params(args: T.untyped).returns(TypedAssociation::Relation[Elem]) }
|
840
840
|
def missing(*args); end
|
841
841
|
|
842
|
-
sig { abstract.params(opts: T.untyped, rest: T.untyped).returns(Relation[Elem]) }
|
842
|
+
sig { abstract.params(opts: T.untyped, rest: T.untyped).returns(TypedAssociation::Relation[Elem]) }
|
843
843
|
def not(opts, *rest); end
|
844
844
|
end
|
845
845
|
|
846
846
|
# @abstract
|
847
847
|
module GroupChain
|
848
848
|
extend T::Generic
|
849
|
-
include Relation
|
849
|
+
include TypedAssociation::Relation
|
850
850
|
|
851
851
|
Elem = type_member(:out)
|
852
852
|
|