Changes from sf-te

This is being used by pull requests for travis-api, travis-gatekeeper, and travis-hub.

Tests fail with a weird exception during migrations on jruby. @BanzaiMan could you help me figure out what's wrong with that?