Sha256: 5a0e7c71fe81ee5264f29730b0422a9a192eb36c0f7222a14f349ce5dbd312ed

Contents?: true

Size: 419 Bytes

Versions: 67

Compression:

Stored size: 419 Bytes

Contents

require 'digest/sha1'
require 'pact_broker/pacts/order_hash_keys'

module PactBroker
  module Pacts
    module GenerateInteractionSha
      extend OrderHashKeys

      def self.call interaction_hash
        Digest::SHA1.hexdigest(order_hash_keys(interaction_hash).to_json)
      end

      def generate_interaction_sha(interaction_hash)
        GenerateInteractionSha.call(interaction_hash)
      end
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
pact_broker-2.36.1 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.36.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.35.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.34.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.33.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.32.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.31.0 lib/pact_broker/pacts/generate_interaction_sha.rb