Sha256: 3fa3471029eca7c49a83989b524f8c79102b07d242b9b5f225a1438e0fbf238d

Contents?: true

Size: 940 Bytes

Versions: 55

Compression:

Stored size: 940 Bytes

Contents

require 'pact/matching_rules/extract'
require 'pact/matching_rules/v3/extract'
require 'pact/matching_rules/merge'
require 'pact/matching_rules/v3/merge'

module Pact
  module MatchingRules

    # @api public Used by pact-mock_service
    def self.extract object_graph, options = {}
      pact_specification_version = options[:pact_specification_version] || Pact::SpecificationVersion::NIL_VERSION
      case pact_specification_version.major
      when nil, 0, 1, 2
        Extract.(object_graph)
      else
        V3::Extract.(object_graph)
      end
    end

    def self.merge object_graph, matching_rules, options = {}
      pact_specification_version = options[:pact_specification_version] || Pact::SpecificationVersion::NIL_VERSION
      case pact_specification_version.major
      when nil, 0, 1, 2
        Merge.(object_graph, matching_rules)
      else
        V3::Merge.(object_graph, matching_rules)
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 2 rubygems

Version Path
pact-support-1.21.1 lib/pact/matching_rules.rb
pact-support-1.21.0 lib/pact/matching_rules.rb
pact-support-1.20.2 lib/pact/matching_rules.rb
pact-support-1.20.1 lib/pact/matching_rules.rb
pact-support-1.20.0 lib/pact/matching_rules.rb
pact-support-1.19.0 lib/pact/matching_rules.rb
pact-support-1.18.1 lib/pact/matching_rules.rb
pact-support-1.18.0 lib/pact/matching_rules.rb
hs-pact-support-1.17.1 lib/pact/matching_rules.rb
pact-support-1.17.0 lib/pact/matching_rules.rb
pact-support-1.16.10 lib/pact/matching_rules.rb
pact-support-1.16.9 lib/pact/matching_rules.rb
pact-support-1.16.8 lib/pact/matching_rules.rb
pact-support-1.16.7 lib/pact/matching_rules.rb
pact-support-1.16.6 lib/pact/matching_rules.rb
pact-support-1.16.5 lib/pact/matching_rules.rb
pact-support-1.16.4 lib/pact/matching_rules.rb
pact-support-1.16.3 lib/pact/matching_rules.rb
pact-support-1.16.2 lib/pact/matching_rules.rb
pact-support-1.17.0.pre.rc2 lib/pact/matching_rules.rb