pact 1.60.0 → 1.61.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fa7e68e5d7bae7690cd437dd16ad8ae62ac3df3ffc613288ad61db695db7893
|
4
|
+
data.tar.gz: eae97829dbde3d2f1ac593b928992af49ea115c46a17a5d7599a0420474a40e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 558da76fbb79adb908e6e33dcabe9fdd3a99d8d899121d60239adbdd428e57320812b978290124a722f7e63faf4fa97928e40e0beb5a951965edfc46ac1559b9
|
7
|
+
data.tar.gz: e8cb83d40823603b794ffcda15c9211f11a0632fd7a4a93c547fcdfc9734e06ae7cabac5edaee812a590c07f7839c13220e85a84a1d4366cb9f3f75dfb39f974
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
<a name="v1.61.0"></a>
|
2
|
+
### v1.61.0 (2021-12-16)
|
3
|
+
|
4
|
+
#### Features
|
5
|
+
|
6
|
+
* support description of matching_branch and matching_tag consumer version selectors ([8e8bb22](/../../commit/8e8bb22))
|
7
|
+
|
8
|
+
#### Bug Fixes
|
9
|
+
|
10
|
+
* pass through includePendingStatus to the 'pacts for verification' API when it is false ([f0e37a4](/../../commit/f0e37a4))
|
11
|
+
|
1
12
|
<a name="v1.60.0"></a>
|
2
13
|
### v1.60.0 (2021-10-01)
|
3
14
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Pact
|
2
|
+
module HashRefinements
|
3
|
+
refine Hash do
|
4
|
+
def compact
|
5
|
+
h = {}
|
6
|
+
each do |key, value|
|
7
|
+
h[key] = value unless value == nil
|
8
|
+
end
|
9
|
+
h
|
10
|
+
end unless Hash.method_defined? :compact
|
11
|
+
|
12
|
+
def compact!
|
13
|
+
reject! {|_key, value| value == nil}
|
14
|
+
end unless Hash.method_defined? :compact!
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -5,10 +5,13 @@ require 'pact/errors'
|
|
5
5
|
require 'pact/pact_broker/fetch_pacts'
|
6
6
|
require 'pact/pact_broker/notices'
|
7
7
|
require 'pact/pact_broker/pact_selection_description'
|
8
|
+
require "pact/hash_refinements"
|
8
9
|
|
9
10
|
module Pact
|
10
11
|
module PactBroker
|
11
12
|
class FetchPactURIsForVerification
|
13
|
+
using Pact::HashRefinements
|
14
|
+
|
12
15
|
include PactSelectionDescription
|
13
16
|
attr_reader :provider, :consumer_version_selectors, :provider_version_branch, :provider_version_tags, :broker_base_url, :http_client_options, :http_client, :options
|
14
17
|
|
@@ -74,12 +77,12 @@ module Pact
|
|
74
77
|
|
75
78
|
def query
|
76
79
|
q = {}
|
77
|
-
q["includePendingStatus"] =
|
80
|
+
q["includePendingStatus"] = options[:include_pending_status]
|
78
81
|
q["consumerVersionSelectors"] = consumer_version_selectors if consumer_version_selectors.any?
|
79
82
|
q["providerVersionTags"] = provider_version_tags if provider_version_tags.any?
|
80
|
-
q["providerVersionBranch"] = provider_version_branch
|
81
|
-
q["includeWipPactsSince"] = options[:include_wip_pacts_since]
|
82
|
-
q
|
83
|
+
q["providerVersionBranch"] = provider_version_branch
|
84
|
+
q["includeWipPactsSince"] = options[:include_wip_pacts_since]
|
85
|
+
q.compact
|
83
86
|
end
|
84
87
|
|
85
88
|
def extract_notices(pact)
|
@@ -39,6 +39,12 @@ module Pact
|
|
39
39
|
elsif selector[:environment]
|
40
40
|
desc = "currently in #{selector[:environment]}"
|
41
41
|
desc = "#{selector[:consumer]} #{desc}" if selector[:consumer]
|
42
|
+
elsif selector[:matchingBranch]
|
43
|
+
desc = "matching current branch"
|
44
|
+
desc = "#{desc} for #{selector[:consumer]}" if selector[:consumer]
|
45
|
+
elsif selector[:matchingTag]
|
46
|
+
desc = "matching tag"
|
47
|
+
desc = "#{desc} for #{selector[:consumer]}" if selector[:consumer]
|
42
48
|
else
|
43
49
|
desc = selector.to_s
|
44
50
|
end
|
data/lib/pact/version.rb
CHANGED
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.
|
4
|
+
version: 1.61.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-
|
15
|
+
date: 2021-12-16 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rspec
|
@@ -327,6 +327,7 @@ files:
|
|
327
327
|
- lib/pact/hal/http_client.rb
|
328
328
|
- lib/pact/hal/link.rb
|
329
329
|
- lib/pact/hal/non_json_entity.rb
|
330
|
+
- lib/pact/hash_refinements.rb
|
330
331
|
- lib/pact/pact_broker.rb
|
331
332
|
- lib/pact/pact_broker/fetch_pact_uris_for_verification.rb
|
332
333
|
- lib/pact/pact_broker/fetch_pacts.rb
|
@@ -411,7 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
411
412
|
- !ruby/object:Gem::Version
|
412
413
|
version: '0'
|
413
414
|
requirements: []
|
414
|
-
rubygems_version: 3.2.
|
415
|
+
rubygems_version: 3.2.33
|
415
416
|
signing_key:
|
416
417
|
specification_version: 4
|
417
418
|
summary: Enables consumer driven contract testing, providing a mock service and DSL
|