immosquare-extensions 0.1.16 → 0.1.18

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
  SHA256:
3
- metadata.gz: e917d43fa0c52a52495031fcf8918d689411b68265a0b95eb87c5646797c6926
4
- data.tar.gz: c78f61c33ee2afe225db23c232e2b413b754c482a0851a9fe6ed536721b507dc
3
+ metadata.gz: d9a814af40a5f4308e8f2ece8708febeac2256e77b99974587c93383dc990783
4
+ data.tar.gz: 98f958827d42134e7ce59fa687e41c9b9ce66f59fca17cde9b0983492ce39c69
5
5
  SHA512:
6
- metadata.gz: 1eba48121714cdfe6de72216ef5f46067005ba1ed272e7f0bc22f92db2423bb897469d60aa940c701c9f713f9927bc6daa47bfa94ed242276d401b6635f603ae
7
- data.tar.gz: e8b7307de7f4006f3135287624ef8cb863d7e0d55920d87046eb1fd52ac8ee3a5752d8154e0516d701bc8456538007b00e038d8779f92197e16f3b989d4bcdf9
6
+ metadata.gz: 0a060b80cb2d6eaea808d2eccaeab51ad03ed0bc4e6e28494e817dd5a7b6f46a5d04da6a9ca0960ad6c53ff62bf69c27ff773fab6b972b2f439f3847a32a936f
7
+ data.tar.gz: 7f9e1551a265073653fe6514361b41140ce25f31d69256fdd25b1d2ea79038095811a5fd824c904cbbb7fd7af567d1e79ac413f1dfe37c9953f2139157783e7e
@@ -7,11 +7,22 @@ module ImmosquareExtensions
7
7
  ##============================================================##
8
8
  def json_representation(value, align, indent_size, indent)
9
9
  case value
10
- when Hash, Array then dump_beautify_json(value, align, indent_size, indent + indent_size)
11
- when String then "\"#{value}\""
12
- when NilClass then "null"
13
- when TrueClass, FalseClass then value.to_s
14
- else value
10
+ when Hash, Array
11
+ dump_beautify_json(value, align, indent_size, indent + indent_size)
12
+ when String
13
+ escaped_value = value
14
+ .gsub("\\", "\\\\\\")
15
+ .gsub("\"", "\\\"")
16
+ .gsub("\r", "\\r")
17
+ .gsub("\n", "\\n")
18
+ .gsub("\t", "\\t")
19
+ "\"#{escaped_value}\""
20
+ when NilClass
21
+ "null"
22
+ when TrueClass, FalseClass
23
+ value.to_s
24
+ else
25
+ value.to_s
15
26
  end
16
27
  end
17
28
 
@@ -1,3 +1,3 @@
1
1
  module ImmosquareExtensions
2
- VERSION = "0.1.16".freeze
2
+ VERSION = "0.1.18".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immosquare-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - IMMO SQUARE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-07 00:00:00.000000000 Z
11
+ date: 2024-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unicode_utils