rails-on-sorbet 0.3.4 → 0.3.5

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: f489d9f4fc449469fc2c648b63cce27cf7f6765cf119003037567414d8d82554
4
- data.tar.gz: 16383eef9597808df2fe6e1b044ded34c3a3d1cbfcb26f0b029a30e0195171d1
3
+ metadata.gz: 20f5398f4347bd7235077b77dcbce2916b0ec30001eab8ce4da12d290322515d
4
+ data.tar.gz: 59caf094a17595e0e6c4d5ea26b870098dc0d7b9a06d8f8edcb55fa9aeecd033
5
5
  SHA512:
6
- metadata.gz: 3ad359e0b378b16ab174854a6a8d552d17b17eb82702c92e4fb06fb6919e42bc543141832c9d91b8be3faa9aa6dcd081e01060484fe4ffb80731d2542730431a
7
- data.tar.gz: 3319c64c51f3002bed9d4016aef5c9d4d1216e508212b2eeee6d4190ee792aedbf470cc2caca698eb3dac232ded938fda41452d45a3076528ce98a73ee4b7bd5
6
+ metadata.gz: e389aaf40e8f111aec4c8d2bbdf6cc7e17af5d70ebcefd18d65b5876339cc0223c8e6c2dbec086dcb4840d2fcd75fa9a0092dfd8a32be46d1ae0932a03daed54
7
+ data.tar.gz: 4a54cd049174abcb664f80e8c22fdda7b18b62234f29d63f35cb8c285c79677a986a01a59190cab94a53a884e9724513bbdeaabeb258083e4a0f06429107cbe0
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.5] - 21.10.2025
16
+
17
+ [Diff](https://github.com/espago/rails-on-sorbet/compare/v0.3.4...v0.3.5)
18
+
19
+ ### Changes
20
+ - Fix `TypedRelation` RBI and tapioca compiler
21
+
15
22
  ## [0.3.4] - 21.10.2025
16
23
 
17
24
  [Diff](https://github.com/espago/rails-on-sorbet/compare/v0.3.3...v0.3.4)
@@ -3,7 +3,7 @@
3
3
  module Rails
4
4
  module On
5
5
  module Sorbet
6
- VERSION = '0.3.4'
6
+ VERSION = '0.3.5'
7
7
  end
8
8
  end
9
9
  end
@@ -22,28 +22,34 @@ 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', variance: :out)
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', variance: :out)
29
31
 
30
32
  private_relation_where_chain = klass.create_class('PrivateRelationWhereChain', superclass_name: '::ActiveRecord::QueryMethods::WhereChain')
31
33
  private_relation_where_chain.create_include('::TypedRelation::WhereChain')
32
-
34
+ private_relation_where_chain.create_type_variable('Elem', type: 'type_member', variance: :out)
33
35
 
34
36
  private_association_relation = klass.create_class('PrivateAssociationRelation', superclass_name: '::ActiveRecord::AssociationRelation')
35
37
  private_association_relation.create_include('::TypedAssociation::Relation')
38
+ private_association_relation.create_type_variable('Elem', type: 'type_member', variance: :out)
36
39
 
37
40
  private_relation_group_chain = klass.create_class('PrivateAssociationRelationGroupChain',
38
41
  superclass_name: 'PrivateAssociationRelation',)
39
42
  private_relation_group_chain.create_include('::TypedAssociation::Relation::GroupChain')
43
+ private_relation_group_chain.create_type_variable('Elem', type: 'type_member', variance: :out)
40
44
 
41
45
  private_relation_where_chain = klass.create_class('PrivateAssociationRelationWhereChain',
42
46
  superclass_name: '::ActiveRecord::QueryMethods::WhereChain',)
43
47
  private_relation_where_chain.create_include('::TypedAssociation::Relation::WhereChain')
48
+ private_relation_where_chain.create_type_variable('Elem', type: 'type_member', variance: :out)
44
49
 
45
50
  private_collection_proxy = klass.create_class('PrivateCollectionProxy', superclass_name: '::ActiveRecord::Associations::CollectionProxy')
46
51
  private_collection_proxy.create_include('::TypedAssociation::CollectionProxy')
52
+ private_collection_proxy.create_type_variable('Elem', type: 'type_member', variance: :out)
47
53
  end
48
54
  end
49
55
 
@@ -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
 
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.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Drewniak