pact_broker-client 1.63.0 → 1.64.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: 1c364b3a4f6acc4007f18baf2812262423988555e78e03617641e557ebbb3402
4
- data.tar.gz: f741a0a0ad6ad08e4b0ef9f80cc02b07f409b6eaf84fcf609419644d7f9c6255
3
+ metadata.gz: '097964adbb5c79d708b5a0a8b74ddef396ad05b5909583dbf07b1857abcca5f1'
4
+ data.tar.gz: 2f60b1fb9258157889dd6217db2e17ea338903469daec14eb5e3760d90b11cc1
5
5
  SHA512:
6
- metadata.gz: 14252b9713e0f0ab18a5f4418f697757acdd8cccb572658b5655a073105abd00996ba37d2b7c467135a906df1f9c10b8ebb25a2ecdafde2901e219bc521e5b16
7
- data.tar.gz: fc6eb7836d4ba0f1016538fa03134e44b00679458f8d5a17a091779de8698e04de64497468ea335ca0fc5e74ed3080baf06ae766a8080381eaf492b01de0a78a
6
+ metadata.gz: 67d01a72a39969f0b9a5aba16119a033cf3961a41f4cdaa1f49a286ac5c3376a3d7b77c74da90159e87e29827c4fcfdab4328949a9c24c51ed8e51301417ca19
7
+ data.tar.gz: 61e4a0ac04368ebdc4d5aea5f1bfeac3d39440cecdcab4df690f6ea3b86ae2fd277e49191d58189e97c6b1c0918d8336471402c63afc2d62778dfd455cc44efa
@@ -9,19 +9,14 @@ jobs:
9
9
  strategy:
10
10
  fail-fast: false
11
11
  matrix:
12
- ruby_version: ["2.2", "2.7"]
12
+ ruby_version: ["2.7", "3.0", "3.1"]
13
13
  experimental: [false]
14
- include:
15
- - ruby_version: "3.0"
16
- experimental: true
17
14
  steps:
18
15
  - uses: actions/checkout@v2
19
16
  - uses: ruby/setup-ruby@v1
20
17
  with:
21
18
  ruby-version: ${{ matrix.ruby_version }}
22
19
  - run: "bundle install"
23
- - if: failure()
24
- run: cat /opt/hostedtoolcache/Ruby/2.2.10/x64/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0/approvals-0.0.25/gem_make.out && exit 1
25
20
  - run: "bundle exec rake"
26
21
  pact:
27
22
  runs-on: "ubuntu-latest"
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ <a name="v1.64.0"></a>
2
+ ### v1.64.0 (2022-05-27)
3
+
4
+ #### Features
5
+
6
+ * remove feature flag for publish-provider-contract ([146a2d8](/../../commit/146a2d8))
7
+ * add pactflow specific message for environment not found when recording a release/deployment ([6667cbb](/../../commit/6667cbb))
8
+
1
9
  <a name="v1.63.0"></a>
2
10
  ### v1.63.0 (2022-05-10)
3
11
 
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM ruby:2.6-alpine3.12
1
+ FROM ruby:3.1-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
@@ -1,6 +1,6 @@
1
1
  # Pact Broker Client
2
2
 
3
- A client for the [Pact Broker](https://docs.pact.io/pact_broker/). Publishes and retrieves pacts, verification results, pacticipants, pacticipant versions and tags. 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).
3
+ A client for the [Pact Broker](https://docs.pact.io/pact_broker/) and [Pactflow](https://pactflow.io/?utm_source=ossdocs&utm_campaign=pact_broker_client_readme). Publishes and retrieves pacts, pacticipants, pacticipant versions, environments, deployments and releases. Supports publishing provider contracts for Pactflow. 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://github.com/pact-foundation/pact_broker-client/workflows/Test/badge.svg)
6
6
 
@@ -32,6 +32,8 @@ To connect to a Pact Broker that uses custom SSL cerificates, set the environmen
32
32
 
33
33
  ## Usage - CLI
34
34
 
35
+ All commands prefixed with `pact-broker` can be used with the OSS Pact Broker and Pactflow. Commands prefixed with `pactflow` can only be used with Pactflow.
36
+
35
37
  The Pact Broker base URL can be specified either using the environment variable `$PACT_BROKER_BASE_URL` or the `-b` or `--broker-base-url` parameters.
36
38
 
37
39
  Pact Broker authentication can be performed either using basic auth or a bearer token.
@@ -460,7 +462,13 @@ Options:
460
462
  [--dry-run], [--no-dry-run]
461
463
  # When dry-run is enabled, always exit process with a success
462
464
  code. Can also be enabled by setting the environment variable
463
- PACT_BROKER_CAN_I_DEPLOY_DRY_RUN=true.
465
+ PACT_BROKER_CAN_I_DEPLOY_DRY_RUN=true. This mode is useful when
466
+ setting up your CI/CD pipeline for the first time, or in a
467
+ 'break glass' situation where you need to knowingly deploy what
468
+ Pact considers a breaking change. For the second scenario, it
469
+ is recommended to use the environment variable and just set it
470
+ for the build required to deploy that particular version, so
471
+ you don't accidentally leave the dry run mode enabled.
464
472
  -b, --broker-base-url=BROKER_BASE_URL
465
473
  # The base URL of the Pact Broker
466
474
  -u, [--broker-username=BROKER_USERNAME]
@@ -860,6 +868,64 @@ Options:
860
868
 
861
869
  Generate a UUID for use when calling create-or-update-webhook
862
870
 
871
+ ### Provider contracts
872
+
873
+ #### publish-provider-contract
874
+
875
+ ```
876
+ Usage:
877
+ pactflow publish-provider-contract CONTRACT_FILE ... --provider=PROVIDER -a, --provider-app-version=PROVIDER_APP_VERSION -b, --broker-base-url=BROKER_BASE_URL
878
+
879
+ Options:
880
+ --provider=PROVIDER
881
+ # The provider name
882
+ -a, --provider-app-version=PROVIDER_APP_VERSION
883
+ # The provider application version
884
+ -h, [--branch=BRANCH]
885
+ # Repository branch of the provider version
886
+ -t, [--tag=TAG]
887
+ # Tag name for provider version. Can be specified multiple
888
+ times.
889
+ [--specification=SPECIFICATION]
890
+ # The contract specification
891
+ # Default: oas
892
+ [--content-type=CONTENT_TYPE]
893
+ # The content type. eg. application/yml
894
+ [--verification-success], [--no-verification-success]
895
+ # Whether or not the self verification passed successfully.
896
+ [--verification-exit-code=N]
897
+ # The exit code of the verification process. Can be used instead
898
+ of --verificaiton-success|--no-verification-success for a
899
+ simpler build script.
900
+ [--verification-results=VERIFICATION_RESULTS]
901
+ # The path to the file containing the output from the
902
+ verification process
903
+ [--verification-results-content-type=VERIFICATION_RESULTS_CONTENT_TYPE]
904
+ # The content type of the verification output eg. text/plain,
905
+ application/yaml
906
+ [--verification-results-format=VERIFICATION_RESULTS_FORMAT]
907
+ # The format of the verification output eg. junit, text
908
+ [--verifier=VERIFIER]
909
+ # The tool used to verify the provider contract
910
+ [--verifier-version=VERIFIER_VERSION]
911
+ # The version of the tool used to verify the provider contract
912
+ -o, [--output=OUTPUT]
913
+ # json or text
914
+ # Default: text
915
+ -b, --broker-base-url=BROKER_BASE_URL
916
+ # The base URL of the Pact Broker
917
+ -u, [--broker-username=BROKER_USERNAME]
918
+ # Pact Broker basic auth username
919
+ -p, [--broker-password=BROKER_PASSWORD]
920
+ # Pact Broker basic auth password
921
+ -k, [--broker-token=BROKER_TOKEN]
922
+ # Pact Broker bearer token
923
+ -v, [--verbose], [--no-verbose]
924
+ # Verbose output. Default: false
925
+ ```
926
+
927
+ Publish provider contract to Pactflow
928
+
863
929
  <!-- end-autogenerated-docs -->
864
930
 
865
931
  ## Usage - Ruby
@@ -20,7 +20,7 @@ module PactBroker
20
20
  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"
21
21
  # Allow limit to be set manually until https://github.com/pact-foundation/pact_broker-client/issues/53 is fixed
22
22
  method_option :limit, hide: true
23
- method_option :dry_run, type: :boolean, default: false, desc: "When dry-run is enabled, always exit process with a success code. Can also be enabled by setting the environment variable PACT_BROKER_CAN_I_DEPLOY_DRY_RUN=true."
23
+ method_option :dry_run, type: :boolean, default: false, desc: "When dry-run is enabled, always exit process with a success code. Can also be enabled by setting the environment variable PACT_BROKER_CAN_I_DEPLOY_DRY_RUN=true. This mode is useful when setting up your CI/CD pipeline for the first time, or in a 'break glass' situation where you need to knowingly deploy what Pact considers a breaking change. For the second scenario, it is recommended to use the environment variable and just set it for the build required to deploy that particular version, so you don't accidentally leave the dry run mode enabled."
24
24
  shared_authentication_options
25
25
 
26
26
  def can_i_deploy(*ignored_but_necessary)
@@ -64,7 +64,11 @@ module PactBroker
64
64
  if environment_exists?
65
65
  "Environment '#{environment_name}' is not an available option for recording a deployment of #{pacticipant_name}."
66
66
  else
67
- "No environment found with name '#{environment_name}'."
67
+ if is_pactflow?
68
+ "Environment '#{environment_name}' is not an available option for recording a deployment of #{pacticipant_name}. The environment may not exist, or you may not have the required permissions or team associations to view it."
69
+ else
70
+ "No environment found with name '#{environment_name}'."
71
+ end
68
72
  end
69
73
  end
70
74
 
@@ -1,5 +1,5 @@
1
1
  module PactBroker
2
2
  module Client
3
- VERSION = '1.63.0'
3
+ VERSION = '1.64.0'
4
4
  end
5
5
  end
@@ -8,77 +8,73 @@ module Pactflow
8
8
 
9
9
  def self.included(thor)
10
10
  thor.class_eval do
11
+ desc 'publish-provider-contract CONTRACT_FILE ...', "Publish provider contract to Pactflow"
12
+ method_option :provider, required: true, desc: "The provider name"
13
+ method_option :provider_app_version, required: true, aliases: "-a", desc: "The provider application version"
14
+ method_option :branch, aliases: "-h", desc: "Repository branch of the provider version"
15
+ #method_option :auto_detect_version_properties, hidden: true, type: :boolean, default: false, desc: "Automatically detect the repository branch from known CI environment variables or git CLI."
16
+ method_option :tag, aliases: "-t", type: :array, banner: "TAG", desc: "Tag name for provider version. Can be specified multiple times."
17
+ #method_option :tag_with_git_branch, aliases: "-g", type: :boolean, default: false, required: false, desc: "Tag consumer version with the name of the current git branch. Default: false"
18
+ method_option :specification, default: "oas", desc: "The contract specification"
19
+ method_option :content_type, desc: "The content type. eg. application/yml"
20
+ method_option :verification_success, type: :boolean, desc: "Whether or not the self verification passed successfully."
21
+ method_option :verification_exit_code, type: :numeric, desc: "The exit code of the verification process. Can be used instead of --verificaiton-success|--no-verification-success for a simpler build script."
22
+ method_option :verification_results, desc: "The path to the file containing the output from the verification process"
23
+ method_option :verification_results_content_type, desc: "The content type of the verification output eg. text/plain, application/yaml"
24
+ method_option :verification_results_format, desc: "The format of the verification output eg. junit, text"
25
+ method_option :verifier, desc: "The tool used to verify the provider contract"
26
+ method_option :verifier_version, desc: "The version of the tool used to verify the provider contract"
27
+ #method_option :build_url, desc: "The build URL that created the pact"
11
28
 
12
- if ENV.fetch("PACTFLOW_FEATURES", "").include?("publish-provider-contract")
29
+ output_option_json_or_text
30
+ shared_authentication_options
13
31
 
14
- desc 'publish-provider-contract CONTRACT_FILE ...', "Publish provider contract to Pactflow"
15
- method_option :provider, required: true, desc: "The provider name"
16
- method_option :provider_app_version, required: true, aliases: "-a", desc: "The provider application version"
17
- method_option :branch, aliases: "-h", desc: "Repository branch of the provider version"
18
- #method_option :auto_detect_version_properties, hidden: true, type: :boolean, default: false, desc: "Automatically detect the repository branch from known CI environment variables or git CLI."
19
- method_option :tag, aliases: "-t", type: :array, banner: "TAG", desc: "Tag name for provider version. Can be specified multiple times."
20
- #method_option :tag_with_git_branch, aliases: "-g", type: :boolean, default: false, required: false, desc: "Tag consumer version with the name of the current git branch. Default: false"
21
- method_option :specification, default: "oas", desc: "The contract specification"
22
- method_option :content_type, desc: "The content type. eg. application/yml"
23
- method_option :verification_success, type: :boolean, desc: "Whether or not the self verification passed successfully."
24
- method_option :verification_exit_code, type: :numeric, desc: "The exit code of the verification process. Can be used instead of --verificaiton-success|--no-verification-success for a simpler build script."
25
- method_option :verification_results, desc: "The path to the file containing the output from the verification process"
26
- method_option :verification_results_content_type, desc: "The content type of the verification output eg. text/plain, application/yaml"
27
- method_option :verification_results_format, desc: "The format of the verification output eg. junit, text"
28
- method_option :verifier, desc: "The tool used to verify the provider contract"
29
- method_option :verifier_version, desc: "The version of the tool used to verify the provider contract"
30
- #method_option :build_url, desc: "The build URL that created the pact"
32
+ def publish_provider_contract(provider_contract_path)
33
+ require "pactflow/client/provider_contracts/publish"
31
34
 
32
- output_option_json_or_text
33
- shared_authentication_options
34
-
35
- def publish_provider_contract(provider_contract_path)
36
- require "pactflow/client/provider_contracts/publish"
35
+ validate_publish_provider_contract_options(provider_contract_path)
36
+ result = ::Pactflow::Client::ProviderContracts::Publish.call(
37
+ publish_provider_contract_command_params(provider_contract_path),
38
+ command_options,
39
+ pact_broker_client_options
40
+ )
41
+ $stdout.puts result.message
42
+ exit(1) unless result.success
43
+ end
37
44
 
38
- validate_publish_provider_contract_options(provider_contract_path)
39
- result = ::Pactflow::Client::ProviderContracts::Publish.call(
40
- publish_provider_contract_command_params(provider_contract_path),
41
- command_options,
42
- pact_broker_client_options
43
- )
44
- $stdout.puts result.message
45
- exit(1) unless result.success
45
+ no_commands do
46
+ def command_options
47
+ { verbose: options.verbose, output: options.output }
46
48
  end
47
49
 
48
- no_commands do
49
- def command_options
50
- { verbose: options.verbose, output: options.output }
51
- end
52
-
53
- def validate_publish_provider_contract_options(provider_contract_path)
54
- if !options.verification_success.nil? && options.verification_exit_code
55
- raise Thor::Error, "Cannot use both --verification-success|--no-verification-success and --verification-exit-code"
56
- end
50
+ def validate_publish_provider_contract_options(provider_contract_path)
51
+ if !options.verification_success.nil? && options.verification_exit_code
52
+ raise Thor::Error, "Cannot use both --verification-success|--no-verification-success and --verification-exit-code"
57
53
  end
54
+ end
58
55
 
59
- def publish_provider_contract_command_params(provider_contract_path)
60
- success = !options.verification_success.nil? ? options.verification_success : ( options.verification_exit_code && options.verification_exit_code == 0 )
56
+ def publish_provider_contract_command_params(provider_contract_path)
57
+ success = !options.verification_success.nil? ? options.verification_success : ( options.verification_exit_code && options.verification_exit_code == 0 )
61
58
 
62
- {
63
- provider_name: options.provider.strip,
64
- provider_version_number: options.provider_app_version.strip,
65
- branch_name: options.branch && options.branch.strip,
66
- tags: (options.tag && options.tag.collect(&:strip)) || [],
67
- contract: {
68
- content: File.read(provider_contract_path),
69
- content_type: options.content_type,
70
- specification: options.specification
71
- },
72
- verification_results: {
73
- success: success,
74
- content: options.verification_results ? File.read(options.verification_results) : nil,
75
- content_type: options.verification_results_content_type,
76
- format: options.verification_results_format,
77
- verifier: options.verifier,
78
- verifier_version: options.verifier_version
79
- }
59
+ {
60
+ provider_name: options.provider.strip,
61
+ provider_version_number: options.provider_app_version.strip,
62
+ branch_name: options.branch && options.branch.strip,
63
+ tags: (options.tag && options.tag.collect(&:strip)) || [],
64
+ contract: {
65
+ content: File.read(provider_contract_path),
66
+ content_type: options.content_type,
67
+ specification: options.specification
68
+ },
69
+ verification_results: {
70
+ success: success,
71
+ content: options.verification_results ? File.read(options.verification_results) : nil,
72
+ content_type: options.verification_results_content_type,
73
+ format: options.verification_results_format,
74
+ verifier: options.verifier,
75
+ verifier_version: options.verifier_version
80
76
  }
81
- end
77
+ }
82
78
  end
83
79
  end
84
80
  end
@@ -23,7 +23,7 @@ module Pactflow
23
23
  def do_call
24
24
  create_branch_version_and_tags
25
25
  create_contract
26
- PactBroker::Client::CommandResult.new(true, green("Successfully published provider contract for #{provider_name} version #{provider_version_number}"))
26
+ PactBroker::Client::CommandResult.new(true, green("Successfully published provider contract for #{provider_name} version #{provider_version_number} to Pactflow"))
27
27
  end
28
28
 
29
29
  def create_branch_version_and_tags
@@ -58,10 +58,10 @@ module Pactflow
58
58
  }.compact
59
59
 
60
60
  body_params = {
61
- content: encode_content(contract[:content]),
62
- contractType: contract[:specification],
63
- contentType: contract[:content_type],
64
- }.compact
61
+ content: encode_content(contract[:content]),
62
+ contractType: contract[:specification],
63
+ contentType: contract[:content_type],
64
+ }.compact
65
65
 
66
66
  if verification_results_params.any?
67
67
  body_params[:verificationResults] = verification_results_params
@@ -1,5 +1,4 @@
1
1
  export PACT_BROKER_BASE_URL=${PACT_BROKER_BASE_URL:-"http://localhost:9292"}
2
- export PACTFLOW_FEATURES=publish-provider-contract
3
2
  bundle exec bin/pactflow publish-provider-contract \
4
3
  script/oas.yml \
5
4
  --provider Foo \
@@ -1,12 +1,30 @@
1
1
  #!/usr/bin/env ruby
2
2
  require "stringio"
3
3
  require "pact_broker/client/cli/broker"
4
+ require "pactflow/client/cli/pactflow"
4
5
 
5
6
  ENV["THOR_COLUMNS"] = "160"
6
7
  START_MARKER = "<!-- start-autogenerated-docs -->"
7
8
  END_MARKER = "<!-- end-autogenerated-docs -->"
8
9
  TERMINAL_WIDTH = 80
9
10
 
11
+ PACT_BROKER_COMMAND_GROUPS = [
12
+ [PactBroker::Client::CLI::Broker, "Pacts", %w[publish list-latest-pact-versions] ],
13
+ [PactBroker::Client::CLI::Broker, "Environments", %w[create-environment update-environment describe-environment delete-environment list-environments]],
14
+ [PactBroker::Client::CLI::Broker, "Deployments", %w[record-deployment record-undeployment]],
15
+ [PactBroker::Client::CLI::Broker, "Releases", %w[record-release record-support-ended]],
16
+ [PactBroker::Client::CLI::Broker, "Matrix", %w[can-i-deploy]],
17
+ [PactBroker::Client::CLI::Broker, "Pacticipants", %w[create-or-update-pacticipant describe-pacticipant list-pacticipants]],
18
+ [PactBroker::Client::CLI::Broker, "Webhooks", %w[create-webhook create-or-update-webhook test-webhook]],
19
+ [PactBroker::Client::CLI::Broker, "Tags", %w[create-version-tag]],
20
+ [PactBroker::Client::CLI::Broker, "Versions", %w[describe-version create-or-update-version]],
21
+ [PactBroker::Client::CLI::Broker, "Miscellaneous", %w[generate-uuid]]
22
+ ]
23
+
24
+ PACTFLOW_COMMAND_GROUPS = [
25
+ [Pactflow::Client::CLI::Pactflow, "Provider contracts (Pactflow only)", %w[publish-provider-contract]]
26
+ ]
27
+
10
28
  def print_wrapped(message, options = {})
11
29
  out = StringIO.new
12
30
  indent = options[:indent] || 0
@@ -44,29 +62,16 @@ def format_banner(banner)
44
62
  banner_lines
45
63
  end
46
64
 
47
- def generate_thor_docs
65
+ def generate_thor_docs(command_groups)
48
66
  begin
49
67
  out = StringIO.new
50
68
  $stdout = out
51
69
 
52
- command_groups = [
53
- ["Pacts", %w[publish list-latest-pact-versions] ],
54
- ["Environments", %w[create-environment update-environment describe-environment delete-environment list-environments]],
55
- ["Deployments", %w[record-deployment record-undeployment]],
56
- ["Releases", %w[record-release record-support-ended]],
57
- ["Matrix", %w[can-i-deploy]],
58
- ["Pacticipants", %w[create-or-update-pacticipant describe-pacticipant list-pacticipants]],
59
- ["Webhooks", %w[create-webhook create-or-update-webhook test-webhook]],
60
- ["Tags", %w[create-version-tag]],
61
- ["Versions", %w[describe-version create-or-update-version]],
62
- ["Miscellaneous", %w[generate-uuid]]
63
- ]
64
-
65
- command_groups.collect do | group, commands |
70
+ command_groups.collect do | cli, group, commands |
66
71
  puts "### #{group}\n\n"
67
72
  commands.each do | command |
68
73
  puts "#### #{command}\n\n"
69
- PactBroker::Client::CLI::Broker.start(["help", command])
74
+ cli.start(["help", command])
70
75
  puts "\n"
71
76
  end
72
77
  end
@@ -110,7 +115,7 @@ end
110
115
  @current_state = :start
111
116
  @old_state = nil
112
117
 
113
- def reformat_docs(generated_thor_docs)
118
+ def reformat_docs(generated_thor_docs, command)
114
119
  generated_thor_docs.split("\n").collect do | line |
115
120
  @old_state = @current_state
116
121
 
@@ -142,7 +147,7 @@ def reformat_docs(generated_thor_docs)
142
147
  .collect { | line | line.gsub(/\s+$/, "") }
143
148
  .join("\n")
144
149
  .gsub("/go/", "/")
145
- .gsub(File.basename(__FILE__), "pact-broker")
150
+ .gsub(File.basename(__FILE__), command)
146
151
  end
147
152
 
148
153
  def update_readme(usage_docs)
@@ -153,4 +158,7 @@ def update_readme(usage_docs)
153
158
  File.open("README.md", "w") { |file| file << new_readme_text }
154
159
  end
155
160
 
156
- update_readme(reformat_docs(generate_thor_docs))
161
+ pact_broker_docs = reformat_docs(generate_thor_docs(PACT_BROKER_COMMAND_GROUPS), "pact-broker")
162
+ pactflow_docs = reformat_docs(generate_thor_docs(PACTFLOW_COMMAND_GROUPS), "pactflow")
163
+
164
+ update_readme(pact_broker_docs + "\n\n" + pactflow_docs)
@@ -164,6 +164,15 @@ module PactBroker
164
164
  expect(subject.success).to be false
165
165
  expect(subject.message).to include "No environment found with name 'test'. Available options: prod"
166
166
  end
167
+
168
+ context "when the server is Pactflow" do
169
+ let(:index_headers) { { "Content-Type" => "application/hal+json", "X-Pactflow-Sha" => "123" } }
170
+
171
+ it "returns a customised message" do
172
+ expect(subject.message).to include "Environment 'test' is not an available option for recording a deployment of Foo"
173
+ expect(subject.message).to include "permissions"
174
+ end
175
+ end
167
176
  end
168
177
 
169
178
  context "when the environment does exist" do
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.63.0
4
+ version: 1.64.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: 2022-05-10 00:00:00.000000000 Z
11
+ date: 2022-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -438,7 +438,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
438
438
  - !ruby/object:Gem::Version
439
439
  version: '0'
440
440
  requirements: []
441
- rubygems_version: 3.3.13
441
+ rubygems_version: 3.3.14
442
442
  signing_key:
443
443
  specification_version: 4
444
444
  summary: See description