multi_json 1.17.0 → 1.18.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8391f158a04fe4c56abc8c880ff370642f80e2311c870d51f7f393db946b53df
4
- data.tar.gz: 9677ed8bdaa4c4f03717767544c1cd8bc5f1a55510adbd42ac38fd898b85087b
3
+ metadata.gz: e4844623fce51f6461e352b05ed0bf04712f213e33a290398c5ee46847a2fefb
4
+ data.tar.gz: 78985a7bae5a3c1001f19151f85ed221c8e392811edfda5ab3eb916785d6c465
5
5
  SHA512:
6
- metadata.gz: c8812d112eae4f61445ed679551ef0e73a075673be3676b85b1c748397559c48447b781be6297ca66007107676ceee757c1fe6774b77baf34f1fc5744a9f02ec
7
- data.tar.gz: a3852e7e36a07428b466ee6a64edafd67f72552556164c851e44a237e2d745625302955c445a67169997d86525a49cec117153523bae03d52b2b8fd56d4a49de
6
+ metadata.gz: 728727f42292c6aeb50fe442f60bd930a68aa7de9713ce109806e204b071a9ef4763b766a6860fa1407724584413ae3d298fe75cfc081aed69e4654e687dce0c
7
+ data.tar.gz: 54df198586a1118df89ce5467cc9ada2942842c10ed88355e5891f2b39b79a219516647a8beea2f7facfc24d78def27659e984840a5eb28388a5a1d4a689c29f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 1.18.0
2
+ ------
3
+ * [Fix conflict between JSON gem and ActiveSupport](https://github.com/intridea/multi_json/issues/222)
4
+
1
5
  1.17.0
2
6
  ------
3
7
  * [Revert minimum ruby version requirement](https://github.com/sferik/multi_json/pull/16)
@@ -161,12 +165,12 @@
161
165
 
162
166
  1.6.0
163
167
  -----
164
- * [Add gson.rb support](https://github.com/sferik/multi_json/pull/71)
165
- * [Add MultiJson.default_options](https://github.com/sferik/multi_json/pull/70)
166
- * [Add MultiJson.with_adapter](https://github.com/sferik/multi_json/pull/67)
167
- * [Stringify all possible keys for ok_json](https://github.com/sferik/multi_json/pull/66)
168
+ * [Add gson.rb support](https://github.com/intridea/multi_json/pull/71)
169
+ * [Add MultiJson.default_options](https://github.com/intridea/multi_json/pull/70)
170
+ * [Add MultiJson.with_adapter](https://github.com/intridea/multi_json/pull/67)
171
+ * [Stringify all possible keys for ok_json](https://github.com/intridea/multi_json/pull/66)
168
172
  * [Use JSON.generate instead of #to_json](https://github.com/sferik/multi_json/issues/73)
169
- * [Alias `MultiJson::DecodeError` to `MultiJson::LoadError`](https://github.com/sferik/multi_json/pull/79)
173
+ * [Alias `MultiJson::DecodeError` to `MultiJson::LoadError`](https://github.com/intridea/multi_json/pull/79)
170
174
 
171
175
  1.5.1
172
176
  -----
@@ -25,9 +25,14 @@ module MultiJson
25
25
  end
26
26
 
27
27
  def dump(object, options = {})
28
- options.merge!(PRETTY_STATE_PROTOTYPE) if options.delete(:pretty)
28
+ opts = options.dup
29
29
 
30
- object.to_json(options)
30
+ if opts.delete(:pretty)
31
+ opts = PRETTY_STATE_PROTOTYPE.merge(opts)
32
+ return ::JSON.pretty_generate(object, opts)
33
+ end
34
+
35
+ ::JSON.generate(object, opts)
31
36
  end
32
37
  end
33
38
  end
@@ -6,6 +6,7 @@ module MultiJson
6
6
  module Adapters
7
7
  class OkJson < Adapter
8
8
  include ConvertibleHashKeys
9
+
9
10
  ParseError = ::MultiJson::OkJson::Error
10
11
 
11
12
  def load(string, options = {})
@@ -20,7 +20,7 @@ module MultiJson
20
20
  end
21
21
  end
22
22
 
23
- def fetch(key, &block)
23
+ def fetch(key)
24
24
  @mutex.synchronize do
25
25
  return @cache[key] if @cache.key?(key)
26
26
  end
@@ -1,7 +1,7 @@
1
1
  module MultiJson
2
2
  class Version
3
3
  MAJOR = 1 unless defined? MultiJson::Version::MAJOR
4
- MINOR = 17 unless defined? MultiJson::Version::MINOR
4
+ MINOR = 18 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.17.0
4
+ version: 1.18.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.17.0/CHANGELOG.md
49
- documentation_uri: https://www.rubydoc.info/gems/multi_json/1.17.0
48
+ changelog_uri: https://github.com/sferik/multi_json/blob/v1.18.0/CHANGELOG.md
49
+ documentation_uri: https://www.rubydoc.info/gems/multi_json/1.18.0
50
50
  rubygems_mfa_required: 'true'
51
- source_code_uri: https://github.com/sferik/multi_json/tree/v1.17.0
51
+ source_code_uri: https://github.com/sferik/multi_json/tree/v1.18.0
52
52
  wiki_uri: https://github.com/sferik/multi_json/wiki
53
53
  rdoc_options: []
54
54
  require_paths:
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0'
66
66
  requirements: []
67
- rubygems_version: 3.7.0
67
+ rubygems_version: 3.7.2
68
68
  specification_version: 4
69
69
  summary: A common interface to multiple JSON libraries.
70
70
  test_files: []