json2-rails 1.0.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f5a97bc5d41a1ec3a4b408efa1164ab801af710
4
- data.tar.gz: d0b3628e778bff7d6754a289cff83a62a952e089
3
+ metadata.gz: f6034d542f0472a656d48daf723899add57970f1
4
+ data.tar.gz: 8384204950037f8acb2f6b1c4beb9ca83b6543f3
5
5
  SHA512:
6
- metadata.gz: bb015ecb8ea3de9002d977fe32de57423a000b34a9cd9848d596e6e37aa40250352fca4c8b5b1832b11bb977bb3b65a4de86fdf9556eccdf7a6351099d749853
7
- data.tar.gz: 30d93bdab33c91e82e29bcde4dcb07002b9a50dd931f1c7df576036b793d44992aaf1f6f636b942331de93dab3257d24e69ac952b0859c5ee10b65d5d608665e
6
+ metadata.gz: 43870c115c6a6d96f4f9cb58772b3d72223f422e827fe210fdd2e1a1539e313b9d75a9b3f6ff4350f62725da8ba7a9b4006c0e53b13277560d3e7b9f54cb2fc3
7
+ data.tar.gz: 9fb5afae4765a62767beec10473a1fa7373d1e839beeba1bf10e5efeb17af1743dcf5bb9b7815248338a0d72323344213426596840230871787b1a03a8238d0a
data/README.md CHANGED
@@ -19,10 +19,10 @@ Add the following to your `app/assets/javascripts/application.js`:
19
19
 
20
20
  //= require json2
21
21
 
22
- //= require cycle.js
22
+ //= require cycle
23
23
 
24
- //= require json.js
24
+ //= require json
25
25
 
26
- //= require json_parse.js
26
+ //= require json_parse
27
27
 
28
- //= require json_parse_state.js
28
+ //= require json_parse_state
@@ -1,5 +1,5 @@
1
1
  module Json2
2
2
  module Rails
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  json.js
3
- 2013-05-26
3
+ 2014-02-04
4
4
 
5
5
  Public Domain
6
6
 
@@ -229,19 +229,11 @@ if (typeof JSON !== 'object') {
229
229
  };
230
230
  }
231
231
 
232
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
233
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
232
+ var cx,
233
+ escapable,
234
234
  gap,
235
235
  indent,
236
- meta = { // table of character substitutions
237
- '\b': '\\b',
238
- '\t': '\\t',
239
- '\n': '\\n',
240
- '\f': '\\f',
241
- '\r': '\\r',
242
- '"' : '\\"',
243
- '\\': '\\\\'
244
- },
236
+ meta,
245
237
  rep;
246
238
 
247
239
 
@@ -392,6 +384,16 @@ if (typeof JSON !== 'object') {
392
384
  // If the JSON object does not yet have a stringify method, give it one.
393
385
 
394
386
  if (typeof JSON.stringify !== 'function') {
387
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
388
+ meta = { // table of character substitutions
389
+ '\b': '\\b',
390
+ '\t': '\\t',
391
+ '\n': '\\n',
392
+ '\f': '\\f',
393
+ '\r': '\\r',
394
+ '"' : '\\"',
395
+ '\\': '\\\\'
396
+ };
395
397
  JSON.stringify = function (value, replacer, space) {
396
398
 
397
399
  // The stringify method takes a value and an optional replacer, and an optional
@@ -439,6 +441,7 @@ if (typeof JSON !== 'object') {
439
441
  // If the JSON object does not yet have a parse method, give it one.
440
442
 
441
443
  if (typeof JSON.parse !== 'function') {
444
+ cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
442
445
  JSON.parse = function (text, reviver) {
443
446
 
444
447
  // The parse method takes a text and an optional reviver function, and returns
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  json2.js
3
- 2013-05-26
3
+ 2014-02-04
4
4
 
5
5
  Public Domain.
6
6
 
@@ -192,19 +192,11 @@ if (typeof JSON !== 'object') {
192
192
  };
193
193
  }
194
194
 
195
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
196
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
195
+ var cx,
196
+ escapable,
197
197
  gap,
198
198
  indent,
199
- meta = { // table of character substitutions
200
- '\b': '\\b',
201
- '\t': '\\t',
202
- '\n': '\\n',
203
- '\f': '\\f',
204
- '\r': '\\r',
205
- '"' : '\\"',
206
- '\\': '\\\\'
207
- },
199
+ meta,
208
200
  rep;
209
201
 
210
202
 
@@ -356,6 +348,16 @@ if (typeof JSON !== 'object') {
356
348
  // If the JSON object does not yet have a stringify method, give it one.
357
349
 
358
350
  if (typeof JSON.stringify !== 'function') {
351
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
352
+ meta = { // table of character substitutions
353
+ '\b': '\\b',
354
+ '\t': '\\t',
355
+ '\n': '\\n',
356
+ '\f': '\\f',
357
+ '\r': '\\r',
358
+ '"' : '\\"',
359
+ '\\': '\\\\'
360
+ };
359
361
  JSON.stringify = function (value, replacer, space) {
360
362
 
361
363
  // The stringify method takes a value and an optional replacer, and an optional
@@ -403,6 +405,7 @@ if (typeof JSON !== 'object') {
403
405
  // If the JSON object does not yet have a parse method, give it one.
404
406
 
405
407
  if (typeof JSON.parse !== 'function') {
408
+ cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
406
409
  JSON.parse = function (text, reviver) {
407
410
 
408
411
  // The parse method takes a text and an optional reviver function, and returns
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json2-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maksim Berjoza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-30 00:00:00.000000000 Z
11
+ date: 2014-06-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ''
14
14
  email:
@@ -17,15 +17,15 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - README.md
21
+ - lib/json2-rails.rb
20
22
  - lib/json2-rails/engine.rb
21
23
  - lib/json2-rails/version.rb
22
- - lib/json2-rails.rb
23
24
  - vendor/assets/javascripts/cycle.js
24
25
  - vendor/assets/javascripts/json.js
25
26
  - vendor/assets/javascripts/json2.js
26
27
  - vendor/assets/javascripts/json_parse.js
27
28
  - vendor/assets/javascripts/json_parse_state.js
28
- - README.md
29
29
  homepage: https://github.com/torbjon/json2-rails
30
30
  licenses:
31
31
  - MIT
@@ -36,17 +36,17 @@ require_paths:
36
36
  - lib
37
37
  required_ruby_version: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  requirements: []
48
48
  rubyforge_project:
49
- rubygems_version: 2.0.3
49
+ rubygems_version: 2.2.2
50
50
  signing_key:
51
51
  specification_version: 4
52
52
  summary: Crockford's json2, json with Rails asset pipeline