The gem can now be configured with additional jobs to be run whenever the mounted engine receives a webhook at /webhooks/receive. If the job is an ActiveJob class, then perform_later will be called with the raw event JSON as it's only parameter. Otherwise if the job responds to call, it will be immediately invoked with the raw event JSON.
Syntax:
# initializers/wcc_contentful.rb
WCC::Contentful.configure do |config|
# ...
config.webhook_jobs << MyJobClass
config.webhook_jobs << ->(event) { ... }
end
The gem now automatically configures a webhook to point to the correct URL on the app, if given a management_token and app_url.
The gem can now be configured with additional jobs to be run whenever the mounted engine receives a webhook at
/webhooks/receive
. If the job is an ActiveJob class, thenperform_later
will be called with the raw event JSON as it's only parameter. Otherwise if the job responds tocall
, it will be immediately invoked with the raw event JSON.Syntax:
The gem now automatically configures a webhook to point to the correct URL on the app, if given a
management_token
andapp_url
.fixes #39