Skip to content

Commit

Permalink
Low-rent guard support
Browse files Browse the repository at this point in the history
  • Loading branch information
spicycode committed May 28, 2012
1 parent 748a572 commit 628b29c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require 'guard/guard'

module ::Guard
class Micronaut < ::Guard::Guard
def run_all
system "rake"
end

def run_on_change(paths)
system "ruby -Ilib -Ispec #{paths.join(' ')}"
end
end
end

# A sample Guardfile
# More info at https://github.com/guard/guard#readme
# guard :tests do
# watch('*.rb') { |m| `ruby -Ilib -Ispec spec/lib/#{m[1]}_spec.rb` }
# end
guard :micronaut do
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch(%r{^spec/(.+)\.rb$}) { |m| m }
end

0 comments on commit 628b29c

Please sign in to comment.