pact_broker 2.64.0 → 2.65.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: 3fee7d96bde4fc04adb41fe041a124e81c9b371336f9308f92c918a2fb4ca914
4
- data.tar.gz: 3706e5b3a8fbf6db31c748658a1b0f22713f872889757844c9506250b2cefa54
3
+ metadata.gz: 2f74ca577601716567fbf1b435dba1a2d0c8b3cec8d3c9f77ca3930ce83e49bd
4
+ data.tar.gz: 3920435e5b898db13b39808b43a0f40de770674ecf99ce84e3587b4658a1b0a5
5
5
  SHA512:
6
- metadata.gz: d1a1046845fb3832062d675ebfa1d49e0fa62ac6ea8acb8edb6c706b53e66888b72a243bc16e94842b89b4b349adf3ac22c3f35f043a75538f9dea7f3d28122a
7
- data.tar.gz: fdad352fd207e05717eb127ec0ad0c35de8465b4dfed9a6cdcf862bc5d6f169bf15975a932c8cd355716b90ba3291552fadc35aab1768710179f330592fd5166
6
+ metadata.gz: 72e1efd36d6f4ccce34a9e7088ee0232678721606710a5d2a91f74d72ddb0b1d4642645ab26083af05683343f928818132ec37eab0b76e54efc0077fe4d474ea
7
+ data.tar.gz: 0dee5c2f282ca4a21e25502a4ea2c3d11dae57931e196297f4d3fcda46f6bfec82c155899e69975f72f79c16bc34813ce38b6bd9171c4d4d45238564f0d21255
@@ -1,3 +1,12 @@
1
+ <a name="v2.65.0"></a>
2
+ ### v2.65.0 (2020-09-25)
3
+
4
+ #### Features
5
+
6
+ * **pacts for verification**
7
+ * allow API to be disabled by setting PACT_BROKER_FEATURES=disable_pacts_for_verification ([bab116b3](/../../commit/bab116b3))
8
+ * update wording for inclusion notice when selector has a consumer specified ([61370d1f](/../../commit/61370d1f))
9
+
1
10
  <a name="v2.64.0"></a>
2
11
  ### v2.64.0 (2020-09-25)
3
12
 
@@ -144,6 +144,11 @@ module PactBroker
144
144
  }]
145
145
  }
146
146
 
147
+ if PactBroker.feature_enabled?(:disable_pacts_for_verification)
148
+ links_hash.delete('pb:provider-pacts-for-verification')
149
+ links_hash.delete('beta:provider-pacts-for-verification')
150
+ end
151
+
147
152
  links_hash
148
153
  end
149
154
 
@@ -131,12 +131,14 @@ module PactBroker
131
131
 
132
132
  def selector_description selector
133
133
  if selector.overall_latest?
134
- "latest pact between a consumer and #{provider_name}"
134
+ consumer_label = selector.consumer ? selector.consumer : 'a consumer'
135
+ "latest pact between #{consumer_label} and #{provider_name}"
135
136
  elsif selector.latest_for_tag?
137
+ version_label = selector.consumer ? "version of #{selector.consumer}" : "consumer version"
136
138
  if selector.fallback_tag?
137
- "latest pact for a consumer version tagged '#{selector.fallback_tag}' (fallback tag used as no pact was found with tag '#{selector.tag}')"
139
+ "latest pact for a #{version_label} tagged '#{selector.fallback_tag}' (fallback tag used as no pact was found with tag '#{selector.tag}')"
138
140
  else
139
- "latest pact for a consumer version tagged '#{selector.tag}'"
141
+ "latest pact for a #{version_label} tagged '#{selector.tag}'"
140
142
  end
141
143
  elsif selector.all_for_tag_and_consumer?
142
144
  "pacts for all #{selector.consumer} versions tagged '#{selector.tag}'"
@@ -1,3 +1,3 @@
1
1
  module PactBroker
2
- VERSION = '2.64.0'
2
+ VERSION = '2.65.0'
3
3
  end
@@ -73,6 +73,18 @@ module PactBroker
73
73
 
74
74
  its(:inclusion_reason) { is_expected.to include "The pact at http://pact is being verified because it matches the following configured selection criterion: pacts for all Foo versions tagged 'prod'"}
75
75
  end
76
+
77
+ context "when the pact is the latest versions for a tag and consumer" do
78
+ let(:selectors) { Selectors.new(Selector.latest_for_tag_and_consumer('prod', 'Foo')) }
79
+
80
+ its(:inclusion_reason) { is_expected.to include "The pact at http://pact is being verified because it matches the following configured selection criterion: latest pact for a version of Foo tagged 'prod'"}
81
+ end
82
+
83
+ context "when the pact is the latest version for and consumer" do
84
+ let(:selectors) { Selectors.new(Selector.latest_for_consumer('Foo')) }
85
+
86
+ its(:inclusion_reason) { is_expected.to include "The pact at http://pact is being verified because it matches the following configured selection criterion: latest pact between Foo and Bar"}
87
+ end
76
88
  end
77
89
 
78
90
  describe "#pending_reason" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact_broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.64.0
4
+ version: 2.65.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bethany Skurrie