Giter Site home page Giter Site logo

guard-blink1's Introduction

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

guard-blink1's People

Contributors

geofftidey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

guard-blink1's Issues

adding this to a deployment

hey,

have you ever resolved the issue where you have this gem in your test/dev group and someone is on a platform (or, your ci) where it can't build the gem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.