apache-config-generator/tools.watchr
2010-11-29 18:22:03 -05:00

23 lines
348 B
Ruby

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
}