sorbet-runtime 0.5.5585 → 0.5.5605

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: 35b3fe4f8f7fae4fdbd19e655762c071f4f37f928904605e99041b66019b2a9a
4
- data.tar.gz: c1468cf54f40df012dd952b783f4c8acfeb13c7740088563f9167bdc057929bc
3
+ metadata.gz: 66ba8970744bbc8b5c86620d2fc977eece596d415193756dfb0eddb37239dfab
4
+ data.tar.gz: 2f0db92930464840cae2856a6891d492d6786dc2fa834ba3fada3930ae060084
5
5
  SHA512:
6
- metadata.gz: 90dd82b326e2334f0aed1bb8b501e84d286e015888baac656020dd882446b40a49ab45de1f7d6dd01cd3fe89015b5702d5e9e40c7ef0e8ca4d0ef05acb386a25
7
- data.tar.gz: 8d4d4916ac9a8b16223143e091289876f5b81816817f72e7eb7eb66ee594ca6f137495e2460ef25230a751ecb99d6831c38b8093fd371cccfa5154a7c769bd56
6
+ metadata.gz: 61c82fc9660915ae371726bde8d9fe0e937e45c1abc7febe2d0939902408dc780f725edcb6c709e88d4ef46f73a29a18b3140013250a25d6aaa2513423dec22f
7
+ data.tar.gz: c75832d08785af77214c2235be9d6c3f0f8963c0d69cf469502377c7dc9bec5baad5d0919ede43124e4c2f31fe594f940c04bf944c12025c84209ceb81e8192c
@@ -100,7 +100,7 @@ module T::Props
100
100
  if val.is_a?(Hash)
101
101
  msg += "\nIf you want to store a structured Hash, consider using a T::Struct as your type."
102
102
  end
103
- raise T::Props::InvalidValueError.new(msg)
103
+ raise TypeError.new(msg)
104
104
  end
105
105
  val
106
106
  end
@@ -119,6 +119,21 @@ class T::Props::Decorator
119
119
  end
120
120
  alias_method :set, :prop_set
121
121
 
122
+ # Only Models have any custom get logic but we need to call this on
123
+ # non-Models since we don't know at code gen time what we have.
124
+ sig do
125
+ params(
126
+ instance: DecoratedInstance,
127
+ prop: Symbol,
128
+ value: T.untyped
129
+ )
130
+ .returns(T.untyped)
131
+ .checked(:never)
132
+ end
133
+ def prop_get_logic(instance, prop, value)
134
+ value
135
+ end
136
+
122
137
  # For performance, don't use named params here.
123
138
  # Passing in rules here is purely a performance optimization.
124
139
  #
@@ -25,7 +25,7 @@ module T::Props::Serializable
25
25
  :generate_serialize_source
26
26
  )
27
27
  if msg
28
- raise T::Props::InvalidValueError.new(msg)
28
+ raise TypeError.new(msg)
29
29
  else
30
30
  raise
31
31
  end
@@ -62,7 +62,7 @@ module T::Props::Serializable
62
62
  :generate_deserialize_source
63
63
  )
64
64
  if msg
65
- raise T::Props::InvalidValueError.new(msg)
65
+ raise TypeError.new(msg)
66
66
  else
67
67
  raise
68
68
  end
@@ -138,7 +138,7 @@ module T::Props::Serializable
138
138
  prop: prop, class: self.class.name, id: self.class.decorator.get_id(self)
139
139
  )
140
140
  else
141
- raise T::Props::InvalidValueError.new("#{self.class.name}.#{prop} not set for non-optional prop")
141
+ raise TypeError.new("#{self.class.name}.#{prop} not set for non-optional prop")
142
142
  end
143
143
  end
144
144
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5585
4
+ version: 0.5.5605
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-06 00:00:00.000000000 Z
11
+ date: 2020-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest