pact_broker-client 1.76.0 → 1.76.2

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: 435bab82aa473a0a4cf30e95ea96f5553fd5c95d3d6eb18c0babca86313e56d8
4
- data.tar.gz: d7d3730d546a44914c1076965db6d31e40e3be640906d9af0ceeede188a38801
3
+ metadata.gz: fd56681a5a874533d5601479c66ccce9096b5b17d97cec422ed14dbb49a1f03e
4
+ data.tar.gz: f1df5c362d04a332bfbf5b5e8b89dd3444c94a5d03e7840864be0e76fffeb0ac
5
5
  SHA512:
6
- metadata.gz: b2f3d8010355a7de3d14365268e652952e888980a65f25caf8825dfcf7977fe19f2ea38a9183dc0e5a9bb26c0895fda00cf9ad4f3deb35d3c7b1c425b250fb3a
7
- data.tar.gz: 4861ec8657c67c0f6e39facb3a86018c1d56ccbc1e379dd984ebad385d7c593d432b4ebb44cd53893b82007eec9ebc7f2c8825d21ecf3209d5ce2e37696d970c
6
+ metadata.gz: dfc90ba2cba909d9cb01ac15b0cfea6f2833fc6f45f27e8ffef5a6fa5062a24356ffa926ee05ad43b9650632b4346ebb7d74bd89bdd65250d0a734756f39499d
7
+ data.tar.gz: bf22ba6e9a8444bed009133ec0993264e0becf16d1024e2f23a7ec82c835cd8bd0f4044bf04bbf04f4867a994860976a6dbe3167d696f6adffae779b98a84c92
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --format documentation
3
+ --require spec_helper
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ <a name="v1.76.2"></a>
2
+ ### v1.76.2 (2024-10-13)
3
+
4
+ #### Bug Fixes
5
+
6
+ * Add dependency of ostruct to gem, to fix warning ostruct was loaded ([eb61c27](/../../commit/eb61c27))
7
+ * Dockerfile to reduce vulnerabilities (#172) ([79482c2](/../../commit/79482c2))
8
+
9
+ <a name="v1.76.1"></a>
10
+ ### v1.76.1 (2024-08-21)
11
+
12
+ #### Bug Fixes
13
+
14
+ * missing list_latest_versions due to loose regex on gem files (#170) ([c5776fc](/../../commit/c5776fc))
15
+
1
16
  <a name="v1.76.0"></a>
2
17
  ### v1.76.0 (2024-08-07)
3
18
 
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM ruby:3.2-alpine
1
+ FROM ruby:3.3.5-alpine
2
2
 
3
3
  RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing hub
4
4
  RUN apk add --update --no-cache git openssh bash
data/README.md CHANGED
@@ -66,7 +66,7 @@ Options:
66
66
  # The consumer application version
67
67
  -h, [--branch=BRANCH]
68
68
  # Repository branch of the consumer version
69
- -r, [--auto-detect-version-properties], [--no-auto-detect-version-properties]
69
+ -r, [--auto-detect-version-properties], [--no-auto-detect-version-properties], [--skip-auto-detect-version-properties]
70
70
  # Automatically detect the repository commit, branch and build
71
71
  URL from known CI environment variables or git CLI. Supports
72
72
  Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins,
@@ -75,7 +75,7 @@ Options:
75
75
  -t, [--tag=TAG]
76
76
  # Tag name for consumer version. Can be specified multiple
77
77
  times.
78
- -g, [--tag-with-git-branch], [--no-tag-with-git-branch]
78
+ -g, [--tag-with-git-branch], [--no-tag-with-git-branch], [--skip-tag-with-git-branch]
79
79
  # Tag consumer version with the name of the current git branch.
80
80
  Supports Buildkite, Circle CI, Travis CI, GitHub Actions,
81
81
  Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and
@@ -83,7 +83,7 @@ Options:
83
83
  # Default: false
84
84
  [--build-url=BUILD_URL]
85
85
  # The build URL that created the pact
86
- [--merge], [--no-merge]
86
+ [--merge], [--no-merge], [--skip-merge]
87
87
  # If a pact already exists for this consumer version and
88
88
  provider, merge the contents. Useful when running Pact tests
89
89
  concurrently on different build nodes.
@@ -99,7 +99,7 @@ Options:
99
99
  # Pact Broker basic auth password
100
100
  -k, [--broker-token=BROKER_TOKEN]
101
101
  # Pact Broker bearer token
102
- -v, [--verbose], [--no-verbose]
102
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
103
103
  # Verbose output.
104
104
  # Default: false
105
105
  ```
@@ -121,7 +121,7 @@ Options:
121
121
  # Pact Broker basic auth password
122
122
  -k, [--broker-token=BROKER_TOKEN]
123
123
  # Pact Broker bearer token
124
- -v, [--verbose], [--no-verbose]
124
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
125
125
  # Verbose output.
126
126
  # Default: false
127
127
  -o, [--output=OUTPUT]
@@ -145,7 +145,7 @@ Options:
145
145
  deployment code
146
146
  [--display-name=DISPLAY_NAME]
147
147
  # The display name of the environment
148
- [--production], [--no-production]
148
+ [--production], [--no-production], [--skip-production]
149
149
  # Whether or not this environment is a production environment.
150
150
  This is currently informational only.
151
151
  # Default: false
@@ -165,7 +165,7 @@ Options:
165
165
  # Pact Broker basic auth password
166
166
  -k, [--broker-token=BROKER_TOKEN]
167
167
  # Pact Broker bearer token
168
- -v, [--verbose], [--no-verbose]
168
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
169
169
  # Verbose output.
170
170
  # Default: false
171
171
  ```
@@ -186,7 +186,7 @@ Options:
186
186
  deployment code
187
187
  [--display-name=DISPLAY_NAME]
188
188
  # The display name of the environment
189
- [--production], [--no-production]
189
+ [--production], [--no-production], [--skip-production]
190
190
  # Whether or not this environment is a production environment.
191
191
  This is currently informational only.
192
192
  # Default: false
@@ -206,7 +206,7 @@ Options:
206
206
  # Pact Broker basic auth password
207
207
  -k, [--broker-token=BROKER_TOKEN]
208
208
  # Pact Broker bearer token
209
- -v, [--verbose], [--no-verbose]
209
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
210
210
  # Verbose output.
211
211
  # Default: false
212
212
  ```
@@ -233,7 +233,7 @@ Options:
233
233
  # Pact Broker basic auth password
234
234
  -k, [--broker-token=BROKER_TOKEN]
235
235
  # Pact Broker bearer token
236
- -v, [--verbose], [--no-verbose]
236
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
237
237
  # Verbose output.
238
238
  # Default: false
239
239
  ```
@@ -260,7 +260,7 @@ Options:
260
260
  # Pact Broker basic auth password
261
261
  -k, [--broker-token=BROKER_TOKEN]
262
262
  # Pact Broker bearer token
263
- -v, [--verbose], [--no-verbose]
263
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
264
264
  # Verbose output.
265
265
  # Default: false
266
266
  ```
@@ -285,7 +285,7 @@ Options:
285
285
  # Pact Broker basic auth password
286
286
  -k, [--broker-token=BROKER_TOKEN]
287
287
  # Pact Broker bearer token
288
- -v, [--verbose], [--no-verbose]
288
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
289
289
  # Verbose output.
290
290
  # Default: false
291
291
  ```
@@ -327,7 +327,7 @@ Options:
327
327
  # Pact Broker basic auth password
328
328
  -k, [--broker-token=BROKER_TOKEN]
329
329
  # Pact Broker bearer token
330
- -v, [--verbose], [--no-verbose]
330
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
331
331
  # Verbose output.
332
332
  # Default: false
333
333
  ```
@@ -368,7 +368,7 @@ Options:
368
368
  # Pact Broker basic auth password
369
369
  -k, [--broker-token=BROKER_TOKEN]
370
370
  # Pact Broker bearer token
371
- -v, [--verbose], [--no-verbose]
371
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
372
372
  # Verbose output.
373
373
  # Default: false
374
374
  ```
@@ -405,7 +405,7 @@ Options:
405
405
  # Pact Broker basic auth password
406
406
  -k, [--broker-token=BROKER_TOKEN]
407
407
  # Pact Broker bearer token
408
- -v, [--verbose], [--no-verbose]
408
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
409
409
  # Verbose output.
410
410
  # Default: false
411
411
  ```
@@ -436,7 +436,7 @@ Options:
436
436
  # Pact Broker basic auth password
437
437
  -k, [--broker-token=BROKER_TOKEN]
438
438
  # Pact Broker bearer token
439
- -v, [--verbose], [--no-verbose]
439
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
440
440
  # Verbose output.
441
441
  # Default: false
442
442
  ```
@@ -471,7 +471,7 @@ Options:
471
471
  [--branch=BRANCH]
472
472
  # The branch of the version for which you want to check the
473
473
  verification results.
474
- [--main-branch], [--no-main-branch]
474
+ [--main-branch], [--no-main-branch], [--skip-main-branch]
475
475
  # Use the latest version of the configured main branch of the
476
476
  pacticipant as the version for which you want to check the
477
477
  verification results
@@ -495,7 +495,7 @@ Options:
495
495
  # The time between retries in seconds. Use in conjuction with
496
496
  --retry-while-unknown
497
497
  # Default: 10
498
- [--dry-run], [--no-dry-run]
498
+ [--dry-run], [--no-dry-run], [--skip-dry-run]
499
499
  # When dry-run is enabled, always exit process with a success
500
500
  code. Can also be enabled by setting the environment variable
501
501
  PACT_BROKER_CAN_I_DEPLOY_DRY_RUN=true. This mode is useful when
@@ -514,7 +514,7 @@ Options:
514
514
  # Pact Broker basic auth password
515
515
  -k, [--broker-token=BROKER_TOKEN]
516
516
  # Pact Broker bearer token
517
- -v, [--verbose], [--no-verbose]
517
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
518
518
  # Verbose output.
519
519
  # Default: false
520
520
  ```
@@ -584,7 +584,7 @@ Options:
584
584
  # The time between retries in seconds. Use in conjuction with
585
585
  --retry-while-unknown
586
586
  # Default: 10
587
- [--dry-run], [--no-dry-run]
587
+ [--dry-run], [--no-dry-run], [--skip-dry-run]
588
588
  # When dry-run is enabled, always exit process with a success
589
589
  code. Can also be enabled by setting the environment variable
590
590
  PACT_BROKER_CAN_I_MERGE_DRY_RUN=true. This mode is useful when
@@ -603,7 +603,7 @@ Options:
603
603
  # Pact Broker basic auth password
604
604
  -k, [--broker-token=BROKER_TOKEN]
605
605
  # Pact Broker bearer token
606
- -v, [--verbose], [--no-verbose]
606
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
607
607
  # Verbose output.
608
608
  # Default: false
609
609
  ```
@@ -639,7 +639,7 @@ Options:
639
639
  # Pact Broker basic auth password
640
640
  -k, [--broker-token=BROKER_TOKEN]
641
641
  # Pact Broker bearer token
642
- -v, [--verbose], [--no-verbose]
642
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
643
643
  # Verbose output.
644
644
  # Default: false
645
645
  ```
@@ -666,7 +666,7 @@ Options:
666
666
  # Pact Broker basic auth password
667
667
  -k, [--broker-token=BROKER_TOKEN]
668
668
  # Pact Broker bearer token
669
- -v, [--verbose], [--no-verbose]
669
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
670
670
  # Verbose output.
671
671
  # Default: false
672
672
  ```
@@ -691,7 +691,7 @@ Options:
691
691
  # Pact Broker basic auth password
692
692
  -k, [--broker-token=BROKER_TOKEN]
693
693
  # Pact Broker bearer token
694
- -v, [--verbose], [--no-verbose]
694
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
695
695
  # Verbose output.
696
696
  # Default: false
697
697
  ```
@@ -727,20 +727,20 @@ Options:
727
727
  # Provider label, mutually exclusive with provider name
728
728
  [--description=DESCRIPTION]
729
729
  # Webhook description
730
- [--contract-content-changed], [--no-contract-content-changed]
730
+ [--contract-content-changed], [--no-contract-content-changed], [--skip-contract-content-changed]
731
731
  # Trigger this webhook when the pact content changes
732
- [--contract-published], [--no-contract-published]
732
+ [--contract-published], [--no-contract-published], [--skip-contract-published]
733
733
  # Trigger this webhook when a pact is published
734
- [--provider-verification-published], [--no-provider-verification-published]
734
+ [--provider-verification-published], [--no-provider-verification-published], [--skip-provider-verification-published]
735
735
  # Trigger this webhook when a provider verification result is
736
736
  published
737
- [--provider-verification-failed], [--no-provider-verification-failed]
737
+ [--provider-verification-failed], [--no-provider-verification-failed], [--skip-provider-verification-failed]
738
738
  # Trigger this webhook when a failed provider verification
739
739
  result is published
740
- [--provider-verification-succeeded], [--no-provider-verification-succeeded]
740
+ [--provider-verification-succeeded], [--no-provider-verification-succeeded], [--skip-provider-verification-succeeded]
741
741
  # Trigger this webhook when a successful provider verification
742
742
  result is published
743
- [--contract-requiring-verification-published], [--no-contract-requiring-verification-published]
743
+ [--contract-requiring-verification-published], [--no-contract-requiring-verification-published], [--skip-contract-requiring-verification-published]
744
744
  # Trigger this webhook when a contract is published that
745
745
  requires verification
746
746
  [--team-uuid=UUID]
@@ -754,7 +754,7 @@ Options:
754
754
  # Pact Broker basic auth password
755
755
  -k, [--broker-token=BROKER_TOKEN]
756
756
  # Pact Broker bearer token
757
- -v, [--verbose], [--no-verbose]
757
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
758
758
  # Verbose output.
759
759
  # Default: false
760
760
  ```
@@ -793,20 +793,20 @@ Options:
793
793
  # Provider label, mutually exclusive with provider name
794
794
  [--description=DESCRIPTION]
795
795
  # Webhook description
796
- [--contract-content-changed], [--no-contract-content-changed]
796
+ [--contract-content-changed], [--no-contract-content-changed], [--skip-contract-content-changed]
797
797
  # Trigger this webhook when the pact content changes
798
- [--contract-published], [--no-contract-published]
798
+ [--contract-published], [--no-contract-published], [--skip-contract-published]
799
799
  # Trigger this webhook when a pact is published
800
- [--provider-verification-published], [--no-provider-verification-published]
800
+ [--provider-verification-published], [--no-provider-verification-published], [--skip-provider-verification-published]
801
801
  # Trigger this webhook when a provider verification result is
802
802
  published
803
- [--provider-verification-failed], [--no-provider-verification-failed]
803
+ [--provider-verification-failed], [--no-provider-verification-failed], [--skip-provider-verification-failed]
804
804
  # Trigger this webhook when a failed provider verification
805
805
  result is published
806
- [--provider-verification-succeeded], [--no-provider-verification-succeeded]
806
+ [--provider-verification-succeeded], [--no-provider-verification-succeeded], [--skip-provider-verification-succeeded]
807
807
  # Trigger this webhook when a successful provider verification
808
808
  result is published
809
- [--contract-requiring-verification-published], [--no-contract-requiring-verification-published]
809
+ [--contract-requiring-verification-published], [--no-contract-requiring-verification-published], [--skip-contract-requiring-verification-published]
810
810
  # Trigger this webhook when a contract is published that
811
811
  requires verification
812
812
  [--team-uuid=UUID]
@@ -820,7 +820,7 @@ Options:
820
820
  # Pact Broker basic auth password
821
821
  -k, [--broker-token=BROKER_TOKEN]
822
822
  # Pact Broker bearer token
823
- -v, [--verbose], [--no-verbose]
823
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
824
824
  # Verbose output.
825
825
  # Default: false
826
826
  --uuid=UUID
@@ -852,7 +852,7 @@ Options:
852
852
  # Pact Broker basic auth password
853
853
  -k, [--broker-token=BROKER_TOKEN]
854
854
  # Pact Broker bearer token
855
- -v, [--verbose], [--no-verbose]
855
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
856
856
  # Verbose output.
857
857
  # Default: false
858
858
  ```
@@ -872,7 +872,7 @@ Options:
872
872
  # The name of the pacticipant that the branch belongs to.
873
873
  --branch=BRANCH
874
874
  # The pacticipant branch name.
875
- [--error-when-not-found], [--no-error-when-not-found]
875
+ [--error-when-not-found], [--no-error-when-not-found], [--skip-error-when-not-found]
876
876
  # Raise an error if the branch that is to be deleted is not
877
877
  found.
878
878
  # Default: true
@@ -884,7 +884,7 @@ Options:
884
884
  # Pact Broker basic auth password
885
885
  -k, [--broker-token=BROKER_TOKEN]
886
886
  # Pact Broker bearer token
887
- -v, [--verbose], [--no-verbose]
887
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
888
888
  # Verbose output.
889
889
  # Default: false
890
890
  ```
@@ -907,11 +907,11 @@ Options:
907
907
  -t, [--tag=TAG]
908
908
  # Tag name for pacticipant version. Can be specified multiple
909
909
  times.
910
- [--auto-create-version], [--no-auto-create-version]
910
+ [--auto-create-version], [--no-auto-create-version], [--skip-auto-create-version]
911
911
  # Automatically create the pacticipant version if it does not
912
912
  exist.
913
913
  # Default: false
914
- -g, [--tag-with-git-branch], [--no-tag-with-git-branch]
914
+ -g, [--tag-with-git-branch], [--no-tag-with-git-branch], [--skip-tag-with-git-branch]
915
915
  # Tag pacticipant version with the name of the current git
916
916
  branch.
917
917
  # Default: false
@@ -923,7 +923,7 @@ Options:
923
923
  # Pact Broker basic auth password
924
924
  -k, [--broker-token=BROKER_TOKEN]
925
925
  # Pact Broker bearer token
926
- -v, [--verbose], [--no-verbose]
926
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
927
927
  # Verbose output.
928
928
  # Default: false
929
929
  ```
@@ -957,7 +957,7 @@ Options:
957
957
  # Pact Broker basic auth password
958
958
  -k, [--broker-token=BROKER_TOKEN]
959
959
  # Pact Broker bearer token
960
- -v, [--verbose], [--no-verbose]
960
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
961
961
  # Verbose output.
962
962
  # Default: false
963
963
  ```
@@ -988,7 +988,7 @@ Options:
988
988
  # Pact Broker basic auth password
989
989
  -k, [--broker-token=BROKER_TOKEN]
990
990
  # Pact Broker bearer token
991
- -v, [--verbose], [--no-verbose]
991
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
992
992
  # Verbose output.
993
993
  # Default: false
994
994
  -o, [--output=OUTPUT]
@@ -1034,7 +1034,7 @@ Options:
1034
1034
  # Default: oas
1035
1035
  [--content-type=CONTENT_TYPE]
1036
1036
  # The content type. eg. application/yml
1037
- [--verification-success], [--no-verification-success]
1037
+ [--verification-success], [--no-verification-success], [--skip-verification-success]
1038
1038
  # Whether or not the self verification passed successfully.
1039
1039
  [--verification-exit-code=N]
1040
1040
  # The exit code of the verification process. Can be used instead
@@ -1065,7 +1065,7 @@ Options:
1065
1065
  # Pact Broker basic auth password
1066
1066
  -k, [--broker-token=BROKER_TOKEN]
1067
1067
  # Pact Broker bearer token
1068
- -v, [--verbose], [--no-verbose]
1068
+ -v, [--verbose], [--no-verbose], [--skip-verbose]
1069
1069
  # Verbose output.
1070
1070
  # Default: false
1071
1071
  ```
@@ -0,0 +1,66 @@
1
+ require 'pact_broker/client/hal'
2
+ require 'pact_broker/client/command_result'
3
+ require 'pact_broker/client/hal_client_methods'
4
+ require 'ostruct'
5
+
6
+ module PactBroker
7
+ module Client
8
+ module Pacts
9
+ class ListLatestVersions
10
+
11
+ include HalClientMethods
12
+
13
+ def self.call(pact_broker_base_url, output, pact_broker_client_options)
14
+ new(pact_broker_base_url, output, pact_broker_client_options).call
15
+ end
16
+
17
+ def initialize(pact_broker_base_url, output, pact_broker_client_options)
18
+ @index_entry_point = create_index_entry_point(pact_broker_base_url, pact_broker_client_options)
19
+ @output = output
20
+ end
21
+
22
+ def call
23
+ message = if output == 'json'
24
+ versions_resource.response.raw_body
25
+ else
26
+ to_text(versions)
27
+ end
28
+ PactBroker::Client::CommandResult.new(true, message)
29
+
30
+ rescue StandardError => e
31
+ PactBroker::Client::CommandResult.new(false, e.message)
32
+ end
33
+
34
+ private
35
+
36
+ attr_reader :index_entry_point, :output
37
+
38
+ def versions
39
+ versions_resource.pacts.collect do | pact |
40
+ OpenStruct.new(
41
+ consumer_name: pact['_embedded']['consumer']['name'],
42
+ provider_name: pact['_embedded']['provider']['name'],
43
+ consumer_version_number: pact['_embedded']['consumer']['_embedded']['version']['number'],
44
+ created_at: pact['createdAt']
45
+ )
46
+ end
47
+ end
48
+
49
+ def versions_resource
50
+ index_entry_point.get!._link('pb:latest-pact-versions').get!
51
+ end
52
+
53
+ def to_text(pacts)
54
+ require 'table_print'
55
+ options = [
56
+ { consumer_name: {display_name: 'consumer'} },
57
+ { consumer_version_number: {display_name: 'consumer_version'} },
58
+ { provider_name: {display_name: 'provider'} },
59
+ { created_at: {} }
60
+ ]
61
+ TablePrint::Printer.new(pacts, options).table_print
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -1,5 +1,5 @@
1
1
  module PactBroker
2
2
  module Client
3
- VERSION = '1.76.0'
3
+ VERSION = '1.76.2'
4
4
  end
5
5
  end
@@ -0,0 +1,16 @@
1
+ require 'pact_broker/client/hal'
2
+ require 'pact_broker/client/command_result'
3
+
4
+ module PactBroker
5
+ module Client
6
+ module Webhooks
7
+ class Test
8
+ def self.call(options, pact_broker_client_options)
9
+ http_client = PactBroker::Client::Hal::HttpClient.new(pact_broker_client_options.merge(pact_broker_client_options[:basic_auth] || {}))
10
+ execution_result = PactBroker::Client::Hal::EntryPoint.new(options.broker_base_url, http_client).get!._link!('pb:webhook').expand('uuid' => options.uuid).get!.post('pb:execute')
11
+ PactBroker::Client::CommandResult.new(true, execution_result.response.body['logs'])
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,29 @@
1
+
2
+ # -*- encoding: utf-8 -*-
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'pact_broker/client/version'
6
+
7
+ Gem::Specification.new do |gem|
8
+ gem.name = "pact_broker-client"
9
+ gem.version = PactBroker::Client::VERSION
10
+ gem.authors = ["Beth Skurrie"]
11
+ gem.email = ["beth@bethesque.com"]
12
+ gem.description = %q{Client for the Pact Broker. Publish, retrieve and query pacts and verification results. Manage webhooks and environments.}
13
+ gem.summary = %q{See description}
14
+ gem.homepage = "https://github.com/pact-foundation/pact_broker-client.git"
15
+ gem.files = `git ls-files`.split($/).reject { |file| file.match(/(test\/|spec\/|.github\/)/) }
16
+
17
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
+ gem.require_paths = ["lib"]
19
+ gem.license = 'MIT'
20
+
21
+ gem.add_runtime_dependency 'httparty', ">= 0.21.0", "< 1.0.0"
22
+ gem.add_runtime_dependency 'term-ansicolor', '~> 1.7'
23
+ gem.add_runtime_dependency 'table_print', '~> 1.5'
24
+ gem.add_runtime_dependency 'thor', '>= 0.20', '< 2.0'
25
+ gem.add_runtime_dependency 'rake', '~> 13.0' #For FileList
26
+ gem.add_runtime_dependency 'dig_rb', '~> 1.0'
27
+ gem.add_runtime_dependency 'base64', '~> 0.2'
28
+ gem.add_runtime_dependency 'ostruct'
29
+ 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.76.0
4
+ version: 1.76.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Beth Skurrie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-12 00:00:00.000000000 Z
11
+ date: 2024-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -120,6 +120,20 @@ dependencies:
120
120
  - - "~>"
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0.2'
123
+ - !ruby/object:Gem::Dependency
124
+ name: ostruct
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ type: :runtime
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
123
137
  description: Client for the Pact Broker. Publish, retrieve and query pacts and verification
124
138
  results. Manage webhooks and environments.
125
139
  email:
@@ -130,13 +144,8 @@ executables:
130
144
  extensions: []
131
145
  extra_rdoc_files: []
132
146
  files:
133
- - ".github/dependabot.yml"
134
- - ".github/workflows/delete_branch_in_pactflow.yml"
135
- - ".github/workflows/release_gem.yml"
136
- - ".github/workflows/smartbear-issue-label-added.yml"
137
- - ".github/workflows/triage.yml"
138
- - ".github/workflows/trigger_pact_docs_update.yml"
139
147
  - ".gitignore"
148
+ - ".rspec"
140
149
  - ".ruby-version"
141
150
  - CHANGELOG.md
142
151
  - DEVELOPING.md
@@ -232,6 +241,7 @@ files:
232
241
  - lib/pact_broker/client/pacticipants/list.rb
233
242
  - lib/pact_broker/client/pacticipants/text_formatter.rb
234
243
  - lib/pact_broker/client/pacts.rb
244
+ - lib/pact_broker/client/pacts/list_latest_versions.rb
235
245
  - lib/pact_broker/client/publish_pacts.rb
236
246
  - lib/pact_broker/client/publish_pacts_the_old_way.rb
237
247
  - lib/pact_broker/client/retry.rb
@@ -247,11 +257,13 @@ files:
247
257
  - lib/pact_broker/client/versions/json_formatter.rb
248
258
  - lib/pact_broker/client/versions/text_formatter.rb
249
259
  - lib/pact_broker/client/webhooks/create.rb
260
+ - lib/pact_broker/client/webhooks/test.rb
250
261
  - lib/pact_broker_client.rb
251
262
  - lib/pactflow/client/cli/pactflow.rb
252
263
  - lib/pactflow/client/cli/provider_contract_commands.rb
253
264
  - lib/pactflow/client/provider_contracts/publish.rb
254
265
  - lib/pactflow/client/provider_contracts/publish_the_old_way.rb
266
+ - pact-broker-client.gemspec
255
267
  - script/approve-all.sh
256
268
  - script/can-i-deploy.sh
257
269
  - script/ci/delete-branch-in-pactflow.sh
@@ -289,7 +301,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
289
301
  - !ruby/object:Gem::Version
290
302
  version: '0'
291
303
  requirements: []
292
- rubygems_version: 3.5.17
304
+ rubygems_version: 3.5.22
293
305
  signing_key:
294
306
  specification_version: 4
295
307
  summary: See description
@@ -1,6 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: "github-actions"
4
- directory: "/"
5
- schedule:
6
- interval: "monthly"
@@ -1,24 +0,0 @@
1
- name: Delete application branch in Pactflow
2
-
3
- on:
4
- delete:
5
- branches:
6
- - "*"
7
-
8
- jobs:
9
- delete-branch-in-pactflow:
10
- name: delete
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - uses: actions/checkout@v4
15
- # Requires Ruby to encode the URL path correctly - could use any other scripting language here
16
- - uses: ruby/setup-ruby@v1
17
-
18
- - name: Delete branch in Pactflow
19
- run: script/ci/delete-branch-in-pactflow.sh
20
- env:
21
- GIT_BRANCH: ${{ github.event.ref }}
22
- PACTICIPANT: "Pact Broker Client"
23
- PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN_PACT_FOUNDATION }}
24
- PACT_BROKER_BASE_URL: "https://pact-foundation.pactflow.io"
@@ -1,74 +0,0 @@
1
- name: Release gem
2
-
3
- on:
4
- repository_dispatch:
5
- types:
6
- - release-triggered
7
- workflow_dispatch:
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v4
14
- - uses: ruby/setup-ruby@v1
15
- - run: |
16
- gem install bundler -v 2.4
17
- bundle install
18
- - name: Test
19
- run: bundle exec rake
20
-
21
- release:
22
- needs: test
23
- runs-on: ubuntu-latest
24
- outputs:
25
- gem_name: ${{ steps.release.outputs.gem_name }}
26
- version: ${{ steps.release.outputs.version }}
27
- increment: ${{ steps.release.outputs.increment }}
28
- steps:
29
- - uses: actions/checkout@v4
30
- with:
31
- fetch-depth: 0
32
- - uses: pact-foundation/release-gem@v1
33
- id: release
34
- env:
35
- GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_API_KEY }}'
36
- GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
37
- INCREMENT: '${{ github.event.client_payload.increment }}'
38
-
39
- record-release:
40
- needs: release
41
- runs-on: ubuntu-latest
42
- steps:
43
- - uses: actions/checkout@v4
44
- - uses: ruby/setup-ruby@v1
45
- - name: Bundle install
46
- run: |
47
- gem install bundler -v 2.4
48
- bundle config set --local without development test
49
- bundle install
50
- - name: Record release
51
- run: script/ci/record-release.sh
52
- env:
53
- PACT_BROKER_BASE_URL: https://pact-foundation.pactflow.io
54
- PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN_PACT_FOUNDATION }}
55
-
56
- notify-gem-released:
57
- needs: release
58
- strategy:
59
- matrix:
60
- repository: [pact-foundation/pact-ruby-cli, pact-foundation/pact-ruby-standalone, pact-foundation/pact_broker-client]
61
- runs-on: ubuntu-latest
62
- steps:
63
- - name: Notify ${{ matrix.repository }} of gem release
64
- uses: peter-evans/repository-dispatch@v3
65
- with:
66
- token: ${{ secrets.GHTOKENFORPACTCLIRELEASE }}
67
- repository: ${{ matrix.repository }}
68
- event-type: gem-released
69
- client-payload: |
70
- {
71
- "name": "${{ needs.release.outputs.gem_name }}",
72
- "version": "${{ needs.release.outputs.version }}",
73
- "increment": "${{ needs.release.outputs.increment }}"
74
- }
@@ -1,11 +0,0 @@
1
- name: SmartBear Supported Issue Label Added
2
-
3
- on:
4
- issues:
5
- types:
6
- - labeled
7
-
8
- jobs:
9
- call-workflow:
10
- uses: pact-foundation/.github/.github/workflows/smartbear-issue-label-added.yml@master
11
- secrets: inherit
@@ -1,15 +0,0 @@
1
- name: Triage Issue
2
-
3
- on:
4
- issues:
5
- types:
6
- - opened
7
- - labeled
8
- pull_request:
9
- types:
10
- - labeled
11
-
12
- jobs:
13
- call-workflow:
14
- uses: pact-foundation/.github/.github/workflows/triage.yml@master
15
- secrets: inherit
@@ -1,23 +0,0 @@
1
- name: Trigger update to docs.pact.io
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- paths:
8
- - '**.md'
9
- repository_dispatch:
10
- types:
11
- - gem-released
12
- workflow_dispatch:
13
-
14
- jobs:
15
- build:
16
- runs-on: ubuntu-latest
17
- steps:
18
- - name: Trigger docs.pact.io update workflow
19
- uses: peter-evans/repository-dispatch@v3
20
- with:
21
- token: ${{ secrets.GHTOKENFORTRIGGERINGPACTDOCSUPDATE }}
22
- repository: pact-foundation/docs.pact.io
23
- event-type: pact-broker-client-docs-updated