pact-support 1.21.0 → 1.21.1

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: ff89b1f300df93010c7b5820db53c8433fb8793ed895e8671c59b594f28008e4
4
- data.tar.gz: 192212e7600f9c1be43e3817b479d59293582ad324e32262513a8db4982d850d
3
+ metadata.gz: 52290425c9eb827bf11c7b843eaeaa0fdd4db4557db29a997204869f89448467
4
+ data.tar.gz: ccbc81de3bfe1545b139d9f70544ea4d094cfb7a77feb2048b9223eb24ccfc68
5
5
  SHA512:
6
- metadata.gz: b9335620e66ea4d6227973a7c2ca94f10bded7f05f9cdc8621715960619fcbde63e8d02d84c418027a4bde925d02dbc547641f8a73a34cb4269611016c0044f7
7
- data.tar.gz: db26dea284a359a2c0b8a4e7db2a1dac2c488f228de11e2277ca4d154b342bf1338a5b574bab9326e46e05b8a0f6c21c19f2ef1899b62811f23b057ba4d57808
6
+ metadata.gz: 8bfad709827f74beb3c4c72da3ef1ed9140f8b0db1a9824dd5a1bf42b8b3cf1d8b10997f41fba7267f0015a86d0421ee9edb96bcb4e8e9239ef4e9e9cbea2d12
7
+ data.tar.gz: f696db8fd1d417c05b5f58e47a04c950be78e4aa91c0ae70600c66f6026c59fb61617469830787450eccd888b34c3326061b5a1185c03da3ea0e68cb1187af50
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ <a name="v1.21.1"></a>
2
+ ### v1.21.1 (2024-11-29)
3
+
4
+ #### Bug Fixes
5
+
6
+ * add blank lines to empty hashs - json 2.8.x regression for pact-ruby ([f8cb384](/../../commit/f8cb384))
7
+
1
8
  <a name="v1.21.0"></a>
2
9
  ### v1.21.0 (2024-11-28)
3
10
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "1.21.0"
3
+ VERSION = "1.21.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.21.0
4
+ version: 1.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fraser