rails-on-sorbet 0.3.0 → 0.3.2
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 +6 -6
- data/rbi/typed_relation.rbi +10 -5
- 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: 933a41943fa0c0f4f3c967a1797fd1349e84aec021fa7aaa16f84daa947b04a3
|
4
|
+
data.tar.gz: ad9925cfdff086e01e69b1738baca8ca6752435567e21c31a5829d926100addd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 693d8fe1a3d5d77200da6cbfa5a844075d48c3ec2dc65171bb528686f9dfaeb32d49992c2d3d08eee2359f4bd56748c70b38913a26a8f72f0d5c881ca041afd1
|
7
|
+
data.tar.gz: 4065d3008fb38b9159c619c0eeda6ef7475aefffcbb6a22aca10137b754924e351cf6a6579b0639a18eef9e9ada1fa883af20fbd68c0de638c938341a4fa988e
|
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.2] - 20.10.2025
|
16
|
+
|
17
|
+
[Diff](https://github.com/espago/rails-on-sorbet/compare/v0.3.1...v0.3.2)
|
18
|
+
|
19
|
+
### Changes
|
20
|
+
- Add `extend T::Generic` to `TypedRelation` definitions
|
21
|
+
|
22
|
+
## [0.3.1] - 20.10.2025
|
23
|
+
|
24
|
+
[Diff](https://github.com/espago/rails-on-sorbet/compare/v0.3.0...v0.3.1)
|
25
|
+
|
26
|
+
### Changes
|
27
|
+
- Fix `Tapioca::Compilers::RailsOnSorbetActiveRecordRelations` and `TypedRelation` definitions
|
28
|
+
|
15
29
|
## [0.3.0] - 20.10.2025
|
16
30
|
|
17
31
|
[Diff](https://github.com/espago/rails-on-sorbet/compare/v0.2.8...v0.3.0)
|
@@ -29,18 +29,18 @@ module Tapioca
|
|
29
29
|
private_relation_where_chain = klass.create_class('PrivateRelationWhereChain')
|
30
30
|
private_relation_where_chain.create_include('::TypedRelation::WhereChain')
|
31
31
|
|
32
|
-
private_collection_proxy = klass.create_class('PrivateCollectionProxy')
|
33
|
-
private_collection_proxy.create_include('::TypedRelation::CollectionProxy')
|
34
|
-
|
35
32
|
|
36
33
|
private_association_relation = klass.create_class('PrivateAssociationRelation')
|
37
|
-
private_association_relation.create_include('::
|
34
|
+
private_association_relation.create_include('::TypedAssociation::Relation')
|
38
35
|
|
39
36
|
private_relation_group_chain = klass.create_class('PrivateAssociationRelationGroupChain')
|
40
|
-
private_relation_group_chain.create_include('::
|
37
|
+
private_relation_group_chain.create_include('::TypedAssociation::Relation::GroupChain')
|
41
38
|
|
42
39
|
private_relation_where_chain = klass.create_class('PrivateAssociationRelationWhereChain')
|
43
|
-
private_relation_where_chain.create_include('::
|
40
|
+
private_relation_where_chain.create_include('::TypedAssociation::Relation::WhereChain')
|
41
|
+
|
42
|
+
private_collection_proxy = klass.create_class('PrivateCollectionProxy')
|
43
|
+
private_collection_proxy.create_include('::TypedAssociation::CollectionProxy')
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
data/rbi/typed_relation.rbi
CHANGED
@@ -5,6 +5,8 @@ def TypedRelation(val); end
|
|
5
5
|
|
6
6
|
# @abstract
|
7
7
|
module TypedCommonRelationMethods
|
8
|
+
extend T::Generic
|
9
|
+
|
8
10
|
Elem = type_member(:out)
|
9
11
|
|
10
12
|
# START CommonRelationMethods
|
@@ -416,8 +418,8 @@ module TypedCommonRelationMethods
|
|
416
418
|
end
|
417
419
|
|
418
420
|
# @abstract
|
419
|
-
# @requires_ancestor: ActiveRecord::Relation
|
420
421
|
module TypedRelation
|
422
|
+
extend T::Generic
|
421
423
|
Elem = type_member(:out)
|
422
424
|
|
423
425
|
class << self
|
@@ -429,6 +431,7 @@ module TypedRelation
|
|
429
431
|
|
430
432
|
# @abstract
|
431
433
|
module GroupChain
|
434
|
+
extend T::Generic
|
432
435
|
include TypedRelation
|
433
436
|
|
434
437
|
Elem = type_member(:out)
|
@@ -468,9 +471,9 @@ module TypedRelation
|
|
468
471
|
def sum(column_name = nil, &block); end
|
469
472
|
end
|
470
473
|
|
471
|
-
# @requires_ancestor: ::ActiveRecord::QueryMethods::WhereChain
|
472
474
|
# @abstract
|
473
475
|
module WhereChain
|
476
|
+
extend T::Generic
|
474
477
|
Elem = type_member(:out)
|
475
478
|
|
476
479
|
sig { abstract.params(args: T.untyped).returns(TypedRelation[Elem]) }
|
@@ -640,6 +643,7 @@ end
|
|
640
643
|
|
641
644
|
# @abstract
|
642
645
|
module TypedGeneratedAssociationRelationMethods
|
646
|
+
extend T::Generic
|
643
647
|
Elem = type_member(:out)
|
644
648
|
|
645
649
|
sig { abstract.returns(T::Array[Elem]) }
|
@@ -808,8 +812,8 @@ module TypedAssociation
|
|
808
812
|
end
|
809
813
|
|
810
814
|
# @abstract
|
811
|
-
# @requires_ancestor: ActiveRecord::AssociationRelation
|
812
815
|
module Relation
|
816
|
+
extend T::Generic
|
813
817
|
include TypedCommonRelationMethods
|
814
818
|
include TypedGeneratedAssociationRelationMethods
|
815
819
|
|
@@ -822,9 +826,9 @@ module TypedAssociation
|
|
822
826
|
def WhereChain(val); end
|
823
827
|
end
|
824
828
|
|
825
|
-
# @requires_ancestor: ::ActiveRecord::QueryMethods::WhereChain
|
826
829
|
# @abstract
|
827
830
|
module WhereChain
|
831
|
+
extend T::Generic
|
828
832
|
Elem = type_member(:out)
|
829
833
|
|
830
834
|
sig { abstract.params(args: T.untyped).returns(Relation[Elem]) }
|
@@ -839,6 +843,7 @@ module TypedAssociation
|
|
839
843
|
|
840
844
|
# @abstract
|
841
845
|
module GroupChain
|
846
|
+
extend T::Generic
|
842
847
|
include Relation
|
843
848
|
|
844
849
|
Elem = type_member(:out)
|
@@ -879,9 +884,9 @@ module TypedAssociation
|
|
879
884
|
end
|
880
885
|
end
|
881
886
|
|
882
|
-
# @requires_ancestor: ActiveRecord::Associations::CollectionProxy
|
883
887
|
# @abstract
|
884
888
|
module CollectionProxy
|
889
|
+
extend T::Generic
|
885
890
|
include TypedCommonRelationMethods
|
886
891
|
include TypedGeneratedAssociationRelationMethods
|
887
892
|
|