gon 7.0.0 → 7.1.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/README.md +1 -1
- data/lib/gon/json_dumper.rb +7 -2
- data/lib/gon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f6c1ea562fb5905e119179a42c8f98a33dd59b163ba23fb6cad4cb14233e5a4
|
|
4
|
+
data.tar.gz: d72eafdc9044dc21514354608f309fb6ffb312ee57aeb0849fea680f7f37212a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69f8734f5979ab7409c979490754a467ef1506eef1f13e5502b6ae00feea8faf17067b6a97c799243c7eddc3730d46453c762b9b523a83cd5df16f2288bc2116
|
|
7
|
+
data.tar.gz: 509bcaa61b4953ed76521be600a62865e3ef3918fea97a78c4cc889b026979cda435ffe96b04a6343ad70badfd0eafe193951ab3f38e96afc03e3cc803d06f63
|
data/README.md
CHANGED
|
@@ -221,7 +221,7 @@ usage gon.global.
|
|
|
221
221
|
## Speed up Gon
|
|
222
222
|
|
|
223
223
|
You can use any [JSON Engine](https://github.com/sferik/multi_json#supported-json-engines) you want.
|
|
224
|
-
Gon uses
|
|
224
|
+
Gon uses multi_json with autodetect mode, so all you need is just require your JSON library.
|
|
225
225
|
|
|
226
226
|
## Current Maintainers
|
|
227
227
|
|
data/lib/gon/json_dumper.rb
CHANGED
|
@@ -13,8 +13,13 @@ class Gon
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
def self.dump(object)
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
options = { mode: :compat, escape_mode: :xss_safe, time_format: :ruby }
|
|
17
|
+
dumped_json = if defined?(MultiJSON)
|
|
18
|
+
MultiJSON.generate(object, options)
|
|
19
|
+
else
|
|
20
|
+
MultiJson.dump(object, options)
|
|
21
|
+
end
|
|
22
|
+
|
|
18
23
|
escape(dumped_json)
|
|
19
24
|
end
|
|
20
25
|
|
data/lib/gon/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.
|
|
4
|
+
version: 7.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- gazay
|
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
196
196
|
- !ruby/object:Gem::Version
|
|
197
197
|
version: '0'
|
|
198
198
|
requirements: []
|
|
199
|
-
rubygems_version: 4.0.
|
|
199
|
+
rubygems_version: 4.0.10
|
|
200
200
|
specification_version: 4
|
|
201
201
|
summary: Get your Rails variables in your JS
|
|
202
202
|
test_files: []
|