sqreen 1.8.3 → 1.8.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c25d9bfae45383d134011ff11e187256063d0eca
4
- data.tar.gz: 482f4d1139ed1addf8bf8285dd01b67506aee476
3
+ metadata.gz: b98e63dada1f42cf20026dd3cc0c9785716fbffc
4
+ data.tar.gz: fe78cceafb93d57e06919df9fb7f7021007d9426
5
5
  SHA512:
6
- metadata.gz: 2bfa1d2ff6948aabfe53f0ac7054462853fbca06e4352a05110773cedbfa322e07fe00a8f19e1ff13022788de38d44882addca3fa80116b5b6e8a3ce6119a9cb
7
- data.tar.gz: 38098c0e24614ad974830edd048b5fc49489553b0b105ba53a824f7642446a69bb39fa5145b19bee8959a04d2a22d7b1cdb541d131a7bbe1936c5e995316d608
6
+ metadata.gz: 97edd909e427fbf02d791c05633dc4d3a4d997093030511d6f4b0ee5c085a9792b3c6c3f7ad1e35bebb57a87236fce7e34a718c7e896efcd91e4354ab3c34dcc
7
+ data.tar.gz: ce0cfcdf70964f359da9efa7a7b9a3ab3cbab223a2a8ae7e284715e01a2f25215aeff270b957254addfac01ff9c90e0a7215ce3d074031fef3ea97111735b89c
@@ -62,7 +62,11 @@ module Sqreen
62
62
  end
63
63
  "[#{ary.join(',')}]"
64
64
  when String, Integer
65
- JSON.dump(val)
65
+ begin
66
+ JSON.dump(val)
67
+ rescue JSON::GeneratorError
68
+ JSON.generate(val, :quirks_mode => true)
69
+ end
66
70
  else
67
71
  msg = "JSON hash parsing error (wrong value type: #{val.class})"
68
72
  raise Sqreen::Exception.new, msg
@@ -72,7 +76,11 @@ module Sqreen
72
76
  def normalize_key(key)
73
77
  case key
74
78
  when String, Integer
75
- JSON.dump(key)
79
+ begin
80
+ JSON.dump(key)
81
+ rescue JSON::GeneratorError
82
+ JSON.generate(key, :quirks_mode => true)
83
+ end
76
84
  else
77
85
  msg = "JSON hash parsing error (wrong key type: #{key.class})"
78
86
  raise Sqreen::Exception, msg
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.io/terms.html
3
3
  module Sqreen
4
- VERSION = '1.8.3'.freeze
4
+ VERSION = '1.8.4'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqreen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sqreen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-04 00:00:00.000000000 Z
11
+ date: 2017-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs