Sha256: 1ff8b187bcbc90ac7d88cdd6c6c16f08a846f006799203f081abcc49d6c2a40f
Contents?: true
Size: 636 Bytes
Versions: 10
Compression:
Stored size: 636 Bytes
Contents
require "pact/matchers" require "pact_broker/json" require "pact/matchers/unix_diff_formatter" module PactBroker module Pacts class CreateFormattedDiff extend Pact::Matchers def self.call pact_json_content, previous_pact_json_content pact_hash = JSON.load(pact_json_content, nil, PactBroker::PACT_PARSING_OPTIONS) previous_pact_hash = JSON.load(previous_pact_json_content, nil, PactBroker::PACT_PARSING_OPTIONS) difference = diff(previous_pact_hash, pact_hash) Pact::Matchers::UnixDiffFormatter.call(difference, colour: false, include_explanation: false) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems