0.0
No commit activity in last 3 years
No release in over 3 years
guard output to blink1
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.8
>= 0.5.1
>= 0.9.12
>= 2.5.4

Runtime

~> 0.1.2
~> 0.0.6
 Project Readme

About

This gem allows you to use your blink1 from thingm along with guard to show if your tests are failing (red) or passing (green)

Background

After reading this guard-dev post I decided to use the resultant Guard File notification born out of that very discussion.

Installation

Install guard-blink1

You need guard & guard-shell

so if you haven't already, add

gem 'guard'
gem 'guard-shell'

to your Gemfile

and also add

gem 'guard-blink1' after this

you'll probably want to put them in your development group

group :development do
  gem 'guard'
  gem 'guard-shell'
  gem 'guard-blink1'
end

NB.\ putting them in the test group will cause issues on machines without libusb installed. e.g/ Continuous Integration Servers

Now add this to the end of your Guardfile

notification(:file, path: '.guard_result')

require 'guard_blink1'
guard :shell do
  watch '.guard_result' do
    firstline =  File.read('.guard_result').lines.first.strip
    GuardBlink1.blink_colour(firstline)
  end
end

.gitignore

As we're using an intermediary file called .guard_result you'll probably want to add that to your .gitignore file, so you won't commit it to git.

Winning

Now get back to coding with your blink1 as your Red/Green testing buddy :)

Here's an example Vine I made earlier https://vine.co/v/bEjJD3UerFt for all you people from the future! :)

Credit

Many thanks to:

  • amiel and his gist which gave me inspiration to create this gem.
  • ngs for creating the wonderful blink1 ruby gem, rb-blink1
  • All the Ruby guys & gals around the world :)

Contributing/Making it better/Fixing my bugs ;)

  1. Create your feature branch (git checkout -b my-new-feature)
  2. Make changes whilst running guard (of course), & make sure all tests are green.
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request