Sha256: 39753e027238653f2dd204d6807a0e56086f99a0326c1da844de9e71c159aa44

Contents?: true

Size: 371 Bytes

Versions: 63

Compression:

Stored size: 371 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

63 entries across 63 versions & 1 rubygems

Version Path
pact-1.42.2 lib/pact/doc/sort_interactions.rb
pact-1.42.1 lib/pact/doc/sort_interactions.rb
pact-1.42.0 lib/pact/doc/sort_interactions.rb
pact-1.41.2 lib/pact/doc/sort_interactions.rb
pact-1.41.1 lib/pact/doc/sort_interactions.rb
pact-1.41.0 lib/pact/doc/sort_interactions.rb
pact-1.40.0 lib/pact/doc/sort_interactions.rb
pact-1.39.0 lib/pact/doc/sort_interactions.rb
pact-1.38.0 lib/pact/doc/sort_interactions.rb
pact-1.37.0 lib/pact/doc/sort_interactions.rb
pact-1.36.2 lib/pact/doc/sort_interactions.rb
pact-1.36.0 lib/pact/doc/sort_interactions.rb
pact-1.34.0 lib/pact/doc/sort_interactions.rb
pact-1.33.2 lib/pact/doc/sort_interactions.rb
pact-1.33.1 lib/pact/doc/sort_interactions.rb
pact-1.33.0 lib/pact/doc/sort_interactions.rb
pact-1.32.0 lib/pact/doc/sort_interactions.rb
pact-1.31.0 lib/pact/doc/sort_interactions.rb
pact-1.30.0 lib/pact/doc/sort_interactions.rb
pact-1.29.0 lib/pact/doc/sort_interactions.rb