multi_json 1.16.0 → 1.17.0
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/CHANGELOG.md +4 -0
- data/README.md +4 -1
- data/lib/multi_json/adapters/oj.rb +1 -1
- data/lib/multi_json/convertible_hash_keys.rb +3 -3
- data/lib/multi_json/options.rb +8 -8
- data/lib/multi_json/options_cache.rb +1 -1
- data/lib/multi_json/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8391f158a04fe4c56abc8c880ff370642f80e2311c870d51f7f393db946b53df
|
4
|
+
data.tar.gz: 9677ed8bdaa4c4f03717767544c1cd8bc5f1a55510adbd42ac38fd898b85087b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8812d112eae4f61445ed679551ef0e73a075673be3676b85b1c748397559c48447b781be6297ca66007107676ceee757c1fe6774b77baf34f1fc5744a9f02ec
|
7
|
+
data.tar.gz: a3852e7e36a07428b466ee6a64edafd67f72552556164c851e44a237e2d745625302955c445a67169997d86525a49cec117153523bae03d52b2b8fd56d4a49de
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -59,10 +59,13 @@ MultiJSON falls back to [OkJson][], a simple, vendorable JSON parser.
|
|
59
59
|
This library aims to support and is [tested against](https://github.com/sferik/multi_json/actions/workflows/ci.yml) the following Ruby
|
60
60
|
implementations:
|
61
61
|
|
62
|
+
- Ruby 3.0
|
63
|
+
- Ruby 3.1
|
62
64
|
- Ruby 3.2
|
63
65
|
- Ruby 3.3
|
64
66
|
- Ruby 3.4
|
65
|
-
- [JRuby
|
67
|
+
- [JRuby][jruby] 9.4 (targets Ruby 3.1 compatibility)
|
68
|
+
- [JRuby][jruby] 10.0 (targets Ruby 3.4 compatibility)
|
66
69
|
|
67
70
|
If something doesn't work in one of these implementations, it's a bug.
|
68
71
|
|
@@ -16,7 +16,7 @@ module MultiJson
|
|
16
16
|
# shouldn't be a problem since the library is not known to be using it
|
17
17
|
# (at least for now).
|
18
18
|
class ParseError < ::SyntaxError
|
19
|
-
WRAPPED_CLASSES = %w[Oj::ParseError JSON::ParserError].
|
19
|
+
WRAPPED_CLASSES = %w[Oj::ParseError JSON::ParserError].freeze
|
20
20
|
private_constant :WRAPPED_CLASSES
|
21
21
|
|
22
22
|
def self.===(exception)
|
@@ -17,12 +17,12 @@ module MultiJson
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
def prepare_hash(value, &)
|
20
|
+
def prepare_hash(value, &block)
|
21
21
|
case value
|
22
22
|
when Array
|
23
|
-
handle_array(value, &)
|
23
|
+
handle_array(value, &block)
|
24
24
|
when Hash
|
25
|
-
handle_hash(value, &)
|
25
|
+
handle_hash(value, &block)
|
26
26
|
else
|
27
27
|
handle_simple_objects(value)
|
28
28
|
end
|
data/lib/multi_json/options.rb
CHANGED
@@ -10,12 +10,12 @@ module MultiJson
|
|
10
10
|
@dump_options = options
|
11
11
|
end
|
12
12
|
|
13
|
-
def load_options(*)
|
14
|
-
(defined?(@load_options) && get_options(@load_options, *)) || default_load_options
|
13
|
+
def load_options(*args)
|
14
|
+
(defined?(@load_options) && get_options(@load_options, *args)) || default_load_options
|
15
15
|
end
|
16
16
|
|
17
|
-
def dump_options(*)
|
18
|
-
(defined?(@dump_options) && get_options(@dump_options, *)) || default_dump_options
|
17
|
+
def dump_options(*args)
|
18
|
+
(defined?(@dump_options) && get_options(@dump_options, *args)) || default_dump_options
|
19
19
|
end
|
20
20
|
|
21
21
|
def default_load_options
|
@@ -28,8 +28,8 @@ module MultiJson
|
|
28
28
|
|
29
29
|
private
|
30
30
|
|
31
|
-
def get_options(options, *)
|
32
|
-
return handle_callable_options(options, *) if options_callable?(options)
|
31
|
+
def get_options(options, *args)
|
32
|
+
return handle_callable_options(options, *args) if options_callable?(options)
|
33
33
|
|
34
34
|
handle_hashable_options(options)
|
35
35
|
end
|
@@ -38,8 +38,8 @@ module MultiJson
|
|
38
38
|
options.respond_to?(:call)
|
39
39
|
end
|
40
40
|
|
41
|
-
def handle_callable_options(options, *)
|
42
|
-
options.arity.zero? ? options.call : options.call(*)
|
41
|
+
def handle_callable_options(options, *args)
|
42
|
+
options.arity.zero? ? options.call : options.call(*args)
|
43
43
|
end
|
44
44
|
|
45
45
|
def handle_hashable_options(options)
|
data/lib/multi_json/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module MultiJson
|
2
2
|
class Version
|
3
3
|
MAJOR = 1 unless defined? MultiJson::Version::MAJOR
|
4
|
-
MINOR =
|
4
|
+
MINOR = 17 unless defined? MultiJson::Version::MINOR
|
5
5
|
PATCH = 0 unless defined? MultiJson::Version::PATCH
|
6
6
|
PRE = nil unless defined? MultiJson::Version::PRE
|
7
7
|
|
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.
|
4
|
+
version: 1.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bleigh
|
@@ -45,10 +45,10 @@ licenses:
|
|
45
45
|
- MIT
|
46
46
|
metadata:
|
47
47
|
bug_tracker_uri: https://github.com/sferik/multi_json/issues
|
48
|
-
changelog_uri: https://github.com/sferik/multi_json/blob/v1.
|
49
|
-
documentation_uri: https://www.rubydoc.info/gems/multi_json/1.
|
48
|
+
changelog_uri: https://github.com/sferik/multi_json/blob/v1.17.0/CHANGELOG.md
|
49
|
+
documentation_uri: https://www.rubydoc.info/gems/multi_json/1.17.0
|
50
50
|
rubygems_mfa_required: 'true'
|
51
|
-
source_code_uri: https://github.com/sferik/multi_json/tree/v1.
|
51
|
+
source_code_uri: https://github.com/sferik/multi_json/tree/v1.17.0
|
52
52
|
wiki_uri: https://github.com/sferik/multi_json/wiki
|
53
53
|
rdoc_options: []
|
54
54
|
require_paths:
|
@@ -57,14 +57,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '3.
|
60
|
+
version: '3.0'
|
61
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
62
|
requirements:
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
|
-
rubygems_version: 3.
|
67
|
+
rubygems_version: 3.7.0
|
68
68
|
specification_version: 4
|
69
69
|
summary: A common interface to multiple JSON libraries.
|
70
70
|
test_files: []
|