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.46.1 lib/pact/provider/verification_results/publish_all.rb
pact-1.46.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.45.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.44.1 lib/pact/provider/verification_results/publish_all.rb
pact-1.44.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.43.1 lib/pact/provider/verification_results/publish_all.rb
pact-1.43.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.42.3 lib/pact/provider/verification_results/publish_all.rb
pact-1.42.2 lib/pact/provider/verification_results/publish_all.rb
pact-1.42.1 lib/pact/provider/verification_results/publish_all.rb
pact-1.42.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.41.2 lib/pact/provider/verification_results/publish_all.rb
pact-1.41.1 lib/pact/provider/verification_results/publish_all.rb
pact-1.41.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.40.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.39.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.38.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.37.0 lib/pact/provider/verification_results/publish_all.rb
pact-1.36.2 lib/pact/provider/verification_results/publish_all.rb
pact-1.36.0 lib/pact/provider/verification_results/publish_all.rb