pact_broker-client 1.27.8 → 1.27.9

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: 23e0441c61c9046ba54f76e89c3dfaf221e97637d62303538c1c289b106dc345
4
- data.tar.gz: 794404685c04e88fa5e46290c80e1b8c963771ef27f752b9b238c71094127654
3
+ metadata.gz: 3822acf0ceb27fd9040ec95fd4a9e828b521e92cbfef20c4910121e27c67bfc9
4
+ data.tar.gz: 7346eca5f065e52936f6c6c2079e6b5dba9cbaef970e91e6866f963b0dff8ada
5
5
  SHA512:
6
- metadata.gz: d8a1df20f8d02f0af9480b8b62e480d0c833cb3253f2188c5c378c8394b90d7f59e490626dc8d431b79195720658d99393a743e6ffb4080ccb30c94e3d4d18ae
7
- data.tar.gz: e26f51a8f685ebda5c1eb80aecd1036f8c1cc0196f08b8c3232220bbce828d6f44fb26d05f051e809f9efe3734e9aa6e85173856072b8962836a80a2ebcf238a
6
+ metadata.gz: 2910d96b6f9835ff76f1a80c05cdb5176b8693d4dfe1d198e95541c138f4c7b03624c535173b3e25ce5e8e44e706f7bcfd39aec746ea346fa1922a9c41f7c8cf
7
+ data.tar.gz: 925fd540adc6840aad5c5c9c4e07c992bc3cb40bb8f168ea6742616aabaeaabc530c855849f4d4e0fafe1d03e14c0925e52e72584576700370dbeae235082744
@@ -17,6 +17,7 @@ jobs:
17
17
  ruby-version: '2.6'
18
18
  - name: Install gems
19
19
  run: |
20
+ gem update --system
20
21
  gem install bundler -v 2.0.2
21
22
  bundle install
22
23
  - name: Configure git
data/Dockerfile ADDED
@@ -0,0 +1,23 @@
1
+ FROM ruby:2.2.4
2
+
3
+ #RUN apk update \
4
+ # && apk --no-cache add \
5
+ # "build-base>=0.5" \
6
+ # "bash>=4.4" \
7
+ # "ca-certificates>=20190108" \
8
+ # "git>=2.20" \
9
+ # "postgresql-dev>=11.3" \
10
+ # "sqlite-dev>=3.28" \
11
+ # "sqlite>=3.28" \
12
+ # "tzdata>=2019" \
13
+ # "mariadb-dev>=10.3" \
14
+ # && rm -rf /var/cache/apk/*
15
+
16
+ WORKDIR /app
17
+
18
+ COPY . ./
19
+
20
+ RUN gem install bundler -v '~>1.0' \
21
+ && bundle install --jobs 3 --retry 3
22
+
23
+ CMD []
data/TODO.md ADDED
@@ -0,0 +1,7 @@
1
+ can-i-deploy --pacticipant Foo --latest dev --to staging
2
+ can-i-deploy --pacticipant Foo --latest dev --with-all-tagged prod # multiple versions in production
3
+
4
+ can-i-deploy --pacticipant Foo --stage dev --to-stage prod
5
+
6
+ can-i-deploy --pacticipant Foo --branch dev --to-stage prod
7
+ can-i-deploy --pacticipant Foo --latest dev --to-stage prod
data/entrypoint.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+
3
+ cd $HOME
4
+ bundle exec bin/"$@"
@@ -1,5 +1,5 @@
1
1
  module PactBroker
2
2
  module Client
3
- VERSION = '1.27.8'
3
+ VERSION = '1.27.9'
4
4
  end
5
5
  end
@@ -0,0 +1,44 @@
1
+ require 'pact_broker/client/pacts/list_latest_versions'
2
+
3
+ module PactBroker::Client
4
+ describe Pacts::ListLatestVersions, :pact => true do
5
+
6
+ let(:pact_broker_client) { PactBrokerClient.new(base_url: 'http://localhost:1234') }
7
+
8
+ describe "listing pacts" do
9
+ context "when pacts exist" do
10
+ let(:response_body) { JSON.parse(File.read("./spec/support/pacts_latest_list.json"))}
11
+ let(:expected_pacts) do
12
+ [{
13
+ :consumer => {
14
+ :name => 'Condor',
15
+ :version => {
16
+ :number => '1.3.0'
17
+ }
18
+ },
19
+ :provider => {
20
+ :name => 'Pricing Service'
21
+ }
22
+ }
23
+ ]
24
+ end
25
+ before do
26
+ pact_broker.
27
+ given("a pact between Condor and the Pricing Service exists").
28
+ upon_receiving("a request to list the latest pacts").
29
+ with(
30
+ method: :get,
31
+ path: '/pacts/latest',
32
+ headers: {} ).
33
+ will_respond_with( headers: {'Content-Type' => Pact.term(generate: 'application/hal+json', matcher: %r{application/hal\+json})},
34
+ status: 200,
35
+ body: response_body
36
+ )
37
+ end
38
+ it "returns the response body" do
39
+ expect(pact_broker_client.pacts.list_latest).to eq(expected_pacts)
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact_broker-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.27.8
4
+ version: 1.27.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Beth Skurrie
@@ -152,10 +152,12 @@ files:
152
152
  - ".rspec"
153
153
  - ".travis.yml"
154
154
  - CHANGELOG.md
155
+ - Dockerfile
155
156
  - Gemfile
156
157
  - README.md
157
158
  - RELEASING.md
158
159
  - Rakefile
160
+ - TODO.md
159
161
  - appveyor.yml
160
162
  - bin/pact-broker
161
163
  - ci.sh
@@ -163,6 +165,7 @@ files:
163
165
  - doc/markdown/README.md
164
166
  - doc/pacts/markdown/Pact Broker Client - Pact Broker.md
165
167
  - doc/pacts/markdown/README.md
168
+ - entrypoint.sh
166
169
  - example/scripts/README.md
167
170
  - example/scripts/deploy-consumer.sh
168
171
  - example/scripts/pact.json
@@ -254,6 +257,7 @@ files:
254
257
  - spec/lib/pact_broker/client/webhooks/create_spec.rb
255
258
  - spec/pacts/pact_broker_client-pact_broker.json
256
259
  - spec/service_providers/extra_goodies_spec.rb
260
+ - spec/service_providers/list_latest_pact_versions_spec.rb.bak
257
261
  - spec/service_providers/pact_broker_client_matrix_spec.rb
258
262
  - spec/service_providers/pact_broker_client_pacticipant_version_spec.rb
259
263
  - spec/service_providers/pact_broker_client_publish_spec.rb
@@ -296,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
296
300
  - !ruby/object:Gem::Version
297
301
  version: '0'
298
302
  requirements: []
299
- rubygems_version: 3.1.2
303
+ rubygems_version: 3.1.4
300
304
  signing_key:
301
305
  specification_version: 4
302
306
  summary: See description
@@ -332,6 +336,7 @@ test_files:
332
336
  - spec/lib/pact_broker/client/webhooks/create_spec.rb
333
337
  - spec/pacts/pact_broker_client-pact_broker.json
334
338
  - spec/service_providers/extra_goodies_spec.rb
339
+ - spec/service_providers/list_latest_pact_versions_spec.rb.bak
335
340
  - spec/service_providers/pact_broker_client_matrix_spec.rb
336
341
  - spec/service_providers/pact_broker_client_pacticipant_version_spec.rb
337
342
  - spec/service_providers/pact_broker_client_publish_spec.rb