update rdoc and add tools.watchr
This commit is contained in:
parent
e5a68259e2
commit
80ad6d501e
2
.gitignore
vendored
2
.gitignore
vendored
@ -9,5 +9,7 @@ tmp/*
|
||||
.bundle/*
|
||||
.DS_Store
|
||||
*.gem
|
||||
.yardoc/*
|
||||
doc/*
|
||||
|
||||
|
||||
|
@ -58,7 +58,7 @@ Notes on how the conversion works:
|
||||
* Directives that expect regular expressions take a Regexp object.
|
||||
* Passing a String as a parameter, by default, double-quotes it.
|
||||
* 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.
|
||||
* 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"
|
||||
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
22
tools.watchr
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user