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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce5d31efe70f4a4a9fedee60cddc4545cce308285d1a92e9b75f7c6c5cfd0ead
4
- data.tar.gz: 8ff1cb8a2b9a7c0f1987925899bfcf674c27b594156c9dd8e60ee27ec51d1dd1
3
+ metadata.gz: c4c6dbf2608bd70a5bf0ad3ccf2f63814cffb052ddeb7cdf033239bb74d27157
4
+ data.tar.gz: 449b8fdaceb62077e9314862e5686232a7c089a927bfe660733b09d6f211b419
5
5
  SHA512:
6
- metadata.gz: bc94cf76fd49747ab049a66bfbd30dc4a0b037ac0f8988a4c6f6a5e6421abf92f209c14a8fe42c0268ca34d8fa5e77cc4fcddc24f08bd8cc6e7175068cc0285e
7
- data.tar.gz: 38dc583fc54332f763cb1982bce24e5c23e2d2125a0dfd451354eb16f5adc8bab07ee2c4cfda1642b83795bc1539d153b7063df2ffd367faa4d1798ca856cd13
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
- }.to_set.freeze
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
- valid_props.include?(key)
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)
@@ -21,15 +21,15 @@ module T::Props::Optional::DecoratorMethods
21
21
  true,
22
22
  ].freeze
23
23
 
24
- VALID_RULE_KEYS = Set[
25
- :default,
26
- :factory,
27
- :optional,
28
- ].freeze
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.include?(key)
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 = Set[:dont_store, :name, :raise_on_nil_write].freeze
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.include?(key)
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.5226
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-09 00:00:00.000000000 Z
11
+ date: 2020-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest