Sha256: b321949644addff573c9cfe9940d293dc7d3fbc83309bd9558dc5cf689173b5a
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
# Run me with: # $ watchr watchr.rb # -------------------------------------------------- # Rules # -------------------------------------------------- watch( '^test.*/*_test.*\.rb' ) { rake } # or run specific one { |m| ruby m[0] } watch( '^lib/(.*)\.rb' ) { rake } # { |m| ruby "test/test_#{m[1]}.rb" } watch( '^test/test_helper\.rb' ) { rake } watch( '^web/views/(.*)\.(.*)' ) { rake } watch( '^web/public/css/(.*)\.scss' ) { sass } # -------------------------------------------------- # Signal Handling # -------------------------------------------------- Signal.trap('QUIT') { rake } # Ctrl-\ Signal.trap('INT' ) { abort("\n") } # Ctrl-C # -------------------------------------------------- # Helpers # -------------------------------------------------- def rake run "clear" run "bundle exec rake" end def sass run "bundle exec sass --style compressed --scss -I web/public/css/ web/public/css/elefant.scss web/public/css/elefant.css" end def run( cmd ) puts cmd system cmd end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
elefant-0.0.1 | watchr.rb |