Enable Travis-CI for a Github repository from the command line
Travis-CI is a Really Useful Engine, but I've only enabled it for a handful of my GitHub repositories because navigating though GitHub's settings to do so is a bit of a pain.
Seemed like this should be scriptable though - turns out it is! Edit that script to include your GitHub login details, and Travis-CI details, save it as travis-status
somewhere in your $PATH, chmod +x travis-status
and you're ready to go!
Running travis-status
in a project's root directory (and I'm assuming the project's root directory has the same name as the repository's slug) with no parameters will print out a list of all event hooks for the project (not just Travis ones). Running it and passing "1" or "0" as the parameter will enable or disable Travis for the project.
I travis gem:
gem install travis
travis enable
Yes, I did initially try that, but in the end decided it would be easier to copy-and-adapt an existing GitHub-API-using script I had than it would be to figure out the cryptic error messages I was getting from
gem
.