pact-support 1.21.0 → 1.21.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff89b1f300df93010c7b5820db53c8433fb8793ed895e8671c59b594f28008e4
4
- data.tar.gz: 192212e7600f9c1be43e3817b479d59293582ad324e32262513a8db4982d850d
3
+ metadata.gz: cf24b11040a74287c7fd78dd17dae5f87e1945835f40dcd9baff79e7887dec4a
4
+ data.tar.gz: 047adc871be1d33c163552891f17859680b68651eee8c5a465ea04289e671141
5
5
  SHA512:
6
- metadata.gz: b9335620e66ea4d6227973a7c2ca94f10bded7f05f9cdc8621715960619fcbde63e8d02d84c418027a4bde925d02dbc547641f8a73a34cb4269611016c0044f7
7
- data.tar.gz: db26dea284a359a2c0b8a4e7db2a1dac2c488f228de11e2277ca4d154b342bf1338a5b574bab9326e46e05b8a0f6c21c19f2ef1899b62811f23b057ba4d57808
6
+ metadata.gz: d541d6bb087c6eff129682c44a2918e646745f48cff163a8f6185821e00297d4b85b7c1bd07c7b5852c73bed961b0e921c53159a4e8a10ca81b79372906e59d1
7
+ data.tar.gz: b76bf798118b2cd244b337bd9af708582fc73bc122903aba6720ab7702bb2b1ea66e96a69301c8d3b6bc385e7af4b627e77f307c14982dabcf6cdfff01a81618
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ <a name="v1.21.2"></a>
2
+ ### v1.21.2 (2024-12-04)
3
+
4
+ #### Bug Fixes
5
+
6
+ * prevent insertion of extra new lines in JSON ([50189f2](/../../commit/50189f2))
7
+
8
+ <a name="v1.21.1"></a>
9
+ ### v1.21.1 (2024-11-29)
10
+
11
+ #### Bug Fixes
12
+
13
+ * add blank lines to empty hashs - json 2.8.x regression for pact-ruby ([f8cb384](/../../commit/f8cb384))
14
+
1
15
  <a name="v1.21.0"></a>
2
16
  ### v1.21.0 (2024-11-28)
3
17
 
@@ -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
70
+ .gsub(/({\s*})(?=,?$)/, "{\n }")
71
+ .gsub(/\[\s*\](?=,?$)/, "[\n ]")
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.2"
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fraser
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2024-11-29 00:00:00.000000000 Z
15
+ date: 2024-12-05 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rainbow