pact_broker-client 1.19.0 → 1.20.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
  SHA1:
3
- metadata.gz: 254d1374fb868966c77ccff58753e8d53d96f577
4
- data.tar.gz: fe50c5757ad5e4e10efda0aa144e63e167fec078
3
+ metadata.gz: 36bf162b7373bf5c66a1144647bc90cec11eceea
4
+ data.tar.gz: ac2f6395bd8882eb2711af95bb999c9dda3678cb
5
5
  SHA512:
6
- metadata.gz: 9104dcc0ffcd52808781158d8ec862314063b18fbd5338ac535e8baba140030e833af899b1af00056f3822933790f9631214a01be04bfa0d48228b366b344856
7
- data.tar.gz: c251c838c5379b259120af768652493d05184d812157b6b3d44963116016707709c2216138c21b74109038291f0c3d102ecc200f83c856e1ec995bf924f9a540
6
+ metadata.gz: d6f31eadfca03d30063b7377d83792f45f44e0ef71f700ae34cafbe9d0d950d21e2cf19ebd57203329a7e5306ab57fb3b22ace88e42c2142b2ed3aba1ecdecbb
7
+ data.tar.gz: e0fd38b680973acdca44a52935f3c2317c4e23894c8642c63fdf08ebad6e848e4120d2e6a10f7a68fee291c3c17f7808a4c40ebe07dec896ba461df01bfd5c4c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ <a name="v1.20.0"></a>
2
+ ### v1.20.0 (2019-08-27)
3
+
4
+
5
+ #### Features
6
+
7
+ * allow limit to be set for can-i-deploy until https://github.com/pact-foundation/pact_broker-client/issues/53 is fixed ([f692774](/../../commit/f692774))
8
+
9
+
1
10
  <a name="v1.19.0"></a>
2
11
  ### v1.19.0 (2019-06-25)
3
12
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Pact Broker Client
2
2
 
3
- A client for the Pact Broker. Publishes pacts to, and retrieves pacts from, a Pact Broker. The functionality is available via a CLI, or via Ruby Rake tasks. You can also use the [Pact CLI Docker image][docker].
3
+ A client for the Pact Broker. Publishes pacts to, and retrieves pacts from, a Pact Broker. The functionality is available via a CLI, or via Ruby Rake tasks. You can also use the [Pact CLI Docker image](https://hub.docker.com/r/pactfoundation/pact-cli).
4
4
 
5
5
  [![Build Status](https://travis-ci.org/pact-foundation/pact_broker-client.svg?branch=master)](https://travis-ci.org/pact-foundation/pact_broker-client)
6
6
 
@@ -116,14 +116,14 @@ Description:
116
116
  If you do not/cannot tag every application at deployment, you have two options. You can either use the very first form of this
117
117
  command which just checks that the *latest* verification is successful (not recommended as it's the production version that you
118
118
  really care about) or you will need to determine the production versions of each collaborating application from some other
119
- source (eg. git) and explictly reference each one using one using the format `--pacticipant PACTICIPANT1 --version VERSION1
119
+ source (eg. git) and explicitly reference each one using one using the format `--pacticipant PACTICIPANT1 --version VERSION1
120
120
  --pacticipant PACTICIPANT2 --version VERSION2 ...`
121
121
 
122
122
  # Other commands
123
123
 
124
124
  Check the status of the pacts for the latest pacticipant version. This form is not recommended for use in your CI as it is
125
125
  possible that the version you are about to deploy is not the the version that the Broker considers the latest. It's best to
126
- specify the version explictly.
126
+ specify the version explicitly.
127
127
 
128
128
  $ pact-broker can-i-deploy --pacticipant PACTICIPANT --latest --broker-base-url BROKER_BASE_URL
129
129
 
@@ -32,12 +32,14 @@ module PactBroker
32
32
  method_option :verbose, aliases: "-v", type: :boolean, default: false, required: false, desc: "Verbose output. Default: false"
33
33
  method_option :retry_while_unknown, banner: 'TIMES', type: :numeric, default: 0, required: false, desc: "The number of times to retry while there is an unknown verification result (ie. the provider verification is likely still running)"
34
34
  method_option :retry_interval, banner: 'SECONDS', type: :numeric, default: 10, required: false, desc: "The time between retries in seconds. Use in conjuction with --retry-while-unknown"
35
+ # Allow limit to be set manually until https://github.com/pact-foundation/pact_broker-client/issues/53 is fixed
36
+ method_option :limit, hide: true
35
37
 
36
38
  def can_i_deploy(*ignored_but_necessary)
37
39
  selectors = VersionSelectorOptionsParser.call(ARGV)
38
40
  validate_can_i_deploy_selectors(selectors)
39
41
  can_i_deploy_options = { output: options.output, retry_while_unknown: options.retry_while_unknown, retry_interval: options.retry_interval }
40
- result = CanIDeploy.call(options.broker_base_url, selectors, {to_tag: options.to}, can_i_deploy_options, pact_broker_client_options)
42
+ result = CanIDeploy.call(options.broker_base_url, selectors, {to_tag: options.to, limit: options.limit}, can_i_deploy_options, pact_broker_client_options)
41
43
  $stdout.puts result.message
42
44
  exit(1) unless result.success
43
45
  end
@@ -20,11 +20,11 @@ If all applications within the pact network are not being deployed continuously
20
20
 
21
21
  ## Other approaches
22
22
 
23
- If you do not/cannot tag every application at deployment, you have two options. You can either use the very first form of this command which just checks that the *latest* verification is successful (not recommended as it's the production version that you really care about) or you will need to determine the production versions of each collaborating application from some other source (eg. git) and explictly reference each one using one using the format `--pacticipant PACTICIPANT1 --version VERSION1 --pacticipant PACTICIPANT2 --version VERSION2 ...`
23
+ If you do not/cannot tag every application at deployment, you have two options. You can either use the very first form of this command which just checks that the *latest* verification is successful (not recommended as it's the production version that you really care about) or you will need to determine the production versions of each collaborating application from some other source (eg. git) and explicitly reference each one using one using the format `--pacticipant PACTICIPANT1 --version VERSION1 --pacticipant PACTICIPANT2 --version VERSION2 ...`
24
24
 
25
25
  # Other commands
26
26
 
27
- Check the status of the pacts for the latest pacticipant version. This form is not recommended for use in your CI as it is possible that the version you are about to deploy is not the the version that the Broker considers the latest. It's best to specify the version explictly.
27
+ Check the status of the pacts for the latest pacticipant version. This form is not recommended for use in your CI as it is possible that the version you are about to deploy is not the the version that the Broker considers the latest. It's best to specify the version explicitly.
28
28
 
29
29
  $ pact-broker can-i-deploy --pacticipant PACTICIPANT --latest --broker-base-url BROKER_BASE_URL
30
30
 
@@ -46,6 +46,7 @@ module PactBroker
46
46
  if options.key?(:success)
47
47
  opts[:success] = [*options[:success]]
48
48
  end
49
+ opts[:limit] = options[:limit] if options[:limit]
49
50
  if options[:to_tag]
50
51
  opts[:latest] = 'true'
51
52
  opts[:tag] = options[:to_tag]
@@ -1,5 +1,5 @@
1
1
  module PactBroker
2
2
  module Client
3
- VERSION = '1.19.0'
3
+ VERSION = '1.20.0'
4
4
  end
5
5
  end
@@ -23,7 +23,8 @@ module PactBroker
23
23
  broker_token: 'token',
24
24
  verbose: 'verbose',
25
25
  retry_while_unknown: 1,
26
- retry_interval: 2
26
+ retry_interval: 2,
27
+ limit: 1000
27
28
  }
28
29
  end
29
30
 
@@ -35,7 +36,7 @@ module PactBroker
35
36
  end
36
37
 
37
38
  it "invokes the CanIDeploy service" do
38
- expect(CanIDeploy).to receive(:call).with('http://pact-broker', version_selectors, {to_tag: nil}, {output: 'table', retry_while_unknown: 1, retry_interval: 2}, {token: 'token', verbose: 'verbose'})
39
+ expect(CanIDeploy).to receive(:call).with('http://pact-broker', version_selectors, {to_tag: nil, limit: 1000}, {output: 'table', retry_while_unknown: 1, retry_interval: 2}, {token: 'token', verbose: 'verbose'})
39
40
  invoke_can_i_deploy
40
41
  end
41
42
 
@@ -53,7 +54,7 @@ module PactBroker
53
54
  end
54
55
 
55
56
  it "passes the value as the matrix options" do
56
- expect(CanIDeploy).to receive(:call).with(anything, anything, {to_tag: 'prod'}, anything, anything)
57
+ expect(CanIDeploy).to receive(:call).with(anything, anything, {to_tag: 'prod', limit: 1000}, anything, anything)
57
58
  invoke_can_i_deploy
58
59
  end
59
60
  end
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.19.0
4
+ version: 1.20.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: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2019-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty