Permalink
Browse files

Low-rent guard support

  • Loading branch information...
1 parent 748a572 commit 628b29c114f938056bdb5cd59e1b62cdd4bdd7c9 @spicycode committed May 28, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 Guardfile
View
23 Guardfile
@@ -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.