pact_broker-client 1.67.0 → 1.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 34449d696b8c2dd03158cb963bb29d5a98df30563b1dfc34172a2e0005421824
         | 
| 4 | 
            +
              data.tar.gz: 77f60ba7270a1b1fb8f59a41fd97e047d28536d6857d88109a52efedb6b018ff
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 62f45e1885ff173605607913f796f87c1dae40b2618c92b240ffca95fd9e2be4cbae2c50d89676ac82fb26b6e0deb610bec00b2f81a23314b4d9a2927f7c9a9b
         | 
| 7 | 
            +
              data.tar.gz: 4bac04b4928c5f1846a963f7b8fb27a860332090ae7c69edce1de6537f63974e5a959ed62333a5fa17feda196525503d6dda3c470794303ddb9d03aff9723063
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,3 +1,14 @@ | |
| 1 | 
            +
            <a name="v1.68.0"></a>
         | 
| 2 | 
            +
            ### v1.68.0 (2023-07-08)
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            #### Features
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            * support Cirrus CI environment	 ([7610f28](/../../commit/7610f28))
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            #### Bug Fixes
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            * pact-broker --help command failed with Could not find command "__broker_base_url" (#135)	 ([7edfd58](/../../commit/7edfd58))
         | 
| 11 | 
            +
             | 
| 1 12 | 
             
            <a name="v1.67.0"></a>
         | 
| 2 13 | 
             
            ### v1.67.0 (2023-05-04)
         | 
| 3 14 |  | 
| @@ -15,19 +15,6 @@ module PactBroker | |
| 15 15 | 
             
                    using PactBroker::Client::HashRefinements
         | 
| 16 16 |  | 
| 17 17 | 
             
                    no_commands do
         | 
| 18 | 
            -
                      def initialize(args = [], options = {}, config = {})
         | 
| 19 | 
            -
                        super
         | 
| 20 | 
            -
                        postprocess_options
         | 
| 21 | 
            -
                      end
         | 
| 22 | 
            -
             | 
| 23 | 
            -
                      def postprocess_options
         | 
| 24 | 
            -
                        new_options = {}
         | 
| 25 | 
            -
                        if options.include?("broker_base_url")
         | 
| 26 | 
            -
                          new_options["broker_base_url"] = options["broker_base_url"].chomp('/')
         | 
| 27 | 
            -
                        end
         | 
| 28 | 
            -
                        self.options = options.merge(new_options)
         | 
| 29 | 
            -
                      end
         | 
| 30 | 
            -
             | 
| 31 18 | 
             
                      def self.exit_on_failure?
         | 
| 32 19 | 
             
                        true
         | 
| 33 20 | 
             
                      end
         | 
| @@ -41,7 +28,7 @@ module PactBroker | |
| 41 28 | 
             
                      end
         | 
| 42 29 |  | 
| 43 30 | 
             
                      def self.add_broker_config_from_environment_variables argv
         | 
| 44 | 
            -
                        return argv if argv[0] == 'help' || argv.empty?
         | 
| 31 | 
            +
                        return argv if argv[0] == '--help' || argv[0] == 'help' || argv.empty?
         | 
| 45 32 |  | 
| 46 33 | 
             
                        add_option_from_environment_variable(argv, 'broker-base-url', 'b', 'PACT_BROKER_BASE_URL')
         | 
| 47 34 | 
             
                      end
         | 
| @@ -129,7 +116,7 @@ module PactBroker | |
| 129 116 | 
             
                      end
         | 
| 130 117 |  | 
| 131 118 | 
             
                      def pact_broker_client_options
         | 
| 132 | 
            -
                        client_options = { verbose: options.verbose, pact_broker_base_url: options.broker_base_url }
         | 
| 119 | 
            +
                        client_options = { verbose: options.verbose, pact_broker_base_url: options.broker_base_url&.chomp('/') }
         | 
| 133 120 | 
             
                        client_options[:token] = options.broker_token || ENV['PACT_BROKER_TOKEN']
         | 
| 134 121 | 
             
                        if options.broker_username || ENV['PACT_BROKER_USERNAME']
         | 
| 135 122 | 
             
                          client_options[:basic_auth] = {
         | 
| @@ -14,6 +14,7 @@ CI_BRANCH CI_COMMIT_ID https://documentation.codeship.com/pro/builds-and-configu | |
| 14 14 | 
             
            bamboo.repository.git.branch https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html
         | 
| 15 15 | 
             
            BITBUCKET_BRANCH BITBUCKET_COMMIT https://confluence.atlassian.com/bitbucket/variables-in-pipelines-794502608.html
         | 
| 16 16 | 
             
            BUILD_SOURCEBRANCHNAME BUILD_SOURCEVERSION Azure
         | 
| 17 | 
            +
            CIRRUS_BRANCH CIRRUS_CHANGE_IN_REPO https://cirrus-ci.org/guide/writing-tasks/#environment-variables
         | 
| 17 18 | 
             
            =end
         | 
| 18 19 |  | 
| 19 20 | 
             
            # Keep in sync with pact-provider-verifier/lib/pact/provider_verifier/git.rb
         | 
| @@ -25,8 +26,8 @@ module PactBroker | |
| 25 26 | 
             
                  using PactBroker::Client::HashRefinements
         | 
| 26 27 |  | 
| 27 28 | 
             
                  COMMAND = 'git rev-parse --abbrev-ref HEAD'.freeze
         | 
| 28 | 
            -
                  BRANCH_ENV_VAR_NAMES = %w{GITHUB_HEAD_REF GITHUB_REF BUILDKITE_BRANCH CIRCLE_BRANCH TRAVIS_BRANCH GIT_BRANCH GIT_LOCAL_BRANCH APPVEYOR_REPO_BRANCH CI_COMMIT_REF_NAME BITBUCKET_BRANCH BUILD_SOURCEBRANCHNAME}.freeze
         | 
| 29 | 
            -
                  COMMIT_ENV_VAR_NAMES = %w{GITHUB_SHA BUILDKITE_COMMIT CIRCLE_SHA1 TRAVIS_COMMIT GIT_COMMIT APPVEYOR_REPO_COMMIT CI_COMMIT_ID BITBUCKET_COMMIT BUILD_SOURCEVERSION}
         | 
| 29 | 
            +
                  BRANCH_ENV_VAR_NAMES = %w{GITHUB_HEAD_REF GITHUB_REF BUILDKITE_BRANCH CIRCLE_BRANCH TRAVIS_BRANCH GIT_BRANCH GIT_LOCAL_BRANCH APPVEYOR_REPO_BRANCH CI_COMMIT_REF_NAME BITBUCKET_BRANCH BUILD_SOURCEBRANCHNAME CIRRUS_BRANCH}.freeze
         | 
| 30 | 
            +
                  COMMIT_ENV_VAR_NAMES = %w{GITHUB_SHA BUILDKITE_COMMIT CIRCLE_SHA1 TRAVIS_COMMIT GIT_COMMIT APPVEYOR_REPO_COMMIT CI_COMMIT_ID BITBUCKET_COMMIT BUILD_SOURCEVERSION CIRRUS_CHANGE_IN_REPO}
         | 
| 30 31 | 
             
                  BUILD_URL_ENV_VAR_NAMES = %w{BUILDKITE_BUILD_URL CIRCLE_BUILD_URL TRAVIS_BUILD_WEB_URL BUILD_URL }
         | 
| 31 32 |  | 
| 32 33 | 
             
                  def self.commit
         | 
| @@ -27,6 +27,15 @@ module PactBroker::Client::CLI | |
| 27 27 | 
             
                  Delegate.call(options)
         | 
| 28 28 | 
             
                end
         | 
| 29 29 |  | 
| 30 | 
            +
                desc '', ''
         | 
| 31 | 
            +
                method_option :broker_base_url, required: true, aliases: "-b"
         | 
| 32 | 
            +
                method_option :broker_username, aliases: "-u"
         | 
| 33 | 
            +
                method_option :broker_password, aliases: "-p"
         | 
| 34 | 
            +
                method_option :broker_token, aliases: "-k"
         | 
| 35 | 
            +
                def test_pact_broker_client_options
         | 
| 36 | 
            +
                  Delegate.call(pact_broker_client_options)
         | 
| 37 | 
            +
                end
         | 
| 38 | 
            +
             | 
| 30 39 | 
             
                desc '', ''
         | 
| 31 40 | 
             
                ignored_and_hidden_potential_options_from_environment_variables
         | 
| 32 41 | 
             
                def test_without_parameters
         | 
| @@ -74,17 +83,17 @@ module PactBroker::Client::CLI | |
| 74 83 |  | 
| 75 84 | 
             
                it "removes trailing slashes from the broker base url when passed as an arg" do
         | 
| 76 85 | 
             
                  expect(Delegate).to receive(:call) do | options |
         | 
| 77 | 
            -
                    expect(options | 
| 86 | 
            +
                    expect(options[:pact_broker_base_url]).to eq 'http://bar'
         | 
| 78 87 | 
             
                  end
         | 
| 79 | 
            -
                  TestThor.start(%w{ | 
| 88 | 
            +
                  TestThor.start(%w{test_pact_broker_client_options --broker-base-url http://bar/})
         | 
| 80 89 | 
             
                end
         | 
| 81 90 |  | 
| 82 91 | 
             
                it "removes trailing slashes from the broker base url when passed as an env var" do
         | 
| 83 92 | 
             
                  ENV['PACT_BROKER_BASE_URL'] = 'http://bar/'
         | 
| 84 93 | 
             
                  expect(Delegate).to receive(:call) do | options |
         | 
| 85 | 
            -
                    expect(options | 
| 94 | 
            +
                    expect(options[:pact_broker_base_url]).to eq 'http://bar'
         | 
| 86 95 | 
             
                  end
         | 
| 87 | 
            -
                  TestThor.start(%w{ | 
| 96 | 
            +
                  TestThor.start(%w{test_pact_broker_client_options})
         | 
| 88 97 | 
             
                end
         | 
| 89 98 |  | 
| 90 99 | 
             
                describe ".turn_muliple_tag_options_into_array" 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. | 
| 4 | 
            +
              version: 1.68.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: 2023- | 
| 11 | 
            +
            date: 2023-07-10 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: httparty
         | 
| @@ -449,7 +449,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 449 449 | 
             
                - !ruby/object:Gem::Version
         | 
| 450 450 | 
             
                  version: '0'
         | 
| 451 451 | 
             
            requirements: []
         | 
| 452 | 
            -
            rubygems_version: 3.4. | 
| 452 | 
            +
            rubygems_version: 3.4.15
         | 
| 453 453 | 
             
            signing_key:
         | 
| 454 454 | 
             
            specification_version: 4
         | 
| 455 455 | 
             
            summary: See description
         |