update rdoc and add tools.watchr

This commit is contained in:
John Bintz 2010-11-29 18:22:03 -05:00
parent e5a68259e2
commit 80ad6d501e
3 changed files with 52 additions and 23 deletions

2
.gitignore vendored
View File

@ -9,5 +9,7 @@ tmp/*
.bundle/* .bundle/*
.DS_Store .DS_Store
*.gem *.gem
.yardoc/*
doc/*

View File

@ -58,7 +58,7 @@ Notes on how the conversion works:
* Directives that expect regular expressions take a Regexp object. * Directives that expect regular expressions take a Regexp object.
* Passing a String as a parameter, by default, double-quotes it. * Passing a String as a parameter, by default, double-quotes it.
* Passing in a Symbol does not quote the parameter. * Passing in a Symbol does not quote the parameter.
** Some directives NerdCap Symbols, such as Options * Some directives NerdCap Symbols, such as Options
* Appending an exclamation point to the method turns off quoting. * Appending an exclamation point to the method turns off quoting.
* Shortcut methods are defined as modules under the Apache module. * Shortcut methods are defined as modules under the Apache module.
@ -91,3 +91,8 @@ The above config is transformed into the following:
RewriteCond "%{HTTP_REFERER}" "^!my-cool-website\.cool\.wow" RewriteCond "%{HTTP_REFERER}" "^!my-cool-website\.cool\.wow"
RewriteRule "\.(gif|jpg|png|pdf)$" "/lol-image-stealer.html" [L,R] RewriteRule "\.(gif|jpg|png|pdf)$" "/lol-image-stealer.html" [L,R]
== Using Apache::Config separately
Include the gem and access the methods on Apache::Config directly. See test/example_standalone.rb
for an example.

22
tools.watchr Normal file
View File

@ -0,0 +1,22 @@
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
}