sorbet-runtime 0.5.5226 → 0.5.5238
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/types/props/decorator.rb +2 -9
- data/lib/types/props/optional.rb +6 -6
- data/lib/types/props/serializable.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4c6dbf2608bd70a5bf0ad3ccf2f63814cffb052ddeb7cdf033239bb74d27157
|
4
|
+
data.tar.gz: 449b8fdaceb62077e9314862e5686232a7c089a927bfe660733b09d6f211b419
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32a73d21fd4bd0ece7b67d84612245a318b2771fabd9f0052b2ccb0c52be43ffd7a52123e5f5c293cd19a57b97f3457fb2fad9d136bdba76375e72f0c81190d9
|
7
|
+
data.tar.gz: 6841b84a261054ac0ac431a4ffac3b5cd475161c5ebdd59e6fdbda47b22b721f8e99f4e94478d1a6013da6904e02620f9c2799012df7ddf851574aab38d1ea5e
|
@@ -76,19 +76,12 @@ class T::Props::Decorator
|
|
76
76
|
extra
|
77
77
|
optional
|
78
78
|
_tnilable
|
79
|
-
}.
|
79
|
+
}.map {|k| [k, true]}.to_h.freeze
|
80
80
|
private_constant :VALID_RULE_KEYS
|
81
81
|
|
82
82
|
sig {params(key: Symbol).returns(T::Boolean).checked(:never)}
|
83
83
|
def valid_rule_key?(key)
|
84
|
-
|
85
|
-
end
|
86
|
-
|
87
|
-
# Deprecated, kept temporarily to support overrides in pay-server
|
88
|
-
# during the transition to `valid_rule_key?`
|
89
|
-
sig {returns(T::Set[Symbol]).checked(:never)}
|
90
|
-
def valid_props
|
91
|
-
VALID_RULE_KEYS
|
84
|
+
VALID_RULE_KEYS[key]
|
92
85
|
end
|
93
86
|
|
94
87
|
# checked(:never) - O(prop accesses)
|
data/lib/types/props/optional.rb
CHANGED
@@ -21,15 +21,15 @@ module T::Props::Optional::DecoratorMethods
|
|
21
21
|
true,
|
22
22
|
].freeze
|
23
23
|
|
24
|
-
VALID_RULE_KEYS =
|
25
|
-
:
|
26
|
-
:
|
27
|
-
:
|
28
|
-
|
24
|
+
VALID_RULE_KEYS = {
|
25
|
+
default: true,
|
26
|
+
factory: true,
|
27
|
+
optional: true,
|
28
|
+
}.freeze
|
29
29
|
private_constant :VALID_RULE_KEYS
|
30
30
|
|
31
31
|
def valid_rule_key?(key)
|
32
|
-
super || VALID_RULE_KEYS
|
32
|
+
super || VALID_RULE_KEYS[key]
|
33
33
|
end
|
34
34
|
|
35
35
|
def prop_optional?(prop); prop_rules(prop)[:fully_optional]; end
|
@@ -275,11 +275,11 @@ end
|
|
275
275
|
# T::Props::Decorator#apply_plugin; see https://git.corp.stripe.com/stripe-internal/pay-server/blob/fc7f15593b49875f2d0499ffecfd19798bac05b3/chalk/odm/lib/chalk-odm/document_decorator.rb#L716-L717
|
276
276
|
module T::Props::Serializable::DecoratorMethods
|
277
277
|
|
278
|
-
VALID_RULE_KEYS =
|
278
|
+
VALID_RULE_KEYS = {dont_store: true, name: true, raise_on_nil_write: true}.freeze
|
279
279
|
private_constant :VALID_RULE_KEYS
|
280
280
|
|
281
281
|
def valid_rule_key?(key)
|
282
|
-
super || VALID_RULE_KEYS
|
282
|
+
super || VALID_RULE_KEYS[key]
|
283
283
|
end
|
284
284
|
|
285
285
|
def required_props
|
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.
|
4
|
+
version: 0.5.5238
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|