Sha256: 289389b0d9a6e87834a28e88d73f2baf2e545e1e4ea89c8a147a669243bdc616
Contents?: true
Size: 983 Bytes
Versions: 6
Compression:
Stored size: 983 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? !!resource_object end def resource_object 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
6 entries across 6 versions & 1 rubygems