pact-support 1.19.0 → 1.20.0

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: b14c4782f4f8ac5c6a2695b3328b8605a51af770e463ac55a3df41843b976677
4
- data.tar.gz: 683323b4a276240ecfe2dc7cb650b0b232008f5904f9f59df071b5fe5e2ee291
3
+ metadata.gz: aa78275d3a1427e18c502011cbda176ace86f52481454ae560a364e3dc32b94a
4
+ data.tar.gz: 0d7b5b2ec8336e32c2b4d5b87940dab547497666e6e50b07e3924165a660ad2f
5
5
  SHA512:
6
- metadata.gz: 80825eb6afa2d2684c54e1805aaa2b19c14200ff516d72654a48ab5ee5b0df11ede5fb6a4cdd0761687e52489936c6b61bcaa8ecfbbc0b271957f5b9f46ae3f0
7
- data.tar.gz: cebfe89b260425ca88e91a3594a4d84037444a0f3f490b0042d9991543a0afbdce7ea19c1ef94f241e64dd7648f07877ec61e8984a493673b080aef4752b957f
6
+ metadata.gz: 00ca57b4165b257361813bbf850a2fe066e75126bf9a3726563acdf17c04ac3555187359b1fd5e887eeb1f7d7a569607370c51bf16239e7c63f0e60305c70756
7
+ data.tar.gz: 70d6322bfd0c0eacf6230416677586032164686deee79f4c3d50a9101306423e09d79d6d1e48ac07528f0fc342b6c02d2ea3ed866a04acfe7d299cd7669bc6bc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ <a name="v1.20.0"></a>
2
+ ### v1.20.0 (2023-10-19)
3
+
4
+ #### Features
5
+
6
+ * handle x509 certs in HTTP Client (#99) ([6a36a48](/../../commit/6a36a48))
7
+
1
8
  <a name="v1.19.0"></a>
2
9
  ### v1.19.0 (2022-11-15)
3
10
 
@@ -109,6 +109,12 @@ module Pact
109
109
  http.ca_file = ENV['SSL_CERT_FILE'] if ENV['SSL_CERT_FILE'] && ENV['SSL_CERT_FILE'] != ''
110
110
  http.ca_path = ENV['SSL_CERT_DIR'] if ENV['SSL_CERT_DIR'] && ENV['SSL_CERT_DIR'] != ''
111
111
  http.set_debug_output(Pact::Http::AuthorizationHeaderRedactor.new(Pact.configuration.output_stream)) if verbose?(options)
112
+
113
+ if x509_certificate?
114
+ http.cert = OpenSSL::X509::Certificate.new(x509_client_cert_file)
115
+ http.key = OpenSSL::PKey::RSA.new(x509_client_key_file)
116
+ end
117
+
112
118
  if disable_ssl_verification?
113
119
  if verbose?(options)
114
120
  Pact.configuration.output_stream.puts("SSL verification is disabled")
@@ -150,6 +156,19 @@ module Pact
150
156
  options[:verbose] || ENV['VERBOSE'] == 'true'
151
157
  end
152
158
 
159
+ def x509_certificate?
160
+ ENV['X509_CLIENT_CERT_FILE'] && ENV['X509_CLIENT_CERT_FILE'] != '' &&
161
+ ENV['X509_CLIENT_KEY_FILE'] && ENV['X509_CLIENT_KEY_FILE'] != ''
162
+ end
163
+
164
+ def x509_client_cert_file
165
+ File.read(ENV['X509_CLIENT_CERT_FILE'])
166
+ end
167
+
168
+ def x509_client_key_file
169
+ File.read(ENV['X509_CLIENT_KEY_FILE'])
170
+ end
171
+
153
172
  def disable_ssl_verification?
154
173
  ENV['PACT_DISABLE_SSL_VERIFICATION'] == 'true' || ENV['PACT_BROKER_DISABLE_SSL_VERIFICATION'] == 'true'
155
174
  end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "1.19.0"
3
+ VERSION = "1.20.0"
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.19.0
4
+ version: 1.20.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: 2022-11-14 00:00:00.000000000 Z
15
+ date: 2023-10-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rainbow
@@ -48,14 +48,14 @@ dependencies:
48
48
  requirements:
49
49
  - - "~>"
50
50
  - !ruby/object:Gem::Version
51
- version: '1.4'
51
+ version: '1.5'
52
52
  type: :runtime
53
53
  prerelease: false
54
54
  version_requirements: !ruby/object:Gem::Requirement
55
55
  requirements:
56
56
  - - "~>"
57
57
  - !ruby/object:Gem::Version
58
- version: '1.4'
58
+ version: '1.5'
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: expgen
61
61
  requirement: !ruby/object:Gem::Requirement
@@ -110,14 +110,14 @@ dependencies:
110
110
  requirements:
111
111
  - - "~>"
112
112
  - !ruby/object:Gem::Version
113
- version: '3.3'
113
+ version: 3.18.1
114
114
  type: :development
115
115
  prerelease: false
116
116
  version_requirements: !ruby/object:Gem::Requirement
117
117
  requirements:
118
118
  - - "~>"
119
119
  - !ruby/object:Gem::Version
120
- version: '3.3'
120
+ version: 3.18.1
121
121
  - !ruby/object:Gem::Dependency
122
122
  name: pry
123
123
  requirement: !ruby/object:Gem::Requirement
@@ -138,28 +138,28 @@ dependencies:
138
138
  requirements:
139
139
  - - "~>"
140
140
  - !ruby/object:Gem::Version
141
- version: 0.11.2
141
+ version: 2.4.0
142
142
  type: :development
143
143
  prerelease: false
144
144
  version_requirements: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - "~>"
147
147
  - !ruby/object:Gem::Version
148
- version: 0.11.2
148
+ version: 2.4.0
149
149
  - !ruby/object:Gem::Dependency
150
150
  name: hashie
151
151
  requirement: !ruby/object:Gem::Requirement
152
152
  requirements:
153
153
  - - "~>"
154
154
  - !ruby/object:Gem::Version
155
- version: '2.0'
155
+ version: '5.0'
156
156
  type: :development
157
157
  prerelease: false
158
158
  version_requirements: !ruby/object:Gem::Requirement
159
159
  requirements:
160
160
  - - "~>"
161
161
  - !ruby/object:Gem::Version
162
- version: '2.0'
162
+ version: '5.0'
163
163
  - !ruby/object:Gem::Dependency
164
164
  name: activesupport
165
165
  requirement: !ruby/object:Gem::Requirement
@@ -319,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
319
319
  - !ruby/object:Gem::Version
320
320
  version: '0'
321
321
  requirements: []
322
- rubygems_version: 3.3.25
322
+ rubygems_version: 3.4.21
323
323
  signing_key:
324
324
  specification_version: 4
325
325
  summary: Shared code for Pact gems