pact 1.59.0 → 1.60.0

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: af00495e49852d068acbf8b6506801223c8f0760abfd757fcb73d49f06781060
4
- data.tar.gz: cc0598bbde870c213eddcc20bcea43bfc47db77a5fc0faf008239b7a79ef6c5f
3
+ metadata.gz: 2c47a890620bb658d731e15874d9a2921bdc0b349c0f4c7b5a5cab6f4d4938ee
4
+ data.tar.gz: 133ccad2b3905c2cff2cee872c790bc11334a155a799b92824f0a669a2f1538e
5
5
  SHA512:
6
- metadata.gz: 89598a20ef196beff002e418f4aa903b9975c75774ce9c8aa2b7bb4ea978a1d9668bfb83e49325d5c88fbe39c43ed15af880ae7e0e757f9fb44112577f401716
7
- data.tar.gz: 6de032e0069da9cb7705e9fb02db2383145449e38865f2367eb68cbea68daa7887ae410ee7bab015ceb292272ab8696d5488bc4a0c310a66127d627fec70dd24
6
+ metadata.gz: 2b655070423818845c7ba052ca1ce81a9e73c3066c4f1b5c915169ef8d3c810696bc84cb773c4b10993a471e9428ad93021480fda51cc26d949568ecc1ecca73
7
+ data.tar.gz: 9f7e7d365fc7326e9714120bfaa4c0cfd4df27c29d44deb213310ed5cc9374e44e462f311e57fe3e7181ade321a0f1543202da24267da10eb78ced5cc872865c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ <a name="v1.60.0"></a>
2
+ ### v1.60.0 (2021-10-01)
3
+
4
+ #### Features
5
+
6
+ * allow SSL verification to be disabled in the HAL client by setting the environment variable PACT_DISABLE_SSL_VERIFICATION=true ([ce07d32](/../../commit/ce07d32))
7
+
1
8
  <a name="v1.59.0"></a>
2
9
  ### v1.59.0 (2021-09-07)
3
10
 
@@ -2,6 +2,7 @@ require 'pact/retry'
2
2
  require 'pact/hal/authorization_header_redactor'
3
3
  require 'net/http'
4
4
  require 'rack'
5
+ require 'openssl'
5
6
 
6
7
  module Pact
7
8
  module Hal
@@ -48,10 +49,16 @@ module Pact
48
49
  def perform_request request, uri
49
50
  response = Retry.until_true do
50
51
  http = Net::HTTP.new(uri.host, uri.port, :ENV)
51
- http.set_debug_output(output_stream) if verbose || ENV['VERBOSE'] == 'true'
52
+ http.set_debug_output(output_stream) if verbose?
52
53
  http.use_ssl = (uri.scheme == 'https')
53
54
  http.ca_file = ENV['SSL_CERT_FILE'] if ENV['SSL_CERT_FILE'] && ENV['SSL_CERT_FILE'] != ''
54
55
  http.ca_path = ENV['SSL_CERT_DIR'] if ENV['SSL_CERT_DIR'] && ENV['SSL_CERT_DIR'] != ''
56
+ if disable_ssl_verification?
57
+ if verbose?
58
+ Pact.configuration.output_stream.puts("SSL verification is disabled")
59
+ end
60
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
61
+ end
55
62
  http.start do |http|
56
63
  http.request request
57
64
  end
@@ -63,6 +70,14 @@ module Pact
63
70
  AuthorizationHeaderRedactor.new(Pact.configuration.output_stream)
64
71
  end
65
72
 
73
+ def verbose?
74
+ verbose || ENV['VERBOSE'] == 'true'
75
+ end
76
+
77
+ def disable_ssl_verification?
78
+ ENV['PACT_DISABLE_SSL_VERIFICATION'] == 'true' || ENV['PACT_BROKER_DISABLE_SSL_VERIFICATION'] == 'true'
79
+ end
80
+
66
81
  class Response < SimpleDelegator
67
82
  def body
68
83
  bod = raw_body
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.59.0"
3
+ VERSION = "1.60.0"
4
4
  end
data/pact.gemspec CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |gem|
32
32
  gem.add_runtime_dependency 'webrick', '~> 1.3'
33
33
  gem.add_runtime_dependency 'term-ansicolor', '~> 1.0'
34
34
 
35
- gem.add_runtime_dependency 'pact-support', '~> 1.15'
35
+ gem.add_runtime_dependency 'pact-support', '~> 1.16', '>= 1.16.9'
36
36
  gem.add_runtime_dependency 'pact-mock_service', '~> 3.0', '>= 3.3.1'
37
37
 
38
38
  gem.add_development_dependency 'rake', '~> 13.0'
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.59.0
4
+ version: 1.60.0
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: 2021-09-07 00:00:00.000000000 Z
15
+ date: 2021-10-01 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rspec
@@ -102,14 +102,20 @@ dependencies:
102
102
  requirements:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
- version: '1.15'
105
+ version: '1.16'
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: 1.16.9
106
109
  type: :runtime
107
110
  prerelease: false
108
111
  version_requirements: !ruby/object:Gem::Requirement
109
112
  requirements:
110
113
  - - "~>"
111
114
  - !ruby/object:Gem::Version
112
- version: '1.15'
115
+ version: '1.16'
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: 1.16.9
113
119
  - !ruby/object:Gem::Dependency
114
120
  name: pact-mock_service
115
121
  requirement: !ruby/object:Gem::Requirement
@@ -405,7 +411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
405
411
  - !ruby/object:Gem::Version
406
412
  version: '0'
407
413
  requirements: []
408
- rubygems_version: 3.2.27
414
+ rubygems_version: 3.2.28
409
415
  signing_key:
410
416
  specification_version: 4
411
417
  summary: Enables consumer driven contract testing, providing a mock service and DSL