pact_broker-client 1.77.0 → 1.78.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 +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +12 -0
- data/Dockerfile +1 -1
- data/Gemfile +14 -4
- data/Rakefile +5 -0
- data/doc/pacts/markdown/Pact Broker Client - Pact Broker.md +15 -208
- data/doc/pacts/markdown/Pact Broker Client - PactFlow.md +1 -1
- data/doc/pacts/markdown/Pact Broker Client V2 - Pact Broker.md +2799 -0
- data/doc/pacts/markdown/Pact Broker Client V2 - PactFlow.md +267 -0
- data/doc/pacts/markdown/README.md +1 -1
- data/lib/pact_broker/client/base_client.rb +15 -3
- data/lib/pact_broker/client/hal/http_client.rb +4 -0
- data/lib/pact_broker/client/user_agent.rb +20 -0
- data/lib/pact_broker/client/version.rb +1 -1
- data/lib/pact_broker/client/versions.rb +1 -1
- metadata +6 -7
- data/script/ci/delete-branch-in-pactflow.sh +0 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 497cd095927e7614f6fbb2f7ec1ccd279e53c53186bb377e68c5f0fcfa828c12
|
|
4
|
+
data.tar.gz: cbb2c14026854ff1278b9abe7d09a55f31aeee220951e564f8f96ea888e37bf7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cffdf8c9b53ca809987459ba36e594faffee0a7b7806cf97c2c55599b7fea84ecdc49e5af9e3bc3659e9f8f7fc9d8feb2169eefc6341f6c9dbf9de0b09f787c
|
|
7
|
+
data.tar.gz: 19d1e55869b4c0954a6148af1e5f64bbc9400927023a1aad03c6fdc7a077557be6eb1bab3c86fade37cc989c84b9dab074fc3d057a5ad0cec4f4b2e5640610a6
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
<a name="v1.78.0"></a>
|
|
2
|
+
### v1.78.0 (2026-06-18)
|
|
3
|
+
|
|
4
|
+
#### Features
|
|
5
|
+
|
|
6
|
+
* set user agent on requests ([de18d52](/../../commit/de18d52))
|
|
7
|
+
|
|
8
|
+
#### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **test**
|
|
11
|
+
* align specs with for verification with rust or ruby core ([bdeac32](/../../commit/bdeac32))
|
|
12
|
+
|
|
1
13
|
<a name="v1.77.0"></a>
|
|
2
14
|
### v1.77.0 (2024-10-08)
|
|
3
15
|
|
data/Dockerfile
CHANGED
data/Gemfile
CHANGED
|
@@ -12,18 +12,28 @@ if ENV['X_PACT_DEVELOPMENT'] == 'true'
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
group :development do
|
|
15
|
-
gem 'fakefs', '~>
|
|
15
|
+
gem 'fakefs', '~> 3.0'
|
|
16
16
|
gem 'webmock', '~> 3.0'
|
|
17
17
|
gem 'conventional-changelog', '~>1.3'
|
|
18
|
-
gem 'pact', '~> 1.16'
|
|
19
18
|
gem 'pact-support', '~> 1.16'
|
|
20
|
-
gem 'approvals', '0.
|
|
21
|
-
gem 'rspec-its', '~>
|
|
19
|
+
gem 'approvals', '0.1.7'
|
|
20
|
+
gem 'rspec-its', '~> 2.0'
|
|
22
21
|
gem 'pry-byebug'
|
|
22
|
+
|
|
23
|
+
if ENV['X_PACT_DEVELOPMENT'] == 'true'
|
|
24
|
+
gem 'pact', path: '../pact-ruby'
|
|
25
|
+
gem 'pact-ffi', path: '../pact-ffi'
|
|
26
|
+
else
|
|
27
|
+
gem 'pact'
|
|
28
|
+
gem 'pact-ffi'
|
|
29
|
+
end
|
|
30
|
+
# for pact/v2 with non rail apps
|
|
31
|
+
gem 'activesupport'
|
|
23
32
|
end
|
|
24
33
|
|
|
25
34
|
group :test do
|
|
26
35
|
gem 'faraday', '~>2.0'
|
|
27
36
|
gem 'faraday-retry', '~>2.0'
|
|
37
|
+
gem 'rack', '~> 3.0'
|
|
28
38
|
gem 'rackup', '~> 2.1'
|
|
29
39
|
end
|
data/Rakefile
CHANGED
|
@@ -38,3 +38,8 @@ task 'pact:list_provider_states' do
|
|
|
38
38
|
JSON.parse(File.read(pact_file))['interactions'].collect{ | interaction| interaction['providerState'] }
|
|
39
39
|
}.flatten.compact.sort.uniq
|
|
40
40
|
end
|
|
41
|
+
|
|
42
|
+
RSpec::Core::RakeTask.new('pact:v2:spec') do |task|
|
|
43
|
+
task.pattern = 'spec/pact/providers/**/*_spec.rb'
|
|
44
|
+
task.rspec_opts = ['-t pact']
|
|
45
|
+
end
|
|
@@ -94,16 +94,6 @@
|
|
|
94
94
|
|
|
95
95
|
* [A request to mark a deployed version as not currently deploye](#a_request_to_mark_a_deployed_version_as_not_currently_deploye_given_a_currently_deployed_version_exists) given a currently deployed version exists
|
|
96
96
|
|
|
97
|
-
* [A request to publish a pact](#a_request_to_publish_a_pact_given_'Condor'_already_exist_in_the_pact-broker,_but_the_'Pricing_Service'_does_not) given 'Condor' already exist in the pact-broker, but the 'Pricing Service' does not
|
|
98
|
-
|
|
99
|
-
* [A request to publish a pact](#a_request_to_publish_a_pact_given_the_'Pricing_Service'_already_exists_in_the_pact-broker) given the 'Pricing Service' already exists in the pact-broker
|
|
100
|
-
|
|
101
|
-
* [A request to publish a pact](#a_request_to_publish_a_pact_given_an_error_occurs_while_publishing_a_pact) given an error occurs while publishing a pact
|
|
102
|
-
|
|
103
|
-
* [A request to publish a pact with method patch](#a_request_to_publish_a_pact_with_method_patch_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker,_and_Condor_already_has_a_pact_published_for_version_1.3.0) given the 'Pricing Service' and 'Condor' already exist in the pact-broker, and Condor already has a pact published for version 1.3.0
|
|
104
|
-
|
|
105
|
-
* [A request to publish a pact with method put](#a_request_to_publish_a_pact_with_method_put_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker,_and_Condor_already_has_a_pact_published_for_version_1.3.0) given the 'Pricing Service' and 'Condor' already exist in the pact-broker, and Condor already has a pact published for version 1.3.0
|
|
106
|
-
|
|
107
97
|
* [A request to publish contracts](#a_request_to_publish_contracts)
|
|
108
98
|
|
|
109
99
|
* [A request to record a deployment](#a_request_to_record_a_deployment_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment
|
|
@@ -1077,8 +1067,7 @@ Pact Broker will respond with:
|
|
|
1077
1067
|
"name": "Pricing Service"
|
|
1078
1068
|
},
|
|
1079
1069
|
"interactions": [
|
|
1080
|
-
|
|
1081
|
-
]
|
|
1070
|
+
]
|
|
1082
1071
|
}
|
|
1083
1072
|
}
|
|
1084
1073
|
```
|
|
@@ -2118,194 +2107,6 @@ Pact Broker will respond with:
|
|
|
2118
2107
|
}
|
|
2119
2108
|
}
|
|
2120
2109
|
```
|
|
2121
|
-
<a name="a_request_to_publish_a_pact_given_'Condor'_already_exist_in_the_pact-broker,_but_the_'Pricing_Service'_does_not"></a>
|
|
2122
|
-
Given **'Condor' already exist in the pact-broker, but the 'Pricing Service' does not**, upon receiving **a request to publish a pact** from Pact Broker Client, with
|
|
2123
|
-
```json
|
|
2124
|
-
{
|
|
2125
|
-
"method": "put",
|
|
2126
|
-
"path": "/pacts/provider/Pricing%20Service/consumer/Condor/version/1.3.0",
|
|
2127
|
-
"headers": {
|
|
2128
|
-
"Content-Type": "application/json"
|
|
2129
|
-
},
|
|
2130
|
-
"body": {
|
|
2131
|
-
"consumer": {
|
|
2132
|
-
"name": "Condor"
|
|
2133
|
-
},
|
|
2134
|
-
"provider": {
|
|
2135
|
-
"name": "Pricing Service"
|
|
2136
|
-
},
|
|
2137
|
-
"interactions": [
|
|
2138
|
-
|
|
2139
|
-
]
|
|
2140
|
-
}
|
|
2141
|
-
}
|
|
2142
|
-
```
|
|
2143
|
-
Pact Broker will respond with:
|
|
2144
|
-
```json
|
|
2145
|
-
{
|
|
2146
|
-
"status": 201,
|
|
2147
|
-
"headers": {
|
|
2148
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
|
2149
|
-
},
|
|
2150
|
-
"body": {
|
|
2151
|
-
"_links": {
|
|
2152
|
-
"pb:latest-pact-version": {
|
|
2153
|
-
"href": "http://example.org/pacts/provider/Pricing%20Service/consumer/Condor/latest"
|
|
2154
|
-
}
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
}
|
|
2158
|
-
```
|
|
2159
|
-
<a name="a_request_to_publish_a_pact_given_the_'Pricing_Service'_already_exists_in_the_pact-broker"></a>
|
|
2160
|
-
Given **the 'Pricing Service' already exists in the pact-broker**, upon receiving **a request to publish a pact** from Pact Broker Client, with
|
|
2161
|
-
```json
|
|
2162
|
-
{
|
|
2163
|
-
"method": "put",
|
|
2164
|
-
"path": "/pacts/provider/Pricing%20Service/consumer/Condor/version/1.3.0",
|
|
2165
|
-
"headers": {
|
|
2166
|
-
"Content-Type": "application/json"
|
|
2167
|
-
},
|
|
2168
|
-
"body": {
|
|
2169
|
-
"consumer": {
|
|
2170
|
-
"name": "Condor"
|
|
2171
|
-
},
|
|
2172
|
-
"provider": {
|
|
2173
|
-
"name": "Pricing Service"
|
|
2174
|
-
},
|
|
2175
|
-
"interactions": [
|
|
2176
|
-
|
|
2177
|
-
]
|
|
2178
|
-
}
|
|
2179
|
-
}
|
|
2180
|
-
```
|
|
2181
|
-
Pact Broker will respond with:
|
|
2182
|
-
```json
|
|
2183
|
-
{
|
|
2184
|
-
"status": 201,
|
|
2185
|
-
"headers": {
|
|
2186
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
|
2187
|
-
},
|
|
2188
|
-
"body": {
|
|
2189
|
-
"_links": {
|
|
2190
|
-
"pb:latest-pact-version": {
|
|
2191
|
-
"href": "http://example.org/pacts/provider/Pricing%20Service/consumer/Condor/latest"
|
|
2192
|
-
}
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
}
|
|
2196
|
-
```
|
|
2197
|
-
<a name="a_request_to_publish_a_pact_given_an_error_occurs_while_publishing_a_pact"></a>
|
|
2198
|
-
Given **an error occurs while publishing a pact**, upon receiving **a request to publish a pact** from Pact Broker Client, with
|
|
2199
|
-
```json
|
|
2200
|
-
{
|
|
2201
|
-
"method": "put",
|
|
2202
|
-
"path": "/pacts/provider/Pricing%20Service/consumer/Condor/version/1.3.0",
|
|
2203
|
-
"headers": {
|
|
2204
|
-
"Content-Type": "application/json"
|
|
2205
|
-
},
|
|
2206
|
-
"body": {
|
|
2207
|
-
"consumer": {
|
|
2208
|
-
"name": "Condor"
|
|
2209
|
-
},
|
|
2210
|
-
"provider": {
|
|
2211
|
-
"name": "Pricing Service"
|
|
2212
|
-
},
|
|
2213
|
-
"interactions": [
|
|
2214
|
-
|
|
2215
|
-
]
|
|
2216
|
-
}
|
|
2217
|
-
}
|
|
2218
|
-
```
|
|
2219
|
-
Pact Broker will respond with:
|
|
2220
|
-
```json
|
|
2221
|
-
{
|
|
2222
|
-
"status": 500,
|
|
2223
|
-
"headers": {
|
|
2224
|
-
"Content-Type": "application/hal+json"
|
|
2225
|
-
},
|
|
2226
|
-
"body": {
|
|
2227
|
-
"error": {
|
|
2228
|
-
"message": "An error occurred"
|
|
2229
|
-
}
|
|
2230
|
-
}
|
|
2231
|
-
}
|
|
2232
|
-
```
|
|
2233
|
-
<a name="a_request_to_publish_a_pact_with_method_patch_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker,_and_Condor_already_has_a_pact_published_for_version_1.3.0"></a>
|
|
2234
|
-
Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker, and Condor already has a pact published for version 1.3.0**, upon receiving **a request to publish a pact with method patch** from Pact Broker Client, with
|
|
2235
|
-
```json
|
|
2236
|
-
{
|
|
2237
|
-
"method": "patch",
|
|
2238
|
-
"path": "/pacts/provider/Pricing%20Service/consumer/Condor/version/1.3.0",
|
|
2239
|
-
"headers": {
|
|
2240
|
-
"Content-Type": "application/json"
|
|
2241
|
-
},
|
|
2242
|
-
"body": {
|
|
2243
|
-
"consumer": {
|
|
2244
|
-
"name": "Condor"
|
|
2245
|
-
},
|
|
2246
|
-
"provider": {
|
|
2247
|
-
"name": "Pricing Service"
|
|
2248
|
-
},
|
|
2249
|
-
"interactions": [
|
|
2250
|
-
|
|
2251
|
-
]
|
|
2252
|
-
}
|
|
2253
|
-
}
|
|
2254
|
-
```
|
|
2255
|
-
Pact Broker will respond with:
|
|
2256
|
-
```json
|
|
2257
|
-
{
|
|
2258
|
-
"status": 200,
|
|
2259
|
-
"headers": {
|
|
2260
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
|
2261
|
-
},
|
|
2262
|
-
"body": {
|
|
2263
|
-
"_links": {
|
|
2264
|
-
"pb:latest-pact-version": {
|
|
2265
|
-
"href": "http://example.org/pacts/provider/Pricing%20Service/consumer/Condor/latest"
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
}
|
|
2269
|
-
}
|
|
2270
|
-
```
|
|
2271
|
-
<a name="a_request_to_publish_a_pact_with_method_put_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker,_and_Condor_already_has_a_pact_published_for_version_1.3.0"></a>
|
|
2272
|
-
Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker, and Condor already has a pact published for version 1.3.0**, upon receiving **a request to publish a pact with method put** from Pact Broker Client, with
|
|
2273
|
-
```json
|
|
2274
|
-
{
|
|
2275
|
-
"method": "put",
|
|
2276
|
-
"path": "/pacts/provider/Pricing%20Service/consumer/Condor/version/1.3.0",
|
|
2277
|
-
"headers": {
|
|
2278
|
-
"Content-Type": "application/json"
|
|
2279
|
-
},
|
|
2280
|
-
"body": {
|
|
2281
|
-
"consumer": {
|
|
2282
|
-
"name": "Condor"
|
|
2283
|
-
},
|
|
2284
|
-
"provider": {
|
|
2285
|
-
"name": "Pricing Service"
|
|
2286
|
-
},
|
|
2287
|
-
"interactions": [
|
|
2288
|
-
|
|
2289
|
-
]
|
|
2290
|
-
}
|
|
2291
|
-
}
|
|
2292
|
-
```
|
|
2293
|
-
Pact Broker will respond with:
|
|
2294
|
-
```json
|
|
2295
|
-
{
|
|
2296
|
-
"status": 200,
|
|
2297
|
-
"headers": {
|
|
2298
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
|
2299
|
-
},
|
|
2300
|
-
"body": {
|
|
2301
|
-
"_links": {
|
|
2302
|
-
"pb:latest-pact-version": {
|
|
2303
|
-
"href": "http://example.org/pacts/provider/Pricing%20Service/consumer/Condor/latest"
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
}
|
|
2307
|
-
}
|
|
2308
|
-
```
|
|
2309
2110
|
<a name="a_request_to_publish_contracts"></a>
|
|
2310
2111
|
Upon receiving **a request to publish contracts** from Pact Broker Client, with
|
|
2311
2112
|
```json
|
|
@@ -2411,7 +2212,9 @@ Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exis
|
|
|
2411
2212
|
"headers": {
|
|
2412
2213
|
"Content-Type": "application/json",
|
|
2413
2214
|
"Accept": "application/hal+json"
|
|
2414
|
-
}
|
|
2215
|
+
},
|
|
2216
|
+
"body": {
|
|
2217
|
+
}
|
|
2415
2218
|
}
|
|
2416
2219
|
```
|
|
2417
2220
|
Pact Broker will respond with:
|
|
@@ -2565,8 +2368,7 @@ Pact Broker will respond with:
|
|
|
2565
2368
|
"name": "Pricing Service"
|
|
2566
2369
|
},
|
|
2567
2370
|
"interactions": [
|
|
2568
|
-
|
|
2569
|
-
]
|
|
2371
|
+
]
|
|
2570
2372
|
}
|
|
2571
2373
|
}
|
|
2572
2374
|
```
|
|
@@ -2638,8 +2440,7 @@ Pact Broker will respond with:
|
|
|
2638
2440
|
"name": "Pricing Service"
|
|
2639
2441
|
},
|
|
2640
2442
|
"interactions": [
|
|
2641
|
-
|
|
2642
|
-
]
|
|
2443
|
+
]
|
|
2643
2444
|
}
|
|
2644
2445
|
}
|
|
2645
2446
|
```
|
|
@@ -2651,7 +2452,9 @@ Given **'Condor' exists in the pact-broker with version 1.3.0, tagged with 'prod
|
|
|
2651
2452
|
"path": "/pacticipants/Condor/versions/1.3.0/tags/prod",
|
|
2652
2453
|
"headers": {
|
|
2653
2454
|
"Content-Type": "application/json"
|
|
2654
|
-
}
|
|
2455
|
+
},
|
|
2456
|
+
"body": {
|
|
2457
|
+
}
|
|
2655
2458
|
}
|
|
2656
2459
|
```
|
|
2657
2460
|
Pact Broker will respond with:
|
|
@@ -2678,7 +2481,9 @@ Given **'Condor' does not exist in the pact-broker**, upon receiving **a request
|
|
|
2678
2481
|
"path": "/pacticipants/Condor/versions/1.3.0/tags/prod",
|
|
2679
2482
|
"headers": {
|
|
2680
2483
|
"Content-Type": "application/json"
|
|
2681
|
-
}
|
|
2484
|
+
},
|
|
2485
|
+
"body": {
|
|
2486
|
+
}
|
|
2682
2487
|
}
|
|
2683
2488
|
```
|
|
2684
2489
|
Pact Broker will respond with:
|
|
@@ -2705,7 +2510,9 @@ Given **'Condor' exists in the pact-broker**, upon receiving **a request to tag
|
|
|
2705
2510
|
"path": "/pacticipants/Condor/versions/1.3.0/tags/prod",
|
|
2706
2511
|
"headers": {
|
|
2707
2512
|
"Content-Type": "application/json"
|
|
2708
|
-
}
|
|
2513
|
+
},
|
|
2514
|
+
"body": {
|
|
2515
|
+
}
|
|
2709
2516
|
}
|
|
2710
2517
|
```
|
|
2711
2518
|
Pact Broker will respond with:
|