Skip to content

Commit

Permalink
guard works with growl
Browse files Browse the repository at this point in the history
  • Loading branch information
sax committed Nov 30, 2012
1 parent 0cd2633 commit e569eff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ source "https://rubygems.org"

gem "guard-shell"
gem 'rb-fsevent', '~> 0.9.1'
gem 'growl'
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
coderay (1.0.8)
growl (1.0.3)
guard (1.5.4)
listen (>= 0.4.2)
lumberjack (>= 1.0.2)
Expand All @@ -24,5 +25,6 @@ PLATFORMS
ruby

DEPENDENCIES
growl
guard-shell
rb-fsevent (~> 0.9.1)
10 changes: 8 additions & 2 deletions Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
# Add files and commands to this file, like the example:
# watch(%r{file/path}) { `command(s)` }
#
guard 'shell' do
watch(/(.*).c/) {|m| `make` }
guard 'shell', all_on_start: true do
watch(/(.*).c$/) do |m|
if system("make")
n "#{m[0]} valid", "Make succeeded", :success
else
n "Error in #{m[0]}", "Make failed", :failed
end
end
watch(/Makefile/) {|m| `make` }
end

0 comments on commit e569eff

Please sign in to comment.