pact-support 1.19.0 → 1.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/pact/configuration.rb +4 -1
- data/lib/pact/consumer_contract/pact_file.rb +19 -0
- data/lib/pact/support/version.rb +1 -1
- metadata +25 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b9c0d84b02abb11d0ca1f14ac23d4f90dc2c55874898c22bb279db2fbf2c143
|
4
|
+
data.tar.gz: a27dc43886c7643b30574c686e78cbbadc117e13cf37f8227bce6a4c661c7d07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d5d1e2de94fb66036172adf61079b88a073b24280e780e48e3e667c943f17a68461ab3636e151392aeade397d53c18804ed65069cb84b1c8e03ce8c77ecedea
|
7
|
+
data.tar.gz: b420f3a91cd38c334e2e2c208a815f52bfd8c7cfc0c056e788cb25427e61c9cbc71c680f9d446b8af2815108c2f527d5ff1640516c0564e83776541b5ea3f5f3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
<a name="v1.20.1"></a>
|
2
|
+
### v1.20.1 (2024-08-08)
|
3
|
+
|
4
|
+
#### Bug Fixes
|
5
|
+
|
6
|
+
* enable color on non-tty if color_enabled ([0585424](/../../commit/0585424))
|
7
|
+
|
8
|
+
<a name="v1.20.0"></a>
|
9
|
+
### v1.20.0 (2023-10-19)
|
10
|
+
|
11
|
+
#### Features
|
12
|
+
|
13
|
+
* handle x509 certs in HTTP Client (#99) ([6a36a48](/../../commit/6a36a48))
|
14
|
+
|
1
15
|
<a name="v1.19.0"></a>
|
2
16
|
### v1.19.0 (2022-11-15)
|
3
17
|
|
data/lib/pact/configuration.rb
CHANGED
@@ -6,6 +6,7 @@ require 'pact/shared/json_differ'
|
|
6
6
|
require 'pact/shared/text_differ'
|
7
7
|
require 'pact/shared/form_differ'
|
8
8
|
require 'pact/shared/multipart_form_differ'
|
9
|
+
require 'rainbow'
|
9
10
|
|
10
11
|
|
11
12
|
module Pact
|
@@ -114,7 +115,9 @@ module Pact
|
|
114
115
|
|
115
116
|
def color_enabled
|
116
117
|
# Can't use ||= when the variable might be false, it will execute the expression if it's false
|
117
|
-
defined?(@color_enabled) ? @color_enabled : true
|
118
|
+
color_enabled = defined?(@color_enabled) ? @color_enabled : true
|
119
|
+
Rainbow.enabled = true if color_enabled
|
120
|
+
color_enabled
|
118
121
|
end
|
119
122
|
|
120
123
|
def color_enabled= color_enabled
|
@@ -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
|
data/lib/pact/support/version.rb
CHANGED
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.
|
4
|
+
version: 1.20.1
|
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:
|
15
|
+
date: 2024-08-08 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.
|
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.
|
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:
|
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:
|
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:
|
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:
|
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: '
|
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: '
|
162
|
+
version: '5.0'
|
163
163
|
- !ruby/object:Gem::Dependency
|
164
164
|
name: activesupport
|
165
165
|
requirement: !ruby/object:Gem::Requirement
|
@@ -216,6 +216,20 @@ dependencies:
|
|
216
216
|
- - "~>"
|
217
217
|
- !ruby/object:Gem::Version
|
218
218
|
version: '0.5'
|
219
|
+
- !ruby/object:Gem::Dependency
|
220
|
+
name: base64
|
221
|
+
requirement: !ruby/object:Gem::Requirement
|
222
|
+
requirements:
|
223
|
+
- - "~>"
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: '0.2'
|
226
|
+
type: :development
|
227
|
+
prerelease: false
|
228
|
+
version_requirements: !ruby/object:Gem::Requirement
|
229
|
+
requirements:
|
230
|
+
- - "~>"
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: '0.2'
|
219
233
|
description:
|
220
234
|
email:
|
221
235
|
- james.fraser@alumni.swinburne.edu
|
@@ -319,7 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
319
333
|
- !ruby/object:Gem::Version
|
320
334
|
version: '0'
|
321
335
|
requirements: []
|
322
|
-
rubygems_version: 3.
|
336
|
+
rubygems_version: 3.5.17
|
323
337
|
signing_key:
|
324
338
|
specification_version: 4
|
325
339
|
summary: Shared code for Pact gems
|