Sha256: c7e055b6a96c887146d7b91635f3e7d55b34c313f102d092670b3e5e8ac76495

Contents?: true

Size: 615 Bytes

Versions: 17

Compression:

Stored size: 615 Bytes

Contents

require 'pact_broker/api/resources/base_resource'

module PactBroker
  module Api
    module Resources
      class LatestPacts < BaseResource

        def content_types_provided
          [["application/hal+json", :to_json]]
        end

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

        def to_json
          PactBroker::Api::Decorators::PactCollectionDecorator.new(pacts).to_json(decorator_options)
        end

        def pacts
          @pacts ||= pact_service.find_latest_pacts
        end

        def policy_name
          :'pacts::pacts'
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pact_broker-2.74.1 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.74.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.73.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.72.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.71.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.70.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.69.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.68.1 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.68.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.67.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.66.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.65.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.64.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.63.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.62.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.61.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.60.1 lib/pact_broker/api/resources/latest_pacts.rb