Minor README update to test pull request events
Merge branch 'test_pull_1'

* test_pull_1:
  Minor README update to test pull request events
Docs: Provide curl syntax for retrieving trello listId's

This replaces the requirement to download the cprice404's tool to retrieve the
listId. Primarily to keep the documentation flow simple.

Signed-off-by: Ken Barber <ken@bob.sh>
Docs: change webhook end-point to /event/github

Changing the end-point specified in docs from /event/pull_request to
/event/github as the old URL is now unsupported.

Signed-off-by: Ken Barber <ken@bob.sh>
Docs: Include note about account verification

If you don't verify you're account earlier you'll get an error later. Better to
warn people now when they are setting up Heroku.

Signed-off-by: Ken Barber <ken@bob.sh>
Docs: Mention foreman start to run code without a credit card

Without this patch it seems like the code requires a credit card to run.
This is a problem because a credit card is a barrier to getting started
with the code.  While not nearly as a good an experience, the code may
be run locally on a machine using foreman start.  This patch updates the
README to mention this.
Merge branch 'kbarber-ticket/master/docs'

* kbarber-ticket/master/docs:
  Docs: Mention foreman start to run code without a credit card
  Docs: Include note about account verification
  Docs: change webhook end-point to /event/github
  Docs: Provide curl syntax for retrieving trello listId's
Add hub development dependency

Provide an easy way to work with the remote github repositories.
Limit jobs to 10 minutes and enable heroku logging

Without this patch the default limit for jobs is in effect.  This could
cause the worker process to exceed the number of inexpensive hours
available in Heroku.  This patch addresses the problem by limiting jobs
to 10 minutes.  In addition, the retry count is extended to 5 from 3.

This patch also makes sure the worker process sends log messages to
STDERR so that Heroku picks them up and makes them available via `heroku
logs`.
Add Job classes for Closed and Reopened Pull Requests

Without this patch the events generated when a pull request is closed or
reopened are ignored by the application.  This is a problem because I
need an easy way to see what happens when a job is queued up from a
logging point of view.  Closing and reopening a pull request is an easy
way to generate some events.

This patch addresses the problem by subclassing the main PullRequestJob
with specific PullRequestReopenedJob and PullRequestCLosedJob classes.
The classes override the perform instance method called by the
DelayedJob worker process.
Merge pull request #12 from jeffmccune/fix_dj_logging

Limit jobs to 10 minutes and enable heroku logging
Sync STDOUT and STDERR for realtime heroku logging

Without this patch log entries from the worker process aren't displayed
until the worker is shut down.  This patch addresses the problem by
setting the STDERR and STDOUT file handles to synchronous mode as
documented at https://devcenter.heroku.com/articles/logging
Merge branch 'fix_dj_logging'

* fix_dj_logging:
  Sync STDOUT and STDERR for realtime heroku logging

closes: #13
Add handling for github issues

This adds new code to deal with issue events (only 'open' actions at this
point).

In the process I've decomposed some of the code, breaking out jobs into its own
classes that both PullRequestJob and IssueJob inherits. Also moved TrelloAPI
into its own file.

Signed-off-by: Ken Barber <ken@bob.sh>
Rename Job classes to be Trello Specific

Without this patch all of the classes dealing with performing heavy
lifting are named generically.  PullRequestJob and IssueJob and Job for
example.  These classes are fairly focused and
specific to performing the job of creating a new card on a Trello list.

This is a problem because we do not make it clear to the reader the
specific nature of these delayed job classes.

This patch addresses the problem be renaming many of the classes to
include a Trello specific name.
Remove gepetto-bot's Trello APP key from the README

This application key could be used to request user tokens and use up
our API quota.  This patch fixes the problem by removing the key from
the README.
Remove PuppetLabs::TrelloUtils module

The only method provided by this module was never being called by
anything else in the code.  It seems silly to carry the experiment
forward and confuse readers.
Merge branch 'kbarber-ticket/master/issues_support'

* kbarber-ticket/master/issues_support:
  Remove PuppetLabs::TrelloUtils module
  Remove gepetto-bot's Trello APP key from the README
  Rename Job classes to be Trello Specific
  Add handling for github issues

closes: #16
Update Gemfile.lock
Move database setup to PuppetLabs::Webhook.setup_environment

Without this patch database configuration is spread out in a number of
different places.  The environment rake task, the application logic
itself, and the spec helper all have different behaviors.

This is a problem because it makes it more difficult than necessary to
rig up the application into a test harness that behaves in a similar
manner to production.

This patch addresses the problem by centralizing all of the database
initialization into a single module class method named
PuppetLabs::Webhook.setup_environment.  Each of the rake environment,
the spec helper, and the application itself all call this method and do
so in a single place.

In addition, the RACK_ENV=test environment is specifically configured to
use an in-memory sqlite3 database which should make the spec tests
functional and portable.