class PactBroker::Api::Resources::TriggeredWebhookLogs
Public Instance Methods
allowed_methods()
click to toggle source
# File lib/pact_broker/api/resources/triggered_webhook_logs.rb, line 13 def allowed_methods ["GET", "OPTIONS"] end
content_types_provided()
click to toggle source
# File lib/pact_broker/api/resources/triggered_webhook_logs.rb, line 9 def content_types_provided [["text/plain", :to_text]] end
policy_name()
click to toggle source
# File lib/pact_broker/api/resources/triggered_webhook_logs.rb, line 30 def policy_name :'webhooks::webhook' end
policy_record()
click to toggle source
# File lib/pact_broker/api/resources/triggered_webhook_logs.rb, line 34 def policy_record triggered_webhook&.webhook end
resource_exists?()
click to toggle source
# File lib/pact_broker/api/resources/triggered_webhook_logs.rb, line 17 def resource_exists? !!triggered_webhook end
to_text()
click to toggle source
# File lib/pact_broker/api/resources/triggered_webhook_logs.rb, line 21 def to_text # Too simple to bother putting into a service if webhook_executions.any? webhook_executions.collect(&:logs).join("\n") else "Webhook has not executed yet. Please retry in a few seconds." end end
Private Instance Methods
triggered_webhook()
click to toggle source
# File lib/pact_broker/api/resources/triggered_webhook_logs.rb, line 44 def triggered_webhook @triggered_webhook ||= PactBroker::Webhooks::TriggeredWebhook.find(uuid: identifier_from_path[:uuid]) end
webhook_executions()
click to toggle source
# File lib/pact_broker/api/resources/triggered_webhook_logs.rb, line 40 def webhook_executions @webhook_executions ||= triggered_webhook.webhook_executions end