/shiplight

Display Codeship build status with blink(1) indicator light

Primary LanguageRuby

Shiplight

Installation

Add this line to your application's Gemfile:

gem 'shiplight'

And then execute:

$ bundle

Or install it yourself as:

$ gem install shiplight

Usage

Connect the blink(1) USB notification light to your computer.

Configure Github credentials

Shiplight uses the GitHub API v3 to monitor projects and requires a personal access token for authentication. Shiplight looks for the personal access token in a local file named credentials in a folder named .shiplight in your home directory. The file looks like this:

[github]
token=<github-personal-access-token>

Monitor all projects

To monitor all projects associated with your credentials, run Shiplight with no arguments:

$ shiplight

Monitor specific project(s)

Use the --repo (-r) command line switch to monitor builds for a specific project:

$ shiplight -r <repo-name>

Where <repo-name> is the full or partial name of the Github repository to monitor.

Monitor commits by a specific user

Use the --user (-u) command line switch to monitor builds triggered by a specific user:

$ shiplight -u <user-name>

Where <user-name> is a full or partial Github user name.

Monitor commits by a specific project and user

Combine the -r and -u switches to monitor builds for a specific project and user:

$ shiplight -u <user-name> -r <repo-name>

Getting Help

Use --help (-h) for a complete list of command line options.

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dextersealy/shiplight.