Sha256: 384cdf4b4a59b2eeaf43037c2ad87f33fd06b12d1e328895019c6d0f0c3ca4cc
Contents?: true
Size: 839 Bytes
Versions: 14
Compression:
Stored size: 839 Bytes
Contents
require 'pact_broker/api/resources/base_resource' require 'pact_broker/configuration' require 'pact_broker/api/decorators/provider_pacts_decorator' module PactBroker module Api module Resources class LatestProviderPacts < BaseResource def content_types_provided [["application/hal+json", :to_json]] end def allowed_methods ["GET"] end def resource_exists? pacticipant_service.find_pacticipant_by_name(provider_name) end def to_json PactBroker::Api::Decorators::ProviderPactsDecorator.new(pacts).to_json(decorator_context(identifier_from_path)) end def pacts pact_service.find_latest_pact_versions_for_provider provider_name, tag: identifier_from_path[:tag] end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems