module PactBroker::Api::Resources::WebhookExecutionMethods
Public Instance Methods
Source
# File lib/pact_broker/api/resources/webhook_execution_methods.rb, line 19 def finish_request if response.code < 400 schedule_triggered_webhooks end super end
Calls superclass method
Source
# File lib/pact_broker/api/resources/webhook_execution_methods.rb, line 8 def handle_webhook_events(event_context = {}) @webhook_event_listener = PactBroker::Webhooks::EventListener.new(webhook_options(event_context)) PactBroker::Events.subscribe(webhook_event_listener) do yield end end
Source
# File lib/pact_broker/api/resources/webhook_execution_methods.rb, line 15 def schedule_triggered_webhooks webhook_event_listener&.schedule_triggered_webhooks end
Private Instance Methods
Source
# File lib/pact_broker/api/resources/webhook_execution_methods.rb, line 40 def webhook_event_listener @webhook_event_listener end
Source
# File lib/pact_broker/api/resources/webhook_execution_methods.rb, line 35 def webhook_execution_configuration application_context.webhook_execution_configuration_creator.call(self) end
Source
# File lib/pact_broker/api/resources/webhook_execution_methods.rb, line 27 def webhook_options(event_context = {}) { database_connector: database_connector, webhook_execution_configuration: webhook_execution_configuration.with_webhook_context(event_context) } end