Sha256: 2bb2ba55f596c9733de5b4179551ad77e622880e4295716acb7c3b61a285e1db
Contents?: true
Size: 912 Bytes
Versions: 33
Compression:
Stored size: 912 Bytes
Contents
require 'pact_broker/api/resources/base_resource' require 'pact_broker/webhooks/triggered_webhook' module PactBroker module Api module Resources class TriggeredWebhookLogs < BaseResource def content_types_provided [["text/plain", :to_text]] end def allowed_methods ["GET", "OPTIONS"] end def resource_exists? triggered_webhook end def to_text # Too simple to bother putting into a service triggered_webhook.webhook_executions.collect(&:logs).join("\n") end def triggered_webhook @triggered_webhook ||= begin criteria = {webhook_uuid: identifier_from_path[:uuid], trigger_uuid: identifier_from_path[:trigger_uuid]} PactBroker::Webhooks::TriggeredWebhook.where(criteria).single_record end end end end end end
Version data entries
33 entries across 33 versions & 1 rubygems