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