pact-support 1.21.0 → 1.21.1
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/CHANGELOG.md +7 -0
- data/lib/pact/shared/active_support_support.rb +10 -1
- data/lib/pact/support/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52290425c9eb827bf11c7b843eaeaa0fdd4db4557db29a997204869f89448467
|
4
|
+
data.tar.gz: ccbc81de3bfe1545b139d9f70544ea4d094cfb7a77feb2048b9223eb24ccfc68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bfad709827f74beb3c4c72da3ef1ed9140f8b0db1a9824dd5a1bf42b8b3cf1d8b10997f41fba7267f0015a86d0421ee9edb96bcb4e8e9239ef4e9e9cbea2d12
|
7
|
+
data.tar.gz: f696db8fd1d417c05b5f58e47a04c950be78e4aa91c0ae70600c66f6026c59fb61617469830787450eccd888b34c3326061b5a1185c03da3ea0e68cb1187af50
|
data/CHANGELOG.md
CHANGED
@@ -42,10 +42,11 @@ module Pact
|
|
42
42
|
# Oh ActiveSupport, why....
|
43
43
|
def fix_json_formatting json
|
44
44
|
if json =~ /\{".*?":"/
|
45
|
-
JSON.pretty_generate(JSON.parse(json, create_additions: false))
|
45
|
+
json = JSON.pretty_generate(JSON.parse(json, create_additions: false))
|
46
46
|
else
|
47
47
|
json
|
48
48
|
end
|
49
|
+
fix_empty_hash_and_array json
|
49
50
|
end
|
50
51
|
|
51
52
|
def remove_unicode json
|
@@ -61,5 +62,13 @@ module Pact
|
|
61
62
|
end
|
62
63
|
end
|
63
64
|
end
|
65
|
+
|
66
|
+
private
|
67
|
+
|
68
|
+
def fix_empty_hash_and_array json
|
69
|
+
json = json.gsub(/({\s*})/, "{\n }")
|
70
|
+
json.gsub(/\[\s*\]/, "[\n ]")
|
71
|
+
json
|
72
|
+
end
|
64
73
|
end
|
65
74
|
end
|
data/lib/pact/support/version.rb
CHANGED