sorbet-runtime 0.6.13496 → 0.6.13497
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 +4 -4
- data/lib/types/configuration.rb +0 -32
- data/lib/types/props/serializable.rb +1 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '01783d7d11344e5b32ba2863a8939b6ae33936e58450ede4a958ccbd53115a78'
|
|
4
|
+
data.tar.gz: 4e4b61fb7eaa377e199ea9e7a5ddad379d3ab726524e0cb80435340025be07ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b95d30040529f8171549e6db9dd74b53bfb4fbc2d3b2087042bf162b265f922597a95f71dc2631d403dd7cf954e43ba70deb558b513f0f46fe98d6d6f8f90ecd
|
|
7
|
+
data.tar.gz: 3ece0183ad2f123ad624786910d2dd7ecefe147342dc8b4337149651e1628f08bd7e4eb11a34e020d7c8ad6918b0bc4afa21b5f9c55f6cb5f63569ff4af0dd90
|
data/lib/types/configuration.rb
CHANGED
|
@@ -270,38 +270,6 @@ module T::Configuration
|
|
|
270
270
|
nil
|
|
271
271
|
end
|
|
272
272
|
|
|
273
|
-
@log_info_handler = nil
|
|
274
|
-
# Set a handler for logging
|
|
275
|
-
#
|
|
276
|
-
# @param [Lambda, Proc, Object, nil] value Proc that handles the error
|
|
277
|
-
# report (pass nil to reset to default behavior)
|
|
278
|
-
#
|
|
279
|
-
# Parameters passed to value.call:
|
|
280
|
-
#
|
|
281
|
-
# @param [String] str Message to be logged
|
|
282
|
-
# @param [Hash] extra A hash containing additional parameters to be passed along to the logger.
|
|
283
|
-
#
|
|
284
|
-
# @example
|
|
285
|
-
# T::Configuration.log_info_handler = lambda do |str, extra|
|
|
286
|
-
# puts "#{str}, context: #{extra}"
|
|
287
|
-
# end
|
|
288
|
-
def self.log_info_handler=(value)
|
|
289
|
-
validate_lambda_given!(value)
|
|
290
|
-
@log_info_handler = value
|
|
291
|
-
end
|
|
292
|
-
|
|
293
|
-
private_class_method def self.log_info_handler_default(str, extra)
|
|
294
|
-
puts "#{str}, extra: #{extra}"
|
|
295
|
-
end
|
|
296
|
-
|
|
297
|
-
def self.log_info_handler(str, extra)
|
|
298
|
-
if @log_info_handler
|
|
299
|
-
@log_info_handler.call(str, extra)
|
|
300
|
-
else
|
|
301
|
-
log_info_handler_default(str, extra)
|
|
302
|
-
end
|
|
303
|
-
end
|
|
304
|
-
|
|
305
273
|
@soft_assert_handler = nil
|
|
306
274
|
# Set a handler for soft assertions
|
|
307
275
|
#
|
|
@@ -141,10 +141,7 @@ module T::Props::Serializable
|
|
|
141
141
|
# If the prop was already missing during deserialization, that means the application
|
|
142
142
|
# code already had to deal with a nil value, which means we wouldn't be accomplishing
|
|
143
143
|
# much by raising here (other than causing an unnecessary breakage).
|
|
144
|
-
|
|
145
|
-
"chalk-odm: missing required property in serialize",
|
|
146
|
-
prop: prop, class: self.class.name, id: self.class.decorator.get_id(self)
|
|
147
|
-
)
|
|
144
|
+
Kernel.warn("chalk-odm: missing required property in serialize prop=#{prop.inspect} class=#{self.class.name} id=#{self.class.decorator.get_id(self).inspect}")
|
|
148
145
|
else
|
|
149
146
|
raise TypeError.new("#{self.class.name}.#{prop} not set for non-optional prop")
|
|
150
147
|
end
|