rails-on-sorbet 0.3.2 → 0.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 933a41943fa0c0f4f3c967a1797fd1349e84aec021fa7aaa16f84daa947b04a3
4
- data.tar.gz: ad9925cfdff086e01e69b1738baca8ca6752435567e21c31a5829d926100addd
3
+ metadata.gz: d255de247b08a136edde26f15049767590f2e303a78e2551df4ef8998ab84512
4
+ data.tar.gz: 1d6c912134b2345bd3d6e537b99ab1d89f68f6b6c1ad60f9ea9556a8c025ff3f
5
5
  SHA512:
6
- metadata.gz: 693d8fe1a3d5d77200da6cbfa5a844075d48c3ec2dc65171bb528686f9dfaeb32d49992c2d3d08eee2359f4bd56748c70b38913a26a8f72f0d5c881ca041afd1
7
- data.tar.gz: 4065d3008fb38b9159c619c0eeda6ef7475aefffcbb6a22aca10137b754924e351cf6a6579b0639a18eef9e9ada1fa883af20fbd68c0de638c938341a4fa988e
6
+ metadata.gz: 7bb596b03ee49d914a6d555eb646b1074357ea2368d24b2dd5a424ce3265de740ab44cbbd7191095cb39622e6991b77e6affa21762a3f5dad6dba078778fea27
7
+ data.tar.gz: da155d5a8360f016a854a2d9f9ff9b2ee28b60a83f397d6593773730ff4186ecd4af5ed39ca5966f00317862e95235f4479c6ce062ba41cbde709503560ae178
data/CHANGELOG.md CHANGED
@@ -12,6 +12,13 @@ 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.3] - 20.10.2025
16
+
17
+ [Diff](https://github.com/espago/rails-on-sorbet/compare/v0.3.2...v0.3.3)
18
+
19
+ ### Changes
20
+ - Fix tapioca compiler and subtyping for `TypedRelation`
21
+
15
22
  ## [0.3.2] - 20.10.2025
16
23
 
17
24
  [Diff](https://github.com/espago/rails-on-sorbet/compare/v0.3.1...v0.3.2)
@@ -54,5 +54,6 @@ module TypedAssociation
54
54
 
55
55
  module CollectionProxy
56
56
  extend T::Generic
57
+ include TypedRelation
57
58
  end
58
59
  end
@@ -3,7 +3,7 @@
3
3
  module Rails
4
4
  module On
5
5
  module Sorbet
6
- VERSION = '0.3.2'
6
+ VERSION = '0.3.3'
7
7
  end
8
8
  end
9
9
  end
@@ -20,26 +20,29 @@ module Tapioca
20
20
  #: -> void
21
21
  def decorate
22
22
  root.create_path(constant) do |klass|
23
- private_relation = klass.create_class('PrivateRelation')
23
+ private_relation = klass.create_class('PrivateRelation', superclass_name: '::ActiveRecord::Relation')
24
24
  private_relation.create_include('::TypedRelation')
25
25
 
26
- private_relation_group_chain = klass.create_class('PrivateRelationGroupChain')
26
+ private_relation_group_chain = klass.create_class('PrivateRelationGroupChain',
27
+ superclass_name: 'PrivateRelation',)
27
28
  private_relation_group_chain.create_include('::TypedRelation::GroupChain')
28
29
 
29
- private_relation_where_chain = klass.create_class('PrivateRelationWhereChain')
30
+ private_relation_where_chain = klass.create_class('PrivateRelationWhereChain', superclass_name: '::ActiveRecord::QueryMethods::WhereChain')
30
31
  private_relation_where_chain.create_include('::TypedRelation::WhereChain')
31
32
 
32
33
 
33
- private_association_relation = klass.create_class('PrivateAssociationRelation')
34
+ private_association_relation = klass.create_class('PrivateAssociationRelation', superclass_name: '::ActiveRecord::AssociationRelation')
34
35
  private_association_relation.create_include('::TypedAssociation::Relation')
35
36
 
36
- private_relation_group_chain = klass.create_class('PrivateAssociationRelationGroupChain')
37
+ private_relation_group_chain = klass.create_class('PrivateAssociationRelationGroupChain',
38
+ superclass_name: 'PrivateAssociationRelation',)
37
39
  private_relation_group_chain.create_include('::TypedAssociation::Relation::GroupChain')
38
40
 
39
- private_relation_where_chain = klass.create_class('PrivateAssociationRelationWhereChain')
41
+ private_relation_where_chain = klass.create_class('PrivateAssociationRelationWhereChain',
42
+ superclass_name: '::ActiveRecord::QueryMethods::WhereChain',)
40
43
  private_relation_where_chain.create_include('::TypedAssociation::Relation::WhereChain')
41
44
 
42
- private_collection_proxy = klass.create_class('PrivateCollectionProxy')
45
+ private_collection_proxy = klass.create_class('PrivateCollectionProxy', superclass_name: '::ActiveRecord::Associations::CollectionProxy')
43
46
  private_collection_proxy.create_include('::TypedAssociation::CollectionProxy')
44
47
  end
45
48
  end
@@ -887,6 +887,7 @@ module TypedAssociation
887
887
  # @abstract
888
888
  module CollectionProxy
889
889
  extend T::Generic
890
+ include TypedRelation
890
891
  include TypedCommonRelationMethods
891
892
  include TypedGeneratedAssociationRelationMethods
892
893
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-on-sorbet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Drewniak