class Contentful::Webhook::Listener::Controllers::WebhookAware
Attributes
webhook[R]
Public Instance Methods
archive()
click to toggle source
# File lib/contentful/webhook/listener/controllers/webhook_aware.rb, line 17 def archive end
auto_save()
click to toggle source
# File lib/contentful/webhook/listener/controllers/webhook_aware.rb, line 26 def auto_save end
create()
click to toggle source
# File lib/contentful/webhook/listener/controllers/webhook_aware.rb, line 29 def create end
delete()
click to toggle source
# File lib/contentful/webhook/listener/controllers/webhook_aware.rb, line 32 def delete end
publish()
click to toggle source
# File lib/contentful/webhook/listener/controllers/webhook_aware.rb, line 11 def publish end
save()
click to toggle source
# File lib/contentful/webhook/listener/controllers/webhook_aware.rb, line 23 def save end
unarchive()
click to toggle source
# File lib/contentful/webhook/listener/controllers/webhook_aware.rb, line 20 def unarchive end
unpublish()
click to toggle source
# File lib/contentful/webhook/listener/controllers/webhook_aware.rb, line 14 def unpublish end
Protected Instance Methods
perform(request, response)
click to toggle source
Calls superclass method
Contentful::Webhook::Listener::Controllers::Wait#perform
# File lib/contentful/webhook/listener/controllers/webhook_aware.rb, line 46 def perform(request, response) super(request, response) logger.debug "Webhook Data: {id: #{webhook.id}, space_id: #{webhook.space_id}, kind: #{webhook.kind}, event: #{webhook.event}}" send(webhook.event) ensure response end
pre_perform(request, response)
click to toggle source
# File lib/contentful/webhook/listener/controllers/webhook_aware.rb, line 37 def pre_perform(request, response) @webhook = WebhookFactory.new(request).create rescue Exception => e logger.error 'Not a Webhook. Stacktrace: ' logger.error e response.body = "Not a Webhook" response.status = 400 end