1 $exec = "phpunit tests/unit"
2 $command = "notify-send -i '{image}' '{message}'"
4 watch('.*.php') { |m| changed(m[0]) }
7 puts "\e[H\e[2J" #clear console
9 message = `phpcs --standard=tests/ --encoding=utf-8 #{file}`
12 image = "~/.watchr_images/failed.png"
14 image = "~/.watchr_images/passed.png"
19 if message.include?("OK (") and !message.include?("FAILURES")
20 image = "~/.watchr_images/passed.png"
22 image = "~/.watchr_images/failed.png"
26 cmd = $command.gsub('{image}', File.expand_path(image))
27 cmd = cmd.gsub('{message}', message)