Git::Semaphore

git integration with semaphoreapp.com
Installation
Add this line to your application's Gemfile:
gem 'git-semaphore'
And then execute:
$ bundle
Or install it yourself as:
$ gem install git-semaphore
Authentication
Log into semaphoreapp.com and find your API authentication token in the API tab of one of your projects' settings page.
Next, choose one of the following mechanisms to make your API authentication token available to Git::Semaphore...
via an environment variable
$ export SEMAPHORE_AUTH_TOKEN="Yds3w6o26FLfJTnVK2y9"
via local git config (in a git working dir)
$ git config --local --replace-all semaphore.authtoken "Yds3w6o26FLfJTnVK2y9"
via global git config
$ git config --global --replace-all semaphore.authtoken "Yds3w6o26FLfJTnVK2y9"
Usage
All of the below examples need to be run from within a git directory.
listing of user’s projects
$ git semaphore --projects
listing of project’s branches
$ git semaphore --branches
(the project name is derived from the current git directory)
status of a project’s branch
$ git semaphore --status
(the project and branch name are derived from the current git directory and the current git head)
formatting the raw git semaphore JSON output
After installing the quite brilliant jazor gem (gem install jazor), the jazor utility can be used to format the raw JSON output generated by the various git semaphore commands, as follows:
$ git semaphore --projects | jazor -c
$ git semaphore --branches | jazor -c
$ git semaphore --status | jazor -c
Development
$ gem build git-semaphore.gemspec
$ # this will generate a 'git-semaphore-x.y.z.gem' file
$ gem install git-semaphore-x.y.z.gem
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request