Sha256: 0b205ddb5d83e1a689b2e891507ef9eafde706f115a3df902a20f6ddfee850c9

Contents?: true

Size: 606 Bytes

Versions: 9

Compression:

Stored size: 606 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
          decorator_class(:pact_collection_decorator).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

9 entries across 9 versions & 1 rubygems

Version Path
pact_broker-2.79.1 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.79.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.78.1 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.78.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.77.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.76.2 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.76.1 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.76.0 lib/pact_broker/api/resources/latest_pacts.rb
pact_broker-2.75.0 lib/pact_broker/api/resources/latest_pacts.rb