multi_json 1.21.0-java → 1.21.1-java
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/multi_json/version.rb +1 -1
- data/lib/multi_json.rb +20 -38
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6211fdc754ee607d609eeb27293cdaf1ebec9c227cb866ae67d11d7b4ab9cfe0
|
|
4
|
+
data.tar.gz: dbfefd823106cd5fc49b4b6eddf8c5330eaaa9a76bc2e7cb397159a2b0b55ec5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 105b0b7c840311ff8697d0123bfea14796786256166d84549cfc35a3cec4c9cf012cd7151a28dfd53b2e2e37a7ffd7e0d8befbdaaca3ecdc0976f3fad5fb5e6a
|
|
7
|
+
data.tar.gz: ca97c83c34cd93b188906ad77483ab99784afcdc5d33ee6b8d31a6213481cc16a4c622623c2939e3236bbed9ec01e52cae8f7cd6b11a4bf8bc8c1189370e4864
|
data/lib/multi_json/version.rb
CHANGED
|
@@ -10,7 +10,7 @@ module MultiJSON
|
|
|
10
10
|
# Minor version number
|
|
11
11
|
MINOR = 21 unless defined? MultiJSON::Version::MINOR
|
|
12
12
|
# Patch version number
|
|
13
|
-
PATCH =
|
|
13
|
+
PATCH = 1 unless defined? MultiJSON::Version::PATCH
|
|
14
14
|
# Pre-release version suffix
|
|
15
15
|
PRE = nil unless defined? MultiJSON::Version::PRE
|
|
16
16
|
|
data/lib/multi_json.rb
CHANGED
|
@@ -272,52 +272,34 @@ require_relative "multi_json/deprecated"
|
|
|
272
272
|
#
|
|
273
273
|
# Downstream code that still writes ``MultiJson.parse(...)`` or
|
|
274
274
|
# ``rescue MultiJson::ParseError`` continues to work, but emits a
|
|
275
|
-
# one-time deprecation warning pointing at ``MultiJSON``.
|
|
276
|
-
#
|
|
277
|
-
#
|
|
278
|
-
# and ``::`` constant lookups (including rescue clauses)
|
|
279
|
-
# the canonical module.
|
|
275
|
+
# one-time deprecation warning pointing at ``MultiJSON``. Each public
|
|
276
|
+
# method on {MultiJSON} gets an explicit forwarder defined on this
|
|
277
|
+
# module, and constant access resolves via {.const_missing}, so both
|
|
278
|
+
# dotted calls and ``::`` constant lookups (including rescue clauses)
|
|
279
|
+
# route through the canonical module.
|
|
280
280
|
#
|
|
281
281
|
# @api public
|
|
282
282
|
# @deprecated Use {MultiJSON} (all-caps) instead. Will be removed in v2.0.
|
|
283
283
|
module MultiJson
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
# MultiJson.parse('{"a":1}') # delegates to MultiJSON.parse
|
|
297
|
-
# rubocop:disable Naming/BlockForwarding, Style/ArgumentsForwarding
|
|
298
|
-
def method_missing(name, *args, **kwargs, &block)
|
|
284
|
+
# Forward every public method MultiJSON exposes through an explicit
|
|
285
|
+
# singleton method on the legacy MultiJson module, so callers that
|
|
286
|
+
# capture the method as a Method object (``MultiJson.method(:load)``)
|
|
287
|
+
# find this forwarder instead of falling back to inherited methods like
|
|
288
|
+
# ``Kernel#load``. The earlier ``method_missing``-based shim left
|
|
289
|
+
# ``MultiJson.method(:load)`` resolving to ``Kernel#load`` (because
|
|
290
|
+
# ``Module#method`` doesn't consult ``method_missing``) and broke
|
|
291
|
+
# libraries (Sawyer, Octokit, Danger) that capture decoders as Method
|
|
292
|
+
# objects. Forwarding eagerly fixes the capture path while preserving
|
|
293
|
+
# the one-time deprecation warning each call emits.
|
|
294
|
+
(::MultiJSON.public_methods - ::Module.public_methods).each do |forwarded|
|
|
295
|
+
define_singleton_method(forwarded) do |*args, **kwargs, &block|
|
|
299
296
|
::MultiJSON.warn_deprecation_once(:multi_json_constant,
|
|
300
297
|
"The MultiJson constant is deprecated and will be removed in v2.0. Use MultiJSON instead.")
|
|
301
|
-
|
|
302
|
-
::MultiJSON.public_send(name, *args, **kwargs, &block)
|
|
303
|
-
else
|
|
304
|
-
super
|
|
305
|
-
end
|
|
306
|
-
end
|
|
307
|
-
# rubocop:enable Naming/BlockForwarding, Style/ArgumentsForwarding
|
|
308
|
-
|
|
309
|
-
# Respond to any method {MultiJSON} responds to
|
|
310
|
-
#
|
|
311
|
-
# @api public
|
|
312
|
-
# @param name [Symbol] method name
|
|
313
|
-
# @param include_private [Boolean] include private methods
|
|
314
|
-
# @return [Boolean] true if {MultiJSON} responds to the method
|
|
315
|
-
# @example
|
|
316
|
-
# MultiJson.respond_to?(:parse) #=> true
|
|
317
|
-
def respond_to_missing?(name, include_private)
|
|
318
|
-
::MultiJSON.respond_to?(name, include_private)
|
|
298
|
+
::MultiJSON.public_send(forwarded, *args, **kwargs, &block)
|
|
319
299
|
end
|
|
300
|
+
end
|
|
320
301
|
|
|
302
|
+
class << self
|
|
321
303
|
# Resolve missing constants to their {MultiJSON} counterparts
|
|
322
304
|
#
|
|
323
305
|
# Enables ``rescue MultiJson::ParseError`` and
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: multi_json
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.21.
|
|
4
|
+
version: 1.21.1
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Bleigh
|
|
@@ -59,10 +59,10 @@ licenses:
|
|
|
59
59
|
- MIT
|
|
60
60
|
metadata:
|
|
61
61
|
bug_tracker_uri: https://github.com/sferik/multi_json/issues
|
|
62
|
-
changelog_uri: https://github.com/sferik/multi_json/blob/v1.21.
|
|
63
|
-
documentation_uri: https://www.rubydoc.info/gems/multi_json/1.21.
|
|
62
|
+
changelog_uri: https://github.com/sferik/multi_json/blob/v1.21.1/CHANGELOG.md
|
|
63
|
+
documentation_uri: https://www.rubydoc.info/gems/multi_json/1.21.1
|
|
64
64
|
rubygems_mfa_required: 'true'
|
|
65
|
-
source_code_uri: https://github.com/sferik/multi_json/tree/v1.21.
|
|
65
|
+
source_code_uri: https://github.com/sferik/multi_json/tree/v1.21.1
|
|
66
66
|
wiki_uri: https://github.com/sferik/multi_json/wiki
|
|
67
67
|
rdoc_options: []
|
|
68
68
|
require_paths:
|