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.79.1 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.79.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.78.1 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.78.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.77.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.76.2 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.76.1 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.76.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.75.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.74.1 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.74.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.73.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.72.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.71.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.70.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.69.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.68.1 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.68.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.67.0 lib/pact_broker/pacts/generate_interaction_sha.rb
pact_broker-2.66.0 lib/pact_broker/pacts/generate_interaction_sha.rb