Fulcrum Webhooks Sample for Rails 4
Ruby CSS JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
log
public
test
vendor/assets
.gitignore
Gemfile
Gemfile.lock
LICENSE
Procfile
README.md
Rakefile
config.ru

README.md

Fulcrum Webhook Sample - Rails 4

A Rails 4 application to serve as Webhook endpoint for use in Fulcrum. It simply receives the event requests and stick them into the database.

This can be used as a foundation for other application.

Get it Running

Production

Deploy to Heroku using the following steps:

Create

  • Clone this repo
  • cd fulcrum-webhook-sample-rails4
  • Install the Heroku Toolbelt
  • heroku login
  • heroku create
  • ruby -e "require 'securerandom'; puts SecureRandom.hex(128);"
    • Use this string in the next command.
  • heroku config:set SECRET_TOKEN=<string from previous command output>

Deploy

  • git push heroku master
  • heroku run rake db:migrate
  • heroku domains
    • Remember this URL for later.

For more help check out how to get started with Rails 4 on Heroku.

Use

Go into Fulcrum and add your Heroku application's URL as a webhook.

See it in Action

This assumes everything is hooked up properly between Fulcrum and this app.

From the Site
  • Create a form in Fulcrum.
  • Visit the heroku app in a browser.
  • You should see the form create event request in the list of requests.
From the Console
  • Create a form in Fulcrum.
  • heroku run rails console
  • WebhookEventRequest.last should show you the form create event request received.

Development

Install

bundle install
bundle exec rake db:create
bundle exec rake db:schema:load

Run

bundle exec foreman start

Use

In your local Fulcrum server, create a webhook with localhost:3000 as the URL.

See it in Action

This assumes everything is hooked up properly between Fulcrum and this app.

From the Site

  • Create a form in Fulcrum.
  • Visit app (localhost:3000) in a browser.
  • You should see the form create event request in the list of requests.
From the Console
  • Create a form in Fulcrum.
  • bundle exec rails console
  • WebhookEventRequest.last should show you the form create event request received.

License

MIT