Sha256: c8b2aabd93ec8bdc81b7fe20ac9346aab85fcdd09dbb7cd737c19d86d3630cac

Contents?: true

Size: 578 Bytes

Versions: 3

Compression:

Stored size: 578 Bytes

Contents

require 'pact_broker/api/resources/base_resource'
require 'pact_broker/api/decorators/relationships_csv_decorator'

module PactBroker
  module Api
    module Resources

      class Relationships < BaseResource

        def content_types_provided
          [["text/csv", :to_csv]]
        end

        def allowed_methods
          ["GET", "OPTIONS"]
        end

        def to_csv
          PactBroker::Api::Decorators::RelationshipsCsvDecorator.new(pacts).to_csv
        end

        def pacts
          pact_service.find_latest_pacts
        end

      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pact_broker-2.23.3 lib/pact_broker/api/resources/relationships.rb
pact_broker-2.23.2 lib/pact_broker/api/resources/relationships.rb
pact_broker-2.23.1 lib/pact_broker/api/resources/relationships.rb