apache-config-generator/tools.watchr

23 lines
348 B
Plaintext
Raw Normal View History

2010-11-29 23:22:03 +00:00
def growl(title, message)
system %{growlnotify -m "#{message}" "#{title}"}
end
def reek(file)
output = %x{reek #{file}}
puts output
file, warnings = output.split("\n").first.split(" -- ")
growl "REEK: #{file}", warnings
end
def yard
system %{yard doc {app,lib}/**/*.rb}
end
watch('(app|lib)/(.*)\.rb') { |match|
reek(match[0])
yard
}