pact_broker 2.121.0 โ†’ 2.121.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: c7661eaa677cdb93cd16f3f7127b639d4870f5bb8b3e5a8dba2ec66cb7c70ca8
4
- data.tar.gz: a58e3163ab3d6278d7334d74150ba5c5c7d8d59b4eb3853e52eca589bbc17abc
3
+ metadata.gz: 49b03441c7f3ea31c20e1db9c053c6b4ce782ad321007ae1da0614774a62d614
4
+ data.tar.gz: 4898703bc36456dfd31a8d590834c2e8fd6c6f7f2a3f1919285b6358cb7e1311
5
5
  SHA512:
6
- metadata.gz: 3762e71fb291a2af1bec6986b3c60e7bf04507cd0083e5d73710c929c0965fa759ae91bfda488e735519711d56f9ef753e0ee5e36d7b4ecf2e1ec1393ec785fa
7
- data.tar.gz: b2dc3d5f691c89027c6b0f4798fbad38179bfd27b39209083fc66614d959bbf6a7e33a08c1650d4b90257bc8c9549a478f72646bae301f08c684b923a0426b1b
6
+ metadata.gz: 54728a387b6667b0867929ad94eec94fcd0eb303a84c1e8fce2311705b7971c168205a62364f77fc5754483cef7605f582d3b820d833c25693cd6cd2d17c23f7
7
+ data.tar.gz: '069dbe6afe3197ef3ad6f8035d6aee22998d8ecdec1cd582dae0d94a5555741a347a5be2ba129609f97189526a5a2ca2469fe2673805dabf26b8c22abe9acab6'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,45 @@
1
+ ## [2.121.2] _2026-09-17_
2
+
3
+ ### ๐Ÿ› Bug Fixes
4
+
5
+ - Require pact/support/matchers for pact-support 2.0
6
+
7
+ ### ๐Ÿ“ฆ Other
8
+
9
+ - Boot the app with runtime dependencies only
10
+
11
+ ## [2.121.1] _2026-09-16_
12
+
13
+ ### ๐Ÿ› Bug Fixes
14
+
15
+ - Pin rack-proxy to 0.7.7 due to failures
16
+ - _(test)_ Remove pact rack-proxy and webrick fixes, fixed in pact-ruby src
17
+ - _(test)_ Drop Term::ANSIColor from vendored match_pact matcher
18
+ - Pass JSON.parse options as keywords for json 3
19
+
20
+ ### ๐Ÿงช Testing
21
+
22
+ - Add updated provider states for pact-broker-cli
23
+
24
+ ### ๐Ÿ“ฆ Other
25
+
26
+ - Publish pact verification results from the v2 job
27
+ - Align checkout pin comment with the other jobs
28
+
29
+ ### ๐Ÿ› ๏ธ Miscellaneous Tasks
30
+
31
+ - _(ci)_ Remove notification to pact-broker-docker
32
+ - _(test)_ Workaround for empty body request
33
+ - _(test)_ Pact-ruby v2 use broker
34
+ - _(test)_ Migrate to pact-ruby v2
35
+ - _(test)_ Vendor rspec-pact-matcher code
36
+ - Rubocop
37
+ - Rubocop
38
+ - _(test)_ Preserve branch/version logic
39
+ - _(test)_ Alias pact:verify to pact:v2:verify, drop stub tasks
40
+ - _(test)_ Remove provider-state files pact-ruby v2 never loads
41
+ - _(test)_ Remove the unloaded Pact Ruby provider states
42
+
1
43
  ## [2.121.0] _2026-09-04_
2
44
 
3
45
  ### ๐Ÿš€ Features
data/Gemfile CHANGED
@@ -25,10 +25,10 @@ group :test do
25
25
  gem "pact", path: "../pact-ruby"
26
26
  gem "pact-ffi", path: "../pact-ruby-ffi"
27
27
  else
28
- gem "pact", "~>1.14"
28
+ gem "pact", ">=2.0.3"
29
29
  gem "pact-ffi", "~>0.4.28"
30
30
  end
31
- gem "rspec-pact-matchers", "~>0.1"
31
+ gem "rack-test", ">= 0.6.3", "< 3.0.0"
32
32
  gem "bundler-audit", "~>0.4"
33
33
  gem "webmock", "~>3.9"
34
34
  gem "rspec", "~>3.0"
@@ -195,7 +195,7 @@ module PactBroker
195
195
  end
196
196
 
197
197
  def consumer_contract
198
- pact_object = JSON.parse(@json_content, quirks_mode: true)
198
+ pact_object = JSON.parse(@json_content)
199
199
  convert_v3_messages_to_interactions(pact_object)
200
200
 
201
201
  pact_object["interactions"]&.each do |interaction|
@@ -121,9 +121,9 @@ module PactBroker
121
121
 
122
122
  symbolize_names = !options.key?(:symbolize_names) || options[:symbolize_names]
123
123
  parsed_params = if symbolize_names
124
- @params_with_symbol_keys ||= JSON.parse(request_body, { symbolize_names: true }.merge(PACT_PARSING_OPTIONS)) #Not load! Otherwise it will try to load Ruby classes.
124
+ @params_with_symbol_keys ||= JSON.parse(request_body, symbolize_names: true, **PACT_PARSING_OPTIONS) #Not load! Otherwise it will try to load Ruby classes.
125
125
  else
126
- @params_with_string_keys ||= JSON.parse(request_body, { symbolize_names: false }.merge(PACT_PARSING_OPTIONS)) #Not load! Otherwise it will try to load Ruby classes.
126
+ @params_with_string_keys ||= JSON.parse(request_body, symbolize_names: false, **PACT_PARSING_OPTIONS) #Not load! Otherwise it will try to load Ruby classes.
127
127
  end
128
128
 
129
129
  if !parsed_params.is_a?(Hash) && !parsed_params.is_a?(Array)
@@ -78,7 +78,7 @@ module PactBroker
78
78
  end
79
79
 
80
80
  def content_hash
81
- JSON.parse(json_content, PACT_PARSING_OPTIONS)
81
+ JSON.parse(json_content, **PACT_PARSING_OPTIONS)
82
82
  end
83
83
 
84
84
  def content_object
@@ -1,7 +1,11 @@
1
-
2
1
  module PactBroker
2
+ # Keyword options for JSON.parse. Splat them (`**PACT_PARSING_OPTIONS`):
3
+ # json 3 rejects a positional options hash.
4
+ #
5
+ # allow_duplicate_key keeps the last-key-wins behaviour that json 2
6
+ # applied by default; json 3 rejects duplicate keys unless told otherwise.
3
7
  PACT_PARSING_OPTIONS = {
4
8
  max_nesting: 50,
5
- create_additions: false
9
+ allow_duplicate_key: true
6
10
  }
7
- end
11
+ end
@@ -1,4 +1,4 @@
1
- require "pact/matchers"
1
+ require "pact/support/matchers"
2
2
  require "pact_broker/json"
3
3
  require "pact/matchers/unix_diff_formatter"
4
4
  require "pact_broker/pacts/sort_content"
@@ -10,8 +10,8 @@ module PactBroker
10
10
  extend Pact::Matchers
11
11
 
12
12
  def self.call pact_json_content, previous_pact_json_content, raw: false
13
- pact_hash = JSON.load(pact_json_content, nil, PactBroker::PACT_PARSING_OPTIONS)
14
- previous_pact_hash = JSON.load(previous_pact_json_content, nil, PactBroker::PACT_PARSING_OPTIONS)
13
+ pact_hash = JSON.parse(pact_json_content, **PactBroker::PACT_PARSING_OPTIONS)
14
+ previous_pact_hash = JSON.parse(previous_pact_json_content, **PactBroker::PACT_PARSING_OPTIONS)
15
15
 
16
16
  if !raw
17
17
  pact_hash = SortContent.call(PactBroker::Pacts::Content.from_hash(pact_hash).without_ids.to_hash)
@@ -7,7 +7,7 @@ module PactBroker
7
7
  extend self
8
8
 
9
9
  def conflict? original_json, additional_json
10
- original, additional = [original_json, additional_json].map{|str| JSON.parse(str, PACT_PARSING_OPTIONS) }
10
+ original, additional = [original_json, additional_json].map{|str| JSON.parse(str, **PACT_PARSING_OPTIONS) }
11
11
 
12
12
  if original["interactions"].nil? || additional["interactions"].nil?
13
13
  true
@@ -27,7 +27,7 @@ module PactBroker
27
27
  # TODO: is not checking response for equality!
28
28
  # TODO: should have separate tests!
29
29
  def merge_pacts original_json, additional_json
30
- original, additional = [original_json, additional_json].map{|str| JSON.parse(str, PACT_PARSING_OPTIONS) }
30
+ original, additional = [original_json, additional_json].map{|str| JSON.parse(str, **PACT_PARSING_OPTIONS) }
31
31
 
32
32
  new_pact = original
33
33
 
@@ -23,7 +23,7 @@ module PactBroker
23
23
  def self.from_request(request, path_info)
24
24
  json_content = request.body.to_s
25
25
  parsed_content = begin
26
- parsed = JSON.parse(json_content, PACT_PARSING_OPTIONS)
26
+ parsed = JSON.parse(json_content, **PACT_PARSING_OPTIONS)
27
27
  json_content = parsed.to_json # remove whitespace
28
28
  parsed
29
29
  rescue
@@ -5,7 +5,7 @@ module PactBroker
5
5
  module Pacts
6
6
  class Parse
7
7
  def self.call(json)
8
- JSON.parse(json, PACT_PARSING_OPTIONS)
8
+ JSON.parse(json, **PACT_PARSING_OPTIONS)
9
9
  end
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module PactBroker
2
- VERSION = "2.121.0"
2
+ VERSION = "2.121.2"
3
3
  end
data/pact_broker.gemspec CHANGED
@@ -59,7 +59,7 @@ Gem::Specification.new do |gem|
59
59
  gem.add_runtime_dependency "semver2", "~> 3.4.2"
60
60
  gem.add_runtime_dependency "rack", "~> 3.2"
61
61
  gem.add_runtime_dependency "redcarpet", "~> 3.5"
62
- gem.add_runtime_dependency "pact-support", "~> 1.21"
62
+ gem.add_runtime_dependency "pact-support", "~> 2.0"
63
63
  gem.add_runtime_dependency "haml", "~>5.0"
64
64
  gem.add_runtime_dependency "sucker_punch", "~>3.0"
65
65
  gem.add_runtime_dependency "rack-protection", "~> 4.1"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact_broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.121.0
4
+ version: 2.121.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bethany Skurrie
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2026-09-04 00:00:00.000000000 Z
13
+ date: 2026-09-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -158,14 +158,14 @@ dependencies:
158
158
  requirements:
159
159
  - - "~>"
160
160
  - !ruby/object:Gem::Version
161
- version: '1.21'
161
+ version: '2.0'
162
162
  type: :runtime
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - "~>"
167
167
  - !ruby/object:Gem::Version
168
- version: '1.21'
168
+ version: '2.0'
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: haml
171
171
  requirement: !ruby/object:Gem::Requirement