multi_json 1.13.1 → 1.14.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
- SHA1:
3
- metadata.gz: 1b1089ce9b52b1a5bd0685e39d5b7ec690d181a6
4
- data.tar.gz: f25d7e5f1f290a8c0b37e3346e6ea62639feb996
2
+ SHA256:
3
+ metadata.gz: 02ad660c95a2df79f974de05f499d46341d93c8074842a0a9e36190506342044
4
+ data.tar.gz: 9cfe4e4f78047c49b52561278f970bb9a666f42630dc1f805bedd4f3375a857d
5
5
  SHA512:
6
- metadata.gz: d1a31d1e0da0c28e7491e5ba64ed0a894eeae616d786f7308118031982f77712a2b03429622744700f3aef6577305190ca16c07d593cf2eaf4dd2b7978ba737f
7
- data.tar.gz: c983f3a10091b727058907e2518094164937a807c2f415a32743dad2f7526efd2ede74351007a29fd25b17e7472f68e50fb1f3514e6acd285e92443318af07d8
6
+ metadata.gz: 373167f0f1c769c8d8a29ca0eb4003932ad63780e3bd3e441b42bb3ca38fe50d299aaed44539187d65fd59f5c03a791d8158cc738dd96806d156087b7b90a8d7
7
+ data.tar.gz: 85e81611fc298ab9cdaca114f0a0454f0fa2957a6a492321403709592d95824988ac71611f8387799ddeb347d6c5cb19b8a911d4dea2bc380a7e8e98c7aff706
@@ -1,3 +1,9 @@
1
+ 1.14.0
2
+ ------
3
+
4
+ * [Fix a warning in Ruby 2.7](https://github.com/intridea/multi_json/commit/5d8febdbebc428882811b90d514f3628617a61d5)
5
+ * [Support Oj 3.x gem](https://github.com/intridea/multi_json/commit/5d8febdbebc428882811b90d514f3628617a61d5)
6
+
1
7
  1.13.1
2
8
  ------
3
9
 
data/README.md CHANGED
@@ -2,8 +2,7 @@
2
2
 
3
3
  [![Gem Version](http://img.shields.io/gem/v/multi_json.svg)][gem]
4
4
  [![Build Status](http://travis-ci.org/intridea/multi_json.svg)][travis]
5
- [![Dependency Status](http://img.shields.io/gemnasium/intridea/multi_json.svg)][gemnasium]
6
- [![Code Climate](http://img.shields.io/codeclimate/github/intridea/multi_json.svg)][codeclimate]
5
+ [![Code Climate](https://codeclimate.com/github/intridea/multi_json.svg)][codeclimate]
7
6
 
8
7
  Lots of Ruby libraries parse JSON and everyone has their favorite JSON coder.
9
8
  Instead of choosing a single JSON coder and forcing users of your library to be
@@ -61,17 +60,15 @@ MultiJSON falls back to [OkJson][], a simple, vendorable JSON parser.
61
60
  This library aims to support and is [tested against][travis] the following Ruby
62
61
  implementations:
63
62
 
64
- * Ruby 1.8.7
65
- * Ruby 1.9.2
66
- * Ruby 1.9.3
67
- * Ruby 2.0.0
68
- * Ruby 2.1.10
69
- * Ruby 2.2.9
70
- * Ruby 2.4.3
71
- * Ruby 2.5.0
63
+ * Ruby 1.8
64
+ * Ruby 1.9
65
+ * Ruby 2.0
66
+ * Ruby 2.1
67
+ * Ruby 2.2
68
+ * Ruby 2.4
69
+ * Ruby 2.5
70
+ * Ruby 2.6
72
71
  * [JRuby][]
73
- * [Rubinius][]
74
- * [MacRuby][] (not tested on Travis CI)
75
72
 
76
73
  If something doesn't work in one of these implementations, it's a bug.
77
74
 
@@ -107,7 +104,6 @@ and Pavel Pravosud. See [LICENSE][] for details.
107
104
 
108
105
  [codeclimate]: https://codeclimate.com/github/intridea/multi_json
109
106
  [gem]: https://rubygems.org/gems/multi_json
110
- [gemnasium]: https://gemnasium.com/intridea/multi_json
111
107
  [gson]: https://github.com/avsej/gson.rb
112
108
  [jrjackson]: https://github.com/guyboertje/jrjackson
113
109
  [jruby]: http://www.jruby.org/
@@ -119,7 +115,6 @@ and Pavel Pravosud. See [LICENSE][] for details.
119
115
  [oj]: https://github.com/ohler55/oj
120
116
  [okjson]: https://github.com/kr/okjson
121
117
  [pvc]: http://docs.rubygems.org/read/chapter/16#page74
122
- [rubinius]: http://rubini.us/
123
118
  [semver]: http://semver.org/
124
119
  [travis]: http://travis-ci.org/intridea/multi_json
125
120
  [yajl]: https://github.com/brianmario/yajl-ruby
@@ -1,3 +1,6 @@
1
+ # This adapter is here for legacy reasons. We can't really test it, so it's hard
2
+ # to tell if it's even working properly. If you're still using it, please
3
+ # consider migrating to any other adapter out there.
1
4
  framework 'Foundation'
2
5
  require 'multi_json/adapters/ok_json'
3
6
 
@@ -34,10 +34,29 @@ module MultiJson
34
34
  ::Oj.load(string, options)
35
35
  end
36
36
 
37
- def dump(object, options = {})
38
- options.merge!(:indent => 2) if options[:pretty]
39
- options[:indent] = options[:indent].to_i if options[:indent]
40
- ::Oj.dump(object, options)
37
+ case ::Oj::VERSION
38
+ when /\A2\./
39
+ def dump(object, options = {})
40
+ options.merge!(:indent => 2) if options[:pretty]
41
+ options[:indent] = options[:indent].to_i if options[:indent]
42
+ ::Oj.dump(object, options)
43
+ end
44
+ when /\A3\./
45
+ PRETTY_STATE_PROTOTYPE = {
46
+ :indent => " ",
47
+ :space => " ",
48
+ :space_before => "",
49
+ :object_nl => "\n",
50
+ :array_nl => "\n",
51
+ :ascii_only => false,
52
+ }
53
+
54
+ def dump(object, options = {})
55
+ options.merge!(PRETTY_STATE_PROTOTYPE.dup) if options.delete(:pretty)
56
+ ::Oj.dump(object, options)
57
+ end
58
+ else
59
+ fail "Unsupported Oj version: #{::Oj::VERSION}"
41
60
  end
42
61
  end
43
62
  end
@@ -1,8 +1,8 @@
1
1
  module MultiJson
2
2
  class Version
3
3
  MAJOR = 1 unless defined? MultiJson::Version::MAJOR
4
- MINOR = 13 unless defined? MultiJson::Version::MINOR
5
- PATCH = 1 unless defined? MultiJson::Version::PATCH
4
+ MINOR = 14 unless defined? MultiJson::Version::MINOR
5
+ PATCH = 0 unless defined? MultiJson::Version::PATCH
6
6
  PRE = nil unless defined? MultiJson::Version::PRE
7
7
 
8
8
  class << self
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.13.1
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh
@@ -10,45 +10,37 @@ authors:
10
10
  - Pavel Pravosud
11
11
  autorequire:
12
12
  bindir: bin
13
- cert_chain:
14
- - |
15
- -----BEGIN CERTIFICATE-----
16
- MIIDYDCCAkigAwIBAgIBATANBgkqhkiG9w0BAQUFADA7MQ0wCwYDVQQDDAR5b3Vy
17
- MRUwEwYKCZImiZPyLGQBGRYFZW1haWwxEzARBgoJkiaJk/IsZAEZFgNjb20wHhcN
18
- MTgwMTA4MjIyOTMyWhcNMTkwMTA4MjIyOTMyWjA7MQ0wCwYDVQQDDAR5b3VyMRUw
19
- EwYKCZImiZPyLGQBGRYFZW1haWwxEzARBgoJkiaJk/IsZAEZFgNjb20wggEiMA0G
20
- CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDG77wIkJev2/a8aPpyEYBhj7izfPiP
21
- C66ZWkPauvkV6MB2CPEH27ivgtHAxxu8R31C+ZXDL9WA+LLwrklcbAyaPynTEV/g
22
- eYp6dxptxmeXoHT+CLrDaQtpEpOmljEUg7CPaSNjXw3/Qi7QndsPh88c8X97dFvb
23
- +yCf9NCI1QjyES4dLEioKqk/smf54zEM508iPlsAdxKDZ12LPOxVY8+q/dWRtlCK
24
- 6upwAddBhiVl5uksKD26NtaQNMgPXmqYLN3A2eLtktPncF+IYK5DRIPnRd6RhNuV
25
- ZCxXw6UPH0IIYp62bNAb5IneaooJ/ROlBRC1qGfLIx1IA8BkwfITUJYrAgMBAAGj
26
- bzBtMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQudQhSt5zoh7J8
27
- RFSAHv5Aycm0pDAZBgNVHREEEjAQgQ55b3VyQGVtYWlsLmNvbTAZBgNVHRIEEjAQ
28
- gQ55b3VyQGVtYWlsLmNvbTANBgkqhkiG9w0BAQUFAAOCAQEAuDFit+TKy6Z8i02y
29
- htEeuNL9ZNVBfmv6Li6AdUKoiCgStjbH0NKaC6eTx+4glHfZS3o/vLdnHKeoWwJs
30
- kVIWEQgaUVabD+bkdS9s5icM3ox2XxRJd9uDW62WvFHFZzbJiLkop9XvnnAgMlGy
31
- O4oewvfU2u5E1kTY9nGnnTngKaw0Zh1VN6yexwv1FIOBXAaAYclVTfbEEzBqHLK/
32
- 80mUboJWH2DXpWM6JCwGR7Blt2Zsfp172JjwW75/VQwPndKZDCkjTN/7MbHgvUQR
33
- X7myOZyY2pB6iYleyWB68zhOnqbtf/3ZYS8vfSd1M5qt8TzmgR4VdbogpEr4wRV6
34
- KG+kpw==
35
- -----END CERTIFICATE-----
36
- date: 2018-01-10 00:00:00.000000000 Z
13
+ cert_chain: []
14
+ date: 2019-10-14 00:00:00.000000000 Z
37
15
  dependencies:
38
16
  - !ruby/object:Gem::Dependency
39
- name: bundler
17
+ name: rake
40
18
  requirement: !ruby/object:Gem::Requirement
41
19
  requirements:
42
20
  - - "~>"
43
21
  - !ruby/object:Gem::Version
44
- version: '1.0'
22
+ version: '10.5'
45
23
  type: :development
46
24
  prerelease: false
47
25
  version_requirements: !ruby/object:Gem::Requirement
48
26
  requirements:
49
27
  - - "~>"
50
28
  - !ruby/object:Gem::Version
51
- version: '1.0'
29
+ version: '10.5'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - "~>"
35
+ - !ruby/object:Gem::Version
36
+ version: '3.9'
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '3.9'
52
44
  description: A common interface to multiple JSON libraries, including Oj, Yajl, the
53
45
  JSON gem (with C-extensions), the pure-Ruby JSON gem, NSJSONSerialization, gson.rb,
54
46
  JrJackson, and OkJson.
@@ -102,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
94
  - !ruby/object:Gem::Version
103
95
  version: 1.3.5
104
96
  requirements: []
105
- rubyforge_project:
106
- rubygems_version: 2.6.14
97
+ rubygems_version: 3.0.3
107
98
  signing_key:
108
99
  specification_version: 4
109
100
  summary: A common interface to multiple JSON libraries.
Binary file
data.tar.gz.sig DELETED
@@ -1 +0,0 @@
1
- kx|�1��a��eW�V貏�a�ڏ�_P�D*���>R�%���I"]�C������W<���H%�J��7c�R�߻�HMV0�2�h32jj9W�e��ar����>;\o��p��ܬ���;ԕyC�N��
metadata.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- R�N1-0�}�D9Ҧ��1Y-�m{v�N{ ���:������N.��o�w� "���P�q�����d� F�\&�In^x��o��iN`�����=�t�GU��iJ�~�L���FM�p<���������
2
- sEb���0���g�V�2W}�