Sha256: ccb3863b89b9b754a4b706606e6b4b4ad3827b36805bf6aaaefd8048313af188

Contents?: true

Size: 663 Bytes

Versions: 10

Compression:

Stored size: 663 Bytes

Contents

require 'pact/consumer_contract'

module Pact::Provider
  class VerificationReport

    include Pact::FileName

    def initialize (options)
      @consumer = options[:consumer]
      @provider = options[:provider]
      @result = options[:result]
      @output = options[:output]
    end

    def as_json
      {
        :consumer => @consumer,
        :provider => @provider,
        :result => @result,
        :output => @output
      }
    end

    def to_json(options = {})
      as_json.to_json(options)
    end

    def report_file_name
      file_name("#{@consumer[:name]}_#{@consumer[:ref]}", "#{@provider[:name]}_#{@provider[:ref]}")
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pact-1.0.15 lib/pact/provider/verification_report.rb
pact-1.0.13 lib/pact/provider/verification_report.rb
pact-1.0.12 lib/pact/provider/verification_report.rb
pact-1.0.11 lib/pact/provider/verification_report.rb
pact-1.0.10 lib/pact/provider/verification_report.rb
pact-1.0.9 lib/pact/provider/verification_report.rb
pact-1.0.8 lib/pact/provider/verification_report.rb
pact-1.0.7 lib/pact/provider/verification_report.rb
pact-1.0.6 lib/pact/provider/verification_report.rb
pact-1.0.5 lib/pact/provider/verification_report.rb