Skip to content

Instantly share code, notes, and snippets.

@chrislopresto
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrislopresto/635f6e2208a3697a9e25 to your computer and use it in GitHub Desktop.
Save chrislopresto/635f6e2208a3697a9e25 to your computer and use it in GitHub Desktop.
Guard with blink(1)
group :development do
blink1_users = %w(chrislopresto)
blink1_user = blink1_users.include? `whoami`.strip
if blink1_user
gem 'guard-shell'
gem 'guard-blink1'
end
end
notification :file, path: '.guard_result'
require 'guard_blink1'
guard :shell do
watch '.guard_result' do
status = File.read('.guard_result').lines.first.strip
GuardBlink1.blink_colour status
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment