Created
November 29, 2010 18:24
-
-
Save johnbintz/720323 to your computer and use it in GitHub Desktop.
Watchr script to do things that I want it to do
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment