Add Sinatra ActiveRecord Extension

Without this patch it's not super easy to store models in the provided
Heroku PostgreSQL database.  This is a problem because we need to store
every request and payload that comes in so we can make decisions about
what to implement next.

This patch makes the Sinatra ActiveRecord Extension available for use by
the PDC app.  This is the plugin available at:
https://github.com/janko-m/sinatra-activerecord

config/database.yml should automatically get picked up.  If it does not,
the database may be configured as per:

https://github.com/janko-m/sinatra-activerecord/wiki/Alternative-database-setup
(maint) Remove conditional operator style

This is just a small patch change the conditional operator to a straight
if condition.
Enable Sinatra ActiveRecord rake tasks

Without this patch there aren't any easy to use tasks to create the
database, and create new migrations.  We do, however, have the
db:migrate tasks.

This patch enables the additional tasks provided by the
sinatra/activerecord library.
Add Create Events database migration

Without this patch we don't have a migration to store events that we
receive from Github and Travis.  This patch addresses the problem by
creating a new migration named create_events.  This is the output of the
command:

    bundle exec rake db:create_migration NAME=create_events
Add name payload and request Event attributes

Without this patch the event model doesn't have any attributes.  This
patch adds the request, payload and name attributes.
Store the Github event in the events table

This patch simply stores the Github payload and request into the events
table.  All events have the same name, which is perhaps a really bad
idea.
Set ActiveRecord logging level to INFO

Without this patch all of the object stored into the database are logged
to the Heroku console.  This is because the ActiveRecord logger is set
to debug level.  This changes the level to INFO messages only and should
prevent the entire object from showing up int he log files.
Add authentication helper methods and enforce authentication

Without this patch each of the event routes is handling authentication
inline.  This is a problem because each route should not need to
duplicate this code, especially as we start to handle more events.

TODO: This makes the specs fail as authentication is now enforced.
Add PuppetLabs::PullRequestController class

Without this class most of the logic regarding what to do with the pull
request data is embedded directly in the route.  This is a problem
because the route block is already quite large and a dedicated
controller class seems like a more appropriate place to put these
conditional behaviors and the behaviors of each event.
Avoid undefined method `[]' for nil:NilClass error on root

Without this patch the base route throws this error since there is no
payload to authenticate against.  This patch fixes the problem by
returning false if there is no payload.
Only authenticate requests that route to /event/*

Without this patch all routes are authenticated.  This is a problem
because I want the default route to be unauthenticated so the app may be
started in a manner that returns a 200 status.
Update rake api:pull_request task
List the last 20 stored events at /events

This should print an Array of Hash objects in JSON.
Fixup store the request as an OpenStruct
Add production entry to database.yml

This is in an effort to get storage working with the local `foreman`
instance instead of strictly on Heroku.
Use the most recent version of Sinatra

Without this patch an older version of sinatra was locked into place.
During debugging I went ahead and updated the version of Sinatra.  This
may or may not be supported by Heroku's cedar stack.
Update watchr rake task

Without this patch the watchr rake task isn't up to date with the
organization of the codebase.  This patch makes `bundle exec rake
watchr` useful again.
Fix spec test failures

Without this patch the spec tests have been failing due to the
reorganization of the code.  This patch addresses the problem by
updating all of the spec tests.

The return code from 204 with JSON content as a behavior has also been
patched since Rack forces no body to exist if 204 is returned as a
status code.  Instead we return 200 with the JSON message.
Add .rspec to gitignore

So I can add --fail-fast for watchr and quick refactors.
Make it easier to read spec failures due to response status codes

Without this patch the test failure messages that result from an
unexpected response status code are very difficult to read because the
backtrace is hidden away in the response @errors instance variable.

This patch addresses the problem by introducing a small rspec matcher
that exposes the response error code and displays the backtrace in the
error message for the failed example.

The patch also includes a serialized YAML file modeling a request
structure in order to facilitate testing some of the helper methods.