Sha256: c6beb5f4948ab2b525838843fac243acca3adfae5d4540c26693d796396719fc

Contents?: true

Size: 715 Bytes

Versions: 140

Compression:

Stored size: 715 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 to_hash
      {
        :consumer => @consumer,
        :provider => @provider,
        :result => @result,
        :output => @output
      }
    end

    def as_json options = {}
      to_hash
    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

140 entries across 140 versions & 1 rubygems

Version Path
pact-1.65.3 lib/pact/provider/verification_report.rb
pact-1.65.2 lib/pact/provider/verification_report.rb
pact-1.65.1 lib/pact/provider/verification_report.rb
pact-1.65.0 lib/pact/provider/verification_report.rb
pact-1.64.0 lib/pact/provider/verification_report.rb
pact-1.63.0 lib/pact/provider/verification_report.rb
pact-1.62.0 lib/pact/provider/verification_report.rb
pact-1.61.0 lib/pact/provider/verification_report.rb
pact-1.60.0 lib/pact/provider/verification_report.rb
pact-1.59.0 lib/pact/provider/verification_report.rb
pact-1.58.0 lib/pact/provider/verification_report.rb
pact-1.57.0 lib/pact/provider/verification_report.rb
pact-1.56.0 lib/pact/provider/verification_report.rb
pact-1.55.7 lib/pact/provider/verification_report.rb
pact-1.55.6 lib/pact/provider/verification_report.rb
pact-1.55.5 lib/pact/provider/verification_report.rb
pact-1.55.4 lib/pact/provider/verification_report.rb
pact-1.55.3 lib/pact/provider/verification_report.rb
pact-1.55.2 lib/pact/provider/verification_report.rb
pact-1.55.1 lib/pact/provider/verification_report.rb