pact 1.56.0 → 1.57.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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/pact/cli.rb +1 -0
- data/lib/pact/cli/run_pact_verification.rb +1 -0
- data/lib/pact/provider/pact_spec_runner.rb +1 -0
- data/lib/pact/provider/rspec.rb +1 -1
- data/lib/pact/provider/rspec/pact_broker_formatter.rb +1 -1
- data/lib/pact/provider/verification_results/publish.rb +4 -4
- data/lib/pact/provider/verification_results/publish_all.rb +6 -5
- data/lib/pact/provider/world.rb +1 -1
- data/lib/pact/version.rb +1 -1
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 2f5bff8179ed3588a9363fd864b36527a51672bc2f0812778e188f60571975c1
         | 
| 4 | 
            +
              data.tar.gz: 8bec6ad8f69b8a60836256c261f32c288624ae1a876e452acedfc62daeffebc8
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a0638972bc29d64815a6d29fbd46a88092eb0d748e21f0da41cde9e485c63fa1158cbf03d9b4d638d273b1caff78470d07d40377be176804fab62e96aecce043
         | 
| 7 | 
            +
              data.tar.gz: 9161da6d7c9490db14c7472ca54e0c8a0d7a8fdad65f033694a31db8d80097f3a343098fc41f4c12fb59f12a3ae5a36f2b5503ade581eeb1f9c0f8fb66e74920
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/lib/pact/cli.rb
    CHANGED
    
    | @@ -16,6 +16,7 @@ module Pact | |
| 16 16 | 
             
                method_option :pact_broker_password, aliases: "-w", desc: "Pact broker password"
         | 
| 17 17 | 
             
                method_option :pact_broker_token, aliases: "-k", desc: "Pact broker token"
         | 
| 18 18 | 
             
                method_option :backtrace, aliases: "-b", desc: "Show full backtrace", :default => false, :type => :boolean
         | 
| 19 | 
            +
                method_option :verbose, aliases: "-v", desc: "Show verbose HTTP logging", :default => false, :type => :boolean
         | 
| 19 20 | 
             
                method_option :interactions_replay_order, aliases: "-o",
         | 
| 20 21 | 
             
                              desc: "Interactions replay order: randomised or recorded (default)",
         | 
| 21 22 | 
             
                              default: Pact.configuration.interactions_replay_order
         | 
    
        data/lib/pact/provider/rspec.rb
    CHANGED
    
    
| @@ -25,7 +25,7 @@ module Pact | |
| 25 25 | 
             
                    end
         | 
| 26 26 |  | 
| 27 27 | 
             
                    def close(_notification)
         | 
| 28 | 
            -
                      Pact::Provider::VerificationResults::PublishAll.call(Pact.provider_world.pact_sources, output_hash)
         | 
| 28 | 
            +
                      Pact::Provider::VerificationResults::PublishAll.call(Pact.provider_world.pact_sources, output_hash, { verbose: Pact.provider_world.verbose })
         | 
| 29 29 | 
             
                    end
         | 
| 30 30 |  | 
| 31 31 | 
             
                  private
         | 
| @@ -17,15 +17,15 @@ module Pact | |
| 17 17 | 
             
                    PROVIDER_RELATION = 'pb:provider'.freeze
         | 
| 18 18 | 
             
                    VERSION_TAG_RELATION = 'pb:version-tag'.freeze
         | 
| 19 19 |  | 
| 20 | 
            -
                    def self.call pact_source, verification_result
         | 
| 21 | 
            -
                      new(pact_source, verification_result).call
         | 
| 20 | 
            +
                    def self.call pact_source, verification_result, options = {}
         | 
| 21 | 
            +
                      new(pact_source, verification_result, options).call
         | 
| 22 22 | 
             
                    end
         | 
| 23 23 |  | 
| 24 | 
            -
                    def initialize pact_source, verification_result
         | 
| 24 | 
            +
                    def initialize pact_source, verification_result, options = {}
         | 
| 25 25 | 
             
                      @pact_source = pact_source
         | 
| 26 26 | 
             
                      @verification_result = verification_result
         | 
| 27 27 | 
             
                      http_client_options = pact_source.uri.options.reject{ |k, v| ![:username, :password, :token].include?(k) }
         | 
| 28 | 
            -
                      @http_client = Pact::Hal::HttpClient.new(http_client_options)
         | 
| 28 | 
            +
                      @http_client = Pact::Hal::HttpClient.new(http_client_options.merge(verbose: options[:verbose]))
         | 
| 29 29 | 
             
                      @pact_entity = Pact::Hal::Entity.new(pact_source.uri, pact_source.pact_hash, http_client)
         | 
| 30 30 | 
             
                    end
         | 
| 31 31 |  | 
| @@ -6,20 +6,21 @@ module Pact | |
| 6 6 | 
             
                module VerificationResults
         | 
| 7 7 | 
             
                  class PublishAll
         | 
| 8 8 |  | 
| 9 | 
            -
                    def self.call pact_sources, test_results_hash
         | 
| 10 | 
            -
                      new(pact_sources, test_results_hash).call
         | 
| 9 | 
            +
                    def self.call pact_sources, test_results_hash, options = {}
         | 
| 10 | 
            +
                      new(pact_sources, test_results_hash, options).call
         | 
| 11 11 | 
             
                    end
         | 
| 12 12 |  | 
| 13 | 
            -
                    def initialize pact_sources, test_results_hash
         | 
| 13 | 
            +
                    def initialize pact_sources, test_results_hash, options = {}
         | 
| 14 14 | 
             
                      @pact_sources = pact_sources
         | 
| 15 15 | 
             
                      @test_results_hash = test_results_hash
         | 
| 16 | 
            +
                      @options = options
         | 
| 16 17 | 
             
                    end
         | 
| 17 18 |  | 
| 18 19 | 
             
                    def call
         | 
| 19 20 | 
             
                      verification_results.collect do | (pact_source, verification_result) |
         | 
| 20 21 | 
             
                        published = false
         | 
| 21 22 | 
             
                        begin
         | 
| 22 | 
            -
                          published = Publish.call(pact_source, verification_result)
         | 
| 23 | 
            +
                          published = Publish.call(pact_source, verification_result, { verbose: options[:verbose] })
         | 
| 23 24 | 
             
                        ensure
         | 
| 24 25 | 
             
                          print_after_verification_notices(pact_source, verification_result, published)
         | 
| 25 26 | 
             
                        end
         | 
| @@ -42,7 +43,7 @@ module Pact | |
| 42 43 | 
             
                      end
         | 
| 43 44 | 
             
                    end
         | 
| 44 45 |  | 
| 45 | 
            -
                    attr_reader :pact_sources, :test_results_hash
         | 
| 46 | 
            +
                    attr_reader :pact_sources, :test_results_hash, :options
         | 
| 46 47 | 
             
                  end
         | 
| 47 48 | 
             
                end
         | 
| 48 49 | 
             
              end
         | 
    
        data/lib/pact/provider/world.rb
    CHANGED
    
    
    
        data/lib/pact/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: pact
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.57.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - James Fraser
         | 
| @@ -12,7 +12,7 @@ authors: | |
| 12 12 | 
             
            autorequire: 
         | 
| 13 13 | 
             
            bindir: bin
         | 
| 14 14 | 
             
            cert_chain: []
         | 
| 15 | 
            -
            date: 2021-01- | 
| 15 | 
            +
            date: 2021-01-31 00:00:00.000000000 Z
         | 
| 16 16 | 
             
            dependencies:
         | 
| 17 17 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 18 18 | 
             
              name: rspec
         | 
| @@ -405,7 +405,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 405 405 | 
             
                - !ruby/object:Gem::Version
         | 
| 406 406 | 
             
                  version: '0'
         | 
| 407 407 | 
             
            requirements: []
         | 
| 408 | 
            -
            rubygems_version: 3.2. | 
| 408 | 
            +
            rubygems_version: 3.2.7
         | 
| 409 409 | 
             
            signing_key: 
         | 
| 410 410 | 
             
            specification_version: 4
         | 
| 411 411 | 
             
            summary: Enables consumer driven contract testing, providing a mock service and DSL
         |