Sha256: 818f25bf0345f9efdaab9e49a9b0de917c03700d7abd355102bdf3d1a27fd5a1
Contents?: true
Size: 936 Bytes
Versions: 14
Compression:
Stored size: 936 Bytes
Contents
require 'pact_broker/api/resources/base_resource' require 'pact_broker/pacts/pact_params' require 'pact_broker/pacts/diff' module PactBroker module Api module Resources class PactContentDiff < BaseResource def content_types_provided [["text/plain", :to_text]] end def allowed_methods ["GET"] end def resource_exists? pacticipant_service.find_pacticipant_by_name(consumer_name) && pacticipant_service.find_pacticipant_by_name(provider_name) end def to_text _, body = PactBroker::Pacts::Diff.run pact_params, base_url: base_url response.body = body end def pact @pact ||= pact_service.find_pact(pact_params) end def pact_params @pact_params ||= PactBroker::Pacts::PactParams.from_request request, path_info end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems