pact 1.67.3 → 1.67.5

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: d0abbfd69cb27fc32f03effee1d1486462b1d3c6974dd7bc1aaae7eb87857327
4
- data.tar.gz: 900e0ad53a8a5110df22b4320a339a035dc297aa9b5ff22d9aa566a2cdc69e93
3
+ metadata.gz: 8be91a33981b95189c08f545d3746c76f2f2ad8642777f753cc3b414233986de
4
+ data.tar.gz: 1bc7d8a6e8a08c47b79e73f68e0caed9585a0eafb0bc316a4e589f2b3f9028a3
5
5
  SHA512:
6
- metadata.gz: e255f4275c8f9679c667364e69f300cc6a0ff595f1b5cbadee58bfdc14d61b856530e91701d68808e4b5f26933b6a7a78e007496268748bfd476cbdfe31bbe85
7
- data.tar.gz: 6f4ea11e0b556ead31315ae9ab7da9b8c17f32337d82270f0153752788425c7ad084f19d6d6b01790a72a357dcb21c5a715923c94b5eea978745eb6c14e6a02a
6
+ metadata.gz: a73f8cf2aa2956f7e0c7ed2dc8ab35fefbf1b7a2b0ab88d21bb3936a4761ae60d2fd622c4f2a767f2b6e75837556aeb055011667def9a90b8fbe1f9df74bf0f9
7
+ data.tar.gz: e27d62a8822b43ded6ccd48b926c2833292617834c7c2b8dda45d93a26a769d1093909d87921f8c15962445d3ef2012b1df2d5417ed7a07259a4275862c9f4b9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ <a name="v1.67.5"></a>
2
+ ### v1.67.5 (2026-02-13)
3
+
4
+ #### Bug Fixes
5
+
6
+ * retry HTTP requests on 5xx status codes (502, 503, 504) ([2174a31](/../../commit/2174a31))
7
+
8
+ <a name="v1.67.4"></a>
9
+ ### v1.67.4 (2026-02-09)
10
+
11
+ #### Bug Fixes
12
+
13
+ * suppress v2 load warning in v1 mode ([4f7bab2](/../../commit/4f7bab2))
14
+ * pact-v2 verifier - pact_proxy_port was not honoured ([6a60bae](/../../commit/6a60bae))
15
+
1
16
  <a name="v1.67.3"></a>
2
17
  ### v1.67.3 (2025-11-06)
3
18
 
@@ -6,6 +6,18 @@ require 'openssl'
6
6
 
7
7
  module Pact
8
8
  module Hal
9
+ class RetriableHttpStatusError < StandardError
10
+ RETRIABLE_STATUS_CODES = [502, 503, 504].freeze
11
+
12
+ attr_reader :status_code, :response_body
13
+
14
+ def initialize status_code, response_body
15
+ @status_code = status_code
16
+ @response_body = response_body
17
+ super("HTTP #{status_code} error: #{response_body}")
18
+ end
19
+ end
20
+
9
21
  class HttpClient
10
22
  attr_accessor :username, :password, :verbose, :token
11
23
 
@@ -65,9 +77,15 @@ module Pact
65
77
  end
66
78
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
67
79
  end
68
- http.start do |http|
80
+ result = http.start do |http|
69
81
  http.request request
70
82
  end
83
+
84
+ # Raise error on specific 5xx status codes to trigger retry
85
+ status_code = result.code.to_i
86
+ raise RetriableHttpStatusError.new(status_code, result.body) if RetriableHttpStatusError::RETRIABLE_STATUS_CODES.include?(status_code)
87
+
88
+ result
71
89
  end
72
90
  Response.new(response)
73
91
  end
@@ -17,7 +17,7 @@ module Pact
17
17
  @pact_dir = opts[:pact_dir] || nil
18
18
  @logger = opts[:logger] || nil
19
19
  @provider_setup_port = opts[:provider_setup_port] || 9001
20
- @pact_proxy_port = opts[:provider_setup_port] || 9002
20
+ @pact_proxy_port = opts[:pact_proxy_port] || 9002
21
21
  @pact_uri = ENV.fetch("PACT_URL", nil) || opts.fetch(:pact_uri, nil)
22
22
  @publish_verification_results = ENV.fetch("PACT_PUBLISH_VERIFICATION_RESULTS", nil) == "true" || opts.fetch(:publish_verification_results, false)
23
23
  @provider_version = ENV.fetch("PACT_PROVIDER_VERSION", nil) || opts.fetch(:provider_version, nil)
data/lib/pact/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # Remember to bump pact-provider-proxy when this changes major version
2
2
  module Pact
3
- VERSION = "1.67.3"
3
+ VERSION = "1.67.5"
4
4
  end
data/lib/pact.rb CHANGED
@@ -7,6 +7,6 @@ require 'pact/consumer_contract'
7
7
 
8
8
  begin
9
9
  require 'pact/v2'
10
- rescue LoadError => e
11
- warn "Warning: Could not load 'pact/v2': #{e.message} \nPlease ensure that the 'pact-ffi' gem is included in your Gemfile for pact/v2 support."
12
- end
10
+ rescue LoadError
11
+ # "Please ensure that the 'pact-ffi' gem is included in your Gemfile for pact/v2 support."
12
+ end
data/pact.gemspec CHANGED
@@ -80,8 +80,6 @@ Gem::Specification.new do |gem|
80
80
  gem.add_runtime_dependency 'rack-test', '>= 0.6.3', '< 3.0.0'
81
81
  gem.add_runtime_dependency 'thor', '>= 0.20', '< 2.0'
82
82
  gem.add_runtime_dependency "rainbow", '~> 3.1'
83
- gem.add_runtime_dependency 'string_pattern', '~> 2.0'
84
- gem.add_runtime_dependency 'jsonpath', '~> 1.0'
85
83
 
86
84
  gem.add_runtime_dependency "pact-support" , "~> 1.21", ">=1.21.2"
87
85
  gem.add_runtime_dependency 'pact-mock_service', '~> 3.0', '>= 3.3.1'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.67.3
4
+ version: 1.67.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fraser
@@ -409,34 +409,6 @@ dependencies:
409
409
  - - "~>"
410
410
  - !ruby/object:Gem::Version
411
411
  version: '3.1'
412
- - !ruby/object:Gem::Dependency
413
- name: string_pattern
414
- requirement: !ruby/object:Gem::Requirement
415
- requirements:
416
- - - "~>"
417
- - !ruby/object:Gem::Version
418
- version: '2.0'
419
- type: :runtime
420
- prerelease: false
421
- version_requirements: !ruby/object:Gem::Requirement
422
- requirements:
423
- - - "~>"
424
- - !ruby/object:Gem::Version
425
- version: '2.0'
426
- - !ruby/object:Gem::Dependency
427
- name: jsonpath
428
- requirement: !ruby/object:Gem::Requirement
429
- requirements:
430
- - - "~>"
431
- - !ruby/object:Gem::Version
432
- version: '1.0'
433
- type: :runtime
434
- prerelease: false
435
- version_requirements: !ruby/object:Gem::Requirement
436
- requirements:
437
- - - "~>"
438
- - !ruby/object:Gem::Version
439
- version: '1.0'
440
412
  - !ruby/object:Gem::Dependency
441
413
  name: pact-support
442
414
  requirement: !ruby/object:Gem::Requirement
@@ -799,7 +771,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
799
771
  - !ruby/object:Gem::Version
800
772
  version: '0'
801
773
  requirements: []
802
- rubygems_version: 3.7.2
774
+ rubygems_version: 4.0.6
803
775
  specification_version: 4
804
776
  summary: Enables consumer driven contract testing, providing a mock service and DSL
805
777
  for the consumer project, and interaction playback and verification for the service