pact-provider-verifier 1.35.0 → 1.36.1

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: 40aec54d6032b2a63f96e834a0308e98f6093af635bf5450b6575d05eb7a8549
4
- data.tar.gz: f445fbe3035fc931018214d5bad5f8e616e8dda0ba682a8051081505503796a6
3
+ metadata.gz: 4a4c9bded09dc9614d878dbe6a84d2d5accfadc7be2931e553a4516ad0874a6f
4
+ data.tar.gz: f06fd25ffbff49a98b777b474e546816f9ed9a78bda95a671f6bf30a44ceff3d
5
5
  SHA512:
6
- metadata.gz: 6d9941c91fed0ca20106fc24077c20556ea3757aa3ca176718e50d1c903e5d6608620c5160916c5396908e30ecd01fa58e4c4a1e25654cbbe26cfaf1da312c61
7
- data.tar.gz: 1317675953ae4ebecaa9c289deac2a7f09fda5ef3778f6dfada6651d5bc52a49ae5629fa8b55b63ea1d0755942be26b151ec0ad0a7ac6687d1f8b5bb77f2e036
6
+ metadata.gz: bc372e2bf7ae0c4e042050f3285e8976994a55851ec2a5892a48329152a3f4133a0c17ac4d8d7301bc424c874006f39e177b4a484b881984b051cf4a02c49667
7
+ data.tar.gz: d144b62f31731fe889e10a8c91aacd2de6fbe4b403f25af705ea11dc0dca66cc97fc772cde616d80c85b32a26db2739d167057209e8f21ac6086e688eff68d5e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ <a name="v1.36.1"></a>
2
+ ### v1.36.1 (2021-10-27)
3
+
4
+ #### Bug Fixes
5
+
6
+ * set branch properly from --provider-version-branch ([ad2f233](/../../commit/ad2f233))
7
+
8
+ <a name="v1.36.0"></a>
9
+ ### v1.36.0 (2021-09-09)
10
+
11
+ #### Features
12
+
13
+ * add support for specifying the provider version branch ([7f53206](/../../commit/7f53206))
14
+
15
+ <a name="v1.35.2"></a>
16
+ ### v1.35.2 (2021-09-09)
17
+
18
+ #### Bug Fixes
19
+
20
+ * lock pact gem to compatible version ([b4db21e](/../../commit/b4db21e))
21
+
22
+ <a name="v1.35.1"></a>
23
+ ### v1.35.1 (2021-07-01)
24
+
25
+ #### Bug Fixes
26
+
27
+ * exit with correct exit code on failure ([a8a2144](/../../commit/a8a2144))
28
+
1
29
  <a name="v1.35.0"></a>
2
30
  ### v1.35.0 (2021-03-20)
3
31
 
data/README.md CHANGED
@@ -10,7 +10,7 @@ binary-like CLI tool.
10
10
 
11
11
  * Verify Pacts against Pacts published to an http endpoint, such as a [Pact Broker](https://github.com/pact-foundation/pact_broker)
12
12
  * Verify local `*.json` Pacts on the file system
13
- * Works with Pact [provider states](https://docs.pact.io/documentation/provider_states.html) should you need them
13
+ * Works with Pact [provider states](https://docs.pact.io/getting_started/provider_states) should you need them
14
14
  * Publishes the verification results back to the pact broker if the pact was retrieved from a broker.
15
15
 
16
16
  ## Installation
@@ -161,7 +161,7 @@ Modification of the request headers is sometimes necessary, but be aware that an
161
161
 
162
162
  ### API with Provider States
163
163
 
164
- Read the [Provider States section on docs.pact.io](https://docs.pact.io/documentation/provider_states.html) for an introduction to provider states.
164
+ Read the [Provider States section on docs.pact.io](https://docs.pact.io/getting_started/provider_states) for an introduction to provider states.
165
165
 
166
166
  To allow the correct data to be set up before each interaction is replayed, you will need to create a dev/test only HTTP endpoint that accepts a JSON document that looks like:
167
167
 
@@ -6,15 +6,16 @@ module Pact
6
6
  module ProviderVerifier
7
7
  class AggregatePactConfigs
8
8
 
9
- def self.call(pact_urls, provider_name, consumer_version_tags, consumer_version_selectors, provider_version_tags, pact_broker_base_url, http_client_options, options)
10
- new(pact_urls, provider_name, consumer_version_tags, consumer_version_selectors, provider_version_tags, pact_broker_base_url, http_client_options, options).call
9
+ def self.call(pact_urls, provider_name, consumer_version_tags, consumer_version_selectors, provider_version_branch, provider_version_tags, pact_broker_base_url, http_client_options, options)
10
+ new(pact_urls, provider_name, consumer_version_tags, consumer_version_selectors, provider_version_branch, provider_version_tags, pact_broker_base_url, http_client_options, options).call
11
11
  end
12
12
 
13
- def initialize(pact_urls, provider_name, consumer_version_tags, consumer_version_selectors, provider_version_tags, pact_broker_base_url, http_client_options, options)
13
+ def initialize(pact_urls, provider_name, consumer_version_tags, consumer_version_selectors, provider_version_branch, provider_version_tags, pact_broker_base_url, http_client_options, options)
14
14
  @pact_urls = pact_urls
15
15
  @provider_name = provider_name
16
16
  @consumer_version_tags = consumer_version_tags
17
17
  @consumer_version_selectors = consumer_version_selectors
18
+ @provider_version_branch = provider_version_branch
18
19
  @provider_version_tags = provider_version_tags
19
20
  @pact_broker_base_url = pact_broker_base_url
20
21
  @http_client_options = http_client_options
@@ -27,7 +28,7 @@ module Pact
27
28
 
28
29
  private
29
30
 
30
- attr_reader :pact_urls, :provider_name, :consumer_version_tags, :consumer_version_selectors, :provider_version_tags, :pact_broker_base_url, :http_client_options, :options
31
+ attr_reader :pact_urls, :provider_name, :consumer_version_tags, :consumer_version_selectors, :provider_version_branch, :provider_version_tags, :pact_broker_base_url, :http_client_options, :options
31
32
 
32
33
  def specified_pact_uris
33
34
  pact_urls.collect{ | url | Pact::PactBroker.build_pact_uri(url, http_client_options) }
@@ -45,6 +46,7 @@ module Pact
45
46
  @pacts_for_verification ||= Pact::PactBroker.fetch_pact_uris_for_verification(
46
47
  provider_name,
47
48
  aggregated_consumer_version_selectors,
49
+ provider_version_branch,
48
50
  provider_version_tags,
49
51
  pact_broker_base_url,
50
52
  http_client_options,
@@ -19,13 +19,14 @@ module Pact
19
19
 
20
20
  PROXY_PACT_HELPER = File.expand_path(File.join(File.dirname(__FILE__), "pact_helper.rb"))
21
21
  EMPTY_ARRAY = [].freeze
22
- attr_reader :pact_urls, :options, :consumer_version_tags, :provider_version_tags, :consumer_version_selectors, :publish_verification_results
22
+ attr_reader :pact_urls, :options, :consumer_version_tags, :provider_version_branch, :provider_version_tags, :consumer_version_selectors, :publish_verification_results
23
23
 
24
24
  def initialize pact_urls, options = {}
25
25
  @pact_urls = pact_urls
26
26
  @options = options
27
27
  @consumer_version_tags = options.consumer_version_tag || EMPTY_ARRAY
28
28
  @provider_version_tags = merge_provider_version_tags(options)
29
+ @provider_version_branch = options.provider_version_branch
29
30
  @consumer_version_selectors = parse_consumer_version_selectors(options.consumer_version_selector || EMPTY_ARRAY)
30
31
  @publish_verification_results = options.publish_verification_results || ENV['PACT_BROKER_PUBLISH_VERIFICATION_RESULTS'] == 'true'
31
32
  end
@@ -88,6 +89,10 @@ module Pact
88
89
  app_version this.options.provider_app_version
89
90
  end
90
91
 
92
+ if this.options.provider_version_branch
93
+ app_version_branch this.options.provider_version_branch
94
+ end
95
+
91
96
  if this.provider_version_tags.any?
92
97
  app_version_tags this.provider_version_tags
93
98
  end
@@ -208,6 +213,7 @@ module Pact
208
213
  options.provider,
209
214
  consumer_version_tags,
210
215
  consumer_version_selectors,
216
+ provider_version_branch,
211
217
  provider_version_tags,
212
218
  options.pact_broker_base_url || ENV['PACT_BROKER_BASE_URL'],
213
219
  http_client_options,
@@ -21,6 +21,7 @@ module Pact
21
21
  method_option :consumer_version_tag, type: :array, banner: "TAG", desc: "Retrieve the latest pacts with this consumer version tag. Used in conjunction with --provider. May be specified multiple times.", :required => false
22
22
  method_option :consumer_version_selector, hide: true, type: :array, banner: "SELECTOR", desc: "JSON string specifying a selector that identifies which pacts to verify. May be specified multiple times. See below for further documentation.", :required => false
23
23
  method_option :provider_version_tag, type: :array, banner: "TAG", desc: "Tag to apply to the provider application version. May be specified multiple times.", :required => false
24
+ method_option :provider_version_branch, banner: "BRANCH", desc: "The name of the branch the provider version belongs to.", :required => false
24
25
  method_option :tag_with_git_branch, aliases: "-g", type: :boolean, default: false, required: false, desc: "Tag provider version with the name of the current git branch. Default: false"
25
26
  method_option :provider_app_version, aliases: "-a", desc: "Provider application version, required when publishing verification results", :required => false
26
27
  method_option :publish_verification_results, aliases: "-r", desc: "Publish verification results to the broker. This can also be enabled by setting the environment variable PACT_BROKER_PUBLISH_VERIFICATION_RESULTS=true", required: false, type: :boolean, default: false
@@ -125,7 +126,7 @@ module Pact
125
126
  exit 1
126
127
  end
127
128
 
128
- def exit_on_failure?
129
+ def self.exit_on_failure?
129
130
  true
130
131
  end
131
132
  end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module ProviderVerifier
3
- VERSION = "1.35.0"
3
+ VERSION = "1.36.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact-provider-verifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.35.0
4
+ version: 1.36.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Fellows
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-29 00:00:00.000000000 Z
12
+ date: 2021-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '1.55'
34
+ version: '1.59'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '1.55'
41
+ version: '1.59'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: pact-message
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -342,7 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
342
342
  - !ruby/object:Gem::Version
343
343
  version: '0'
344
344
  requirements: []
345
- rubygems_version: 3.2.15
345
+ rubygems_version: 3.2.30
346
346
  signing_key:
347
347
  specification_version: 4
348
348
  summary: Provides a Pact verification service for use with Pact