Sha256: 6acef6088e7ac022d31ee9c58188a38c915414562c306cfa28966b0f6978aa0c

Contents?: true

Size: 378 Bytes

Versions: 91

Compression:

Stored size: 378 Bytes

Contents

module Pact
  module Doc
    class SortInteractions
      def self.call interactions
        interactions.sort{|a, b| sortable_id(a) <=> sortable_id(b)}
      end

      private

      def self.sortable_id interaction
        "#{(interaction.description || '').downcase} #{interaction.response.status} #{(interaction.provider_state || '').downcase}"
      end
    end
  end
end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
pact_broker-2.23.3 lib/pact/doc/sort_interactions.rb
pact_broker-2.23.2 lib/pact/doc/sort_interactions.rb
pact_broker-2.23.1 lib/pact/doc/sort_interactions.rb
pact_broker-2.23.0 lib/pact/doc/sort_interactions.rb
pact_broker-2.22.0 lib/pact/doc/sort_interactions.rb
pact_broker-2.21.0 lib/pact/doc/sort_interactions.rb
pact_broker-2.20.0 lib/pact/doc/sort_interactions.rb
pact_broker-2.19.2 lib/pact/doc/sort_interactions.rb
pact_broker-2.19.1 lib/pact/doc/sort_interactions.rb
pact_broker-2.19.0 lib/pact/doc/sort_interactions.rb
pact_broker-2.18.0 lib/pact/doc/sort_interactions.rb