Skip to content

brancz/xflamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status Code Climate

xflamp

Tiny ruby program which turns on a lamp through a raspberry pi's gpio and a digital relay when one or more of the configured builds are not passing.

Currently only travis-ci.org builds are supported out of the box, however, pull requests for any other build servers are very welcome. 😉

The CLI infrastructure is heavily inspired and blatantly copied from travis.rb. (part of my goal was to use very few dependencies)

Usage

In general the cli is self documenting

$ xflamp 
Usage: xflamp COMMAND ...

Available commands:

  config                 configure the builds to watch
  help                   print help info
  lamp                   manually turn the lamp "on" or "off"
  version                print version info
  watch                  watch the configured builds

run `xflamp help COMMAND` for more infos

Watch

If you are happy with writing to PIN 0 and have setup your config file in the current direcory, then you can start the program with

$ xflamp watch

If you want to use another PIN or want to specify the config file yourself, the CLI has some documentation on how to achieve that

$ xflamp watch --help
Watch the configured builds.

Usage: xflamp watch [OPTIONS]
    -h, --help                       display help
    -c, --config-path [CONFIG]       config file to use
    -p, --pin [PIN]                  Pin to write io to
    -o, --once                       Only request the build status once

Lamp

To manually turn the lamp on and off use the lamp command. (This is mainly for hardware debugging and fun)

$ xflamp lamp --help
Manually turn the lamp "on" or "off".

Usage: xflamp lamp STATE [OPTIONS]
    -h, --help                       display help
    -c, --config-path [CONFIG]       config file to use
    -p, --pin [PIN]                  Pin to write io to

Config

Example config file (by default called xflamp.yml in the current directory)

---
servers:
  travis-ci-org:
    projects:
    - flower-pot/xflamp

You can generate such a configuration file with the config command. It will ask you for your travis ci authentication token (which will not be saved) to retrieve your active repos on travis ci. Then you can select the repos you want to watch interactively.

see here on how to get your travis token

$ xflamp config

Contributing

  1. Fork it ( https://github.com/flower-pot/xflamp/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

ruby cli/daemon which turns on a lamp through a raspberry pi's gpio and a digital relay

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages