Sha256: 691c4129e7288dec49731e5cd29de330e3bf46cb0ae84aa8c04eeda04cac8af0
Contents?: true
Size: 876 Bytes
Versions: 12
Compression:
Stored size: 876 Bytes
Contents
require 'pact_broker/api/resources/base_resource' require 'pact_broker/configuration' module PactBroker module Api module Resources class LatestPact < BaseResource def content_types_provided [["application/json", :to_json], ["text/html", :to_html]] end def allowed_methods ["GET"] end def resource_exists? pact end def to_json response.headers['X-Pact-Consumer-Version'] = pact.consumer_version_number PactBroker::Api::Decorators::PactDecorator.new(pact).to_json(user_options: { base_url: base_url }) end def to_html PactBroker.configuration.html_pact_renderer.call(pact) end def pact @pact ||= pact_service.find_latest_pact(identifier_from_path) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems