sorbet-runtime 0.4.4359 → 0.4.4361

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
  SHA1:
3
- metadata.gz: 41de97b55461cc03568675d3a6e932a3fd63541a
4
- data.tar.gz: 3e95802f8970753b22e658b8979c158da11b1e75
3
+ metadata.gz: 05e71cdbf6a346f6b83b25695e471b0530a638f3
4
+ data.tar.gz: df7b2254641f1ce3d748fff36d0e7e525c7770fb
5
5
  SHA512:
6
- metadata.gz: 3bf47bb918311412af6bd63c511c2d20c2eebe0795f2d37350b32875da39e48541bd0f3f84ebaa95339e089ccc0d729ee2ab3c4563110950ee1b01fee34e9338
7
- data.tar.gz: a80ba026cc3b3c1a31cfdb4c5966c96f85f60fb2c258ff769b085a81b69f75cac03b9fa89a1dd8bc3a96113b9c84f9143dbfcebbb17e9b8202c7b796f7189d9c
6
+ metadata.gz: 9d4b7dfab5359aa0e7595030bcc8179a46b5b2deaaedfb111c26a026118c8d62b03aded0872e60dee83db339598f521a176b979a3556f473466f2ee90449b767
7
+ data.tar.gz: 8fe453528019faeb30a8716c35539211ae7fb4769210ab985f268314fc9fc4ab8a49aa6a182638fee6f7151622c6104a94b508c88283ae6f19826a6d8316865c
@@ -44,7 +44,7 @@ module T::Private::Methods
44
44
  raise "Procs must specify a return type"
45
45
  end
46
46
  if decl.soft_notify != ARG_NOT_PROVIDED
47
- raise "Procs cannot use .soft"
47
+ raise "Procs cannot use .on_failure"
48
48
  end
49
49
 
50
50
  if decl.params == ARG_NOT_PROVIDED
@@ -86,7 +86,7 @@ module T::Private::Methods
86
86
  raise BuilderError.new("You can't call .checked multiple times in a signature.")
87
87
  end
88
88
  if !decl.soft_notify.equal?(ARG_NOT_PROVIDED)
89
- raise BuilderError.new("You can't use .checked with .soft.")
89
+ raise BuilderError.new("You can't use .checked with .on_failure.")
90
90
  end
91
91
  if !decl.generated.equal?(ARG_NOT_PROVIDED)
92
92
  raise BuilderError.new("You can't use .checked with .generated.")
@@ -100,26 +100,23 @@ module T::Private::Methods
100
100
  self
101
101
  end
102
102
 
103
- def soft(notify:)
104
- if T.unsafe(true)
105
- raise "The .soft API is unstable, so we don't want it used until we redesign it. To change Sorbet's runtime behavior, see https://sorbet.org/docs/tconfiguration"
106
- end
103
+ def on_failure(notify:)
107
104
  check_live!
108
105
 
109
106
  if !decl.soft_notify.equal?(ARG_NOT_PROVIDED)
110
- raise BuilderError.new("You can't call .soft multiple times in a signature.")
107
+ raise BuilderError.new("You can't call .on_failure multiple times in a signature.")
111
108
  end
112
109
  if !decl.checked.equal?(ARG_NOT_PROVIDED)
113
- raise BuilderError.new("You can't use .soft with .checked.")
110
+ raise BuilderError.new("You can't use .on_failure with .checked.")
114
111
  end
115
112
  if !decl.generated.equal?(ARG_NOT_PROVIDED)
116
- raise BuilderError.new("You can't use .soft with .generated.")
113
+ raise BuilderError.new("You can't use .on_failure with .generated.")
117
114
  end
118
115
 
119
116
  # TODO consider validating that :notify is a project that sentry knows about,
120
117
  # as per https://git.corp.stripe.com/stripe-internal/pay-server/blob/master/lib/event/job/sentry_job.rb#L125
121
118
  if !notify || notify == ''
122
- raise BuilderError.new("You can't provide an empty notify to .soft().")
119
+ raise BuilderError.new("You can't provide an empty notify to .on_failure().")
123
120
  end
124
121
 
125
122
  decl.soft_notify = notify
@@ -137,7 +134,7 @@ module T::Private::Methods
137
134
  raise BuilderError.new("You can't use .generated with .checked.")
138
135
  end
139
136
  if !decl.soft_notify.equal?(ARG_NOT_PROVIDED)
140
- raise BuilderError.new("You can't use .generated with .soft.")
137
+ raise BuilderError.new("You can't use .generated with .on_failure.")
141
138
  end
142
139
 
143
140
  decl.generated = true
@@ -330,7 +330,6 @@ class T::Props::Decorator
330
330
  .void
331
331
  end
332
332
  def prop_defined(name, cls, rules={})
333
- # TODO(jerry): Create similar soft assertions against false
334
333
  if rules[:optional] == true
335
334
  T::Configuration.hard_assert_handler(
336
335
  'Use of `optional: true` is deprecated, please use `T.nilable(...)` instead.',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4359
4
+ version: 0.4.4361
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe