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 +4 -4
- data/lib/immosquare-extensions/shared_methods.rb +16 -5
- data/lib/immosquare-extensions/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: d9a814af40a5f4308e8f2ece8708febeac2256e77b99974587c93383dc990783
|
4
|
+
data.tar.gz: 98f958827d42134e7ce59fa687e41c9b9ce66f59fca17cde9b0983492ce39c69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
11
|
-
|
12
|
-
when
|
13
|
-
|
14
|
-
|
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
|
|
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.
|
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-
|
11
|
+
date: 2024-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unicode_utils
|