pact_broker-client 1.71.0 → 1.72.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release_gem.yml +17 -2
- data/CHANGELOG.md +7 -0
- data/Gemfile +8 -1
- data/lib/pact_broker/client/version.rb +1 -1
- data/lib/pactflow/client/provider_contracts/publish.rb +3 -3
- data/pact-broker-client.gemspec +0 -8
- data/script/ci/record-release.sh +7 -0
- data/spec/integration/publish_provider_contract_spec.rb +0 -4
- data/spec/lib/pactflow/client/provider_contracts/publish_spec.rb +3 -4
- data/spec/service_providers/pactflow_publish_provider_contract_spec.rb +0 -2
- metadata +3 -100
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95192c76cf2b56651bb52de5cd2c5f1bea45d966e5dfa4e8ef78d1e11a3a2a51
|
4
|
+
data.tar.gz: 1a095144bc411e428556f47da77160d5c7a182e4eb2201d75f30075adb1cb009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3553d23ad0bdae6e6f460a6a85dd3ab46789bf3cfe6241881c1f126642b73cf6ee9714f60e830c7108f8e0a0a188a7a2a6b1a42dda55be7ae2339b9ccfd3552b
|
7
|
+
data.tar.gz: 3c039eb65e3f4f02c9f32ebf52936535ccb125e8105c4b1681aeafa90de007c7dc032824d20facf6e023c61e3b32147e188312b8a8244b506627fe69e8f414c0
|
@@ -12,8 +12,6 @@ jobs:
|
|
12
12
|
steps:
|
13
13
|
- uses: actions/checkout@v3
|
14
14
|
- uses: ruby/setup-ruby@v1
|
15
|
-
with:
|
16
|
-
ruby-version: '3.2'
|
17
15
|
- run: |
|
18
16
|
gem install bundler -v 2.4
|
19
17
|
bundle install
|
@@ -38,6 +36,23 @@ jobs:
|
|
38
36
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
39
37
|
INCREMENT: '${{ github.event.client_payload.increment }}'
|
40
38
|
|
39
|
+
record-release:
|
40
|
+
needs: release
|
41
|
+
runs-on: ubuntu-latest
|
42
|
+
steps:
|
43
|
+
- uses: actions/checkout@v3
|
44
|
+
- uses: ruby/setup-ruby@v1
|
45
|
+
- name: Bundle install
|
46
|
+
run: |
|
47
|
+
gem install bundler -v 2.4
|
48
|
+
bundle config set --local without development test
|
49
|
+
bundle install
|
50
|
+
- name: Record release
|
51
|
+
run: script/ci/record-release.sh
|
52
|
+
env:
|
53
|
+
PACT_BROKER_BASE_URL: https://pact-foundation.pactflow.io
|
54
|
+
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN_PACT_FOUNDATION }}
|
55
|
+
|
41
56
|
notify-gem-released:
|
42
57
|
needs: release
|
43
58
|
strategy:
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -12,5 +12,12 @@ if ENV['X_PACT_DEVELOPMENT'] == 'true'
|
|
12
12
|
end
|
13
13
|
|
14
14
|
group :development do
|
15
|
+
gem 'fakefs', '~> 2.4'
|
16
|
+
gem 'webmock', '~> 3.0'
|
17
|
+
gem 'conventional-changelog', '~>1.3'
|
18
|
+
gem 'pact', '~> 1.16'
|
19
|
+
gem 'pact-support', '~> 1.16'
|
20
|
+
gem 'approvals', '0.0.26'
|
21
|
+
gem 'rspec-its', '~> 1.3'
|
15
22
|
gem 'pry-byebug'
|
16
|
-
end
|
23
|
+
end
|
@@ -26,7 +26,7 @@ module Pactflow
|
|
26
26
|
attr_reader :provider_name, :provider_version_number, :branch_name, :tags, :build_url, :contract, :verification_results
|
27
27
|
|
28
28
|
def do_call
|
29
|
-
if
|
29
|
+
if !disabled? && index_resource.assert_success!.can?(PUBLISH_RELATION)
|
30
30
|
publish_provider_contracts
|
31
31
|
PactBroker::Client::CommandResult.new(success?, message)
|
32
32
|
else
|
@@ -34,8 +34,8 @@ module Pactflow
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
38
|
-
ENV.fetch("
|
37
|
+
def disabled?
|
38
|
+
ENV.fetch("PACTFLOW_FEATURES", "").include?("publish_provider_contracts_using_old_api")
|
39
39
|
end
|
40
40
|
|
41
41
|
def publish_provider_contracts
|
data/pact-broker-client.gemspec
CHANGED
@@ -27,12 +27,4 @@ Gem::Specification.new do |gem|
|
|
27
27
|
gem.add_runtime_dependency 'thor', '>= 0.20', '< 2.0'
|
28
28
|
gem.add_runtime_dependency 'rake', '~> 13.0' #For FileList
|
29
29
|
gem.add_runtime_dependency 'dig_rb', '~> 1.0'
|
30
|
-
|
31
|
-
gem.add_development_dependency 'fakefs', '~> 2.4'
|
32
|
-
gem.add_development_dependency 'webmock', '~> 3.0'
|
33
|
-
gem.add_development_dependency 'conventional-changelog', '~>1.3'
|
34
|
-
gem.add_development_dependency 'pact', '~> 1.16'
|
35
|
-
gem.add_development_dependency 'pact-support', '~> 1.16'
|
36
|
-
gem.add_development_dependency 'approvals', '0.0.26'
|
37
|
-
gem.add_development_dependency 'rspec-its', '~> 1.3'
|
38
30
|
end
|
@@ -1,10 +1,6 @@
|
|
1
1
|
require "pactflow/client/cli/pactflow"
|
2
2
|
|
3
3
|
RSpec.describe "publish-provider-contract" do
|
4
|
-
before do
|
5
|
-
allow(ENV).to receive(:fetch).and_call_original
|
6
|
-
allow(ENV).to receive(:fetch).with("PACT_BROKER_FEATURES", "").and_return("publish_provider_contracts_all_in_one")
|
7
|
-
end
|
8
4
|
let(:index_body_hash) do
|
9
5
|
{
|
10
6
|
_links: {
|
@@ -7,8 +7,6 @@ module Pactflow
|
|
7
7
|
before do
|
8
8
|
allow_any_instance_of(PactBroker::Client::Hal::HttpClient).to receive(:sleep)
|
9
9
|
allow_any_instance_of(PactBroker::Client::Hal::HttpClient).to receive(:default_max_tries).and_return(1)
|
10
|
-
allow(ENV).to receive(:fetch).and_call_original
|
11
|
-
allow(ENV).to receive(:fetch).with("PACT_BROKER_FEATURES", "").and_return("publish_provider_contracts_all_in_one")
|
12
10
|
end
|
13
11
|
|
14
12
|
let(:command_params) do
|
@@ -99,9 +97,10 @@ module Pactflow
|
|
99
97
|
end
|
100
98
|
end
|
101
99
|
|
102
|
-
context "when the feature is
|
100
|
+
context "when the feature is disabled" do
|
103
101
|
before do
|
104
|
-
allow(ENV).to receive(:fetch).
|
102
|
+
allow(ENV).to receive(:fetch).and_call_original
|
103
|
+
allow(ENV).to receive(:fetch).with("PACTFLOW_FEATURES", "").and_return("publish_provider_contracts_using_old_api")
|
105
104
|
end
|
106
105
|
|
107
106
|
it "publishes the provider contracts the old way" do
|
@@ -6,8 +6,6 @@ RSpec.describe "publishing a provider contract to PactFlow", pact: true do
|
|
6
6
|
before do
|
7
7
|
allow_any_instance_of(PactBroker::Client::Hal::HttpClient).to receive(:sleep)
|
8
8
|
allow_any_instance_of(PactBroker::Client::Hal::HttpClient).to receive(:default_max_tries).and_return(1)
|
9
|
-
allow(ENV).to receive(:fetch).and_call_original
|
10
|
-
allow(ENV).to receive(:fetch).with("PACT_BROKER_FEATURES", "").and_return("publish_provider_contracts_all_in_one")
|
11
9
|
end
|
12
10
|
|
13
11
|
include_context "pact broker"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact_broker-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.72.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Beth Skurrie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -106,104 +106,6 @@ dependencies:
|
|
106
106
|
- - "~>"
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '1.0'
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: fakefs
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '2.4'
|
116
|
-
type: :development
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - "~>"
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: '2.4'
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: webmock
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '3.0'
|
130
|
-
type: :development
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - "~>"
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '3.0'
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: conventional-changelog
|
139
|
-
requirement: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- - "~>"
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: '1.3'
|
144
|
-
type: :development
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
requirements:
|
148
|
-
- - "~>"
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: '1.3'
|
151
|
-
- !ruby/object:Gem::Dependency
|
152
|
-
name: pact
|
153
|
-
requirement: !ruby/object:Gem::Requirement
|
154
|
-
requirements:
|
155
|
-
- - "~>"
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '1.16'
|
158
|
-
type: :development
|
159
|
-
prerelease: false
|
160
|
-
version_requirements: !ruby/object:Gem::Requirement
|
161
|
-
requirements:
|
162
|
-
- - "~>"
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
version: '1.16'
|
165
|
-
- !ruby/object:Gem::Dependency
|
166
|
-
name: pact-support
|
167
|
-
requirement: !ruby/object:Gem::Requirement
|
168
|
-
requirements:
|
169
|
-
- - "~>"
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version: '1.16'
|
172
|
-
type: :development
|
173
|
-
prerelease: false
|
174
|
-
version_requirements: !ruby/object:Gem::Requirement
|
175
|
-
requirements:
|
176
|
-
- - "~>"
|
177
|
-
- !ruby/object:Gem::Version
|
178
|
-
version: '1.16'
|
179
|
-
- !ruby/object:Gem::Dependency
|
180
|
-
name: approvals
|
181
|
-
requirement: !ruby/object:Gem::Requirement
|
182
|
-
requirements:
|
183
|
-
- - '='
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
version: 0.0.26
|
186
|
-
type: :development
|
187
|
-
prerelease: false
|
188
|
-
version_requirements: !ruby/object:Gem::Requirement
|
189
|
-
requirements:
|
190
|
-
- - '='
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: 0.0.26
|
193
|
-
- !ruby/object:Gem::Dependency
|
194
|
-
name: rspec-its
|
195
|
-
requirement: !ruby/object:Gem::Requirement
|
196
|
-
requirements:
|
197
|
-
- - "~>"
|
198
|
-
- !ruby/object:Gem::Version
|
199
|
-
version: '1.3'
|
200
|
-
type: :development
|
201
|
-
prerelease: false
|
202
|
-
version_requirements: !ruby/object:Gem::Requirement
|
203
|
-
requirements:
|
204
|
-
- - "~>"
|
205
|
-
- !ruby/object:Gem::Version
|
206
|
-
version: '1.3'
|
207
109
|
description: Client for the Pact Broker. Publish, retrieve and query pacts and verification
|
208
110
|
results. Manage webhooks and environments.
|
209
111
|
email:
|
@@ -337,6 +239,7 @@ files:
|
|
337
239
|
- pact-broker-client.gemspec
|
338
240
|
- script/approve-all.sh
|
339
241
|
- script/can-i-deploy.sh
|
242
|
+
- script/ci/record-release.sh
|
340
243
|
- script/create-pacticipant.sh
|
341
244
|
- script/foo-bar.json
|
342
245
|
- script/oas.yml
|