Last active
August 29, 2015 14:09
-
-
Save chrislopresto/635f6e2208a3697a9e25 to your computer and use it in GitHub Desktop.
Guard with blink(1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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