Sha256: 3e4ee146f38351299edab0a02b804c427f3c689a03cf86e188c6de802dab3083

Contents?: true

Size: 928 Bytes

Versions: 41

Compression:

Stored size: 928 Bytes

Contents

require'pact/provider/verification_results/create'
require'pact/provider/verification_results/publish'

module Pact
  module Provider
    module VerificationResults
      class PublishAll

        def self.call pact_sources, test_results_hash
          new(pact_sources, test_results_hash).call
        end

        def initialize pact_sources, test_results_hash
          @pact_sources = pact_sources
          @test_results_hash = test_results_hash
        end

        def call
          verification_results.collect do | (pact_source, verification_result) |
            Publish.call(pact_source, verification_result)
          end
        end

        private

        def verification_results
          pact_sources.collect do | pact_source |
            [pact_source, Create.call(pact_source, test_results_hash)]
          end
        end

        attr_reader :pact_sources, :test_results_hash
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
pact-1.34.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.33.2 lib/pact/provider/verification_results/publish_all.rb
pact-1.33.1 lib/pact/provider/verification_results/publish_all.rb
pact-1.33.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.32.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.31.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.30.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.29.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.28.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.28.0.rc1 lib/pact/provider/verification_results/publish_all.rb
pact-1.27.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.26.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.25.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.24.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.23.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.22.2 lib/pact/provider/verification_results/publish_all.rb
pact-1.22.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.21.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.20.1 lib/pact/provider/verification_results/publish_all.rb
pact-1.20.0 lib/pact/provider/verification_results/publish_all.rb