aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-06-22 16:00:40 +0300
committerMichael Koziarski <michael@koziarski.com>2008-07-03 19:42:58 +0300
commitdc2d754d60378b529c239e1291932503d4d8fca5 (patch)
tree294ba9085ce85d183520ff8e2edc987ecfb21d96 /railties
parent7098143f07bd03223bbbeea8a9c23506a7b5dffc (diff)
downloadrails-dc2d754d60378b529c239e1291932503d4d8fca5.tar.gz
rails-dc2d754d60378b529c239e1291932503d4d8fca5.tar.bz2
rails-dc2d754d60378b529c239e1291932503d4d8fca5.zip
Support for custom annotations with rake notes:custom and DRY up the task definition.
e.g. rake notes:custom ANNOTATION=WTF
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/tasks/annotations.rake19
1 files changed, 8 insertions, 11 deletions
diff --git a/railties/lib/tasks/annotations.rake b/railties/lib/tasks/annotations.rake
index ea6046670f..48ac40099a 100644
--- a/railties/lib/tasks/annotations.rake
+++ b/railties/lib/tasks/annotations.rake
@@ -6,18 +6,15 @@ task :notes do
end
namespace :notes do
- desc "Enumerate all OPTIMIZE annotations"
- task :optimize do
- SourceAnnotationExtractor.enumerate "OPTIMIZE"
+ ["OPTIMIZE", "FIXME", "TODO"].each do |annotation|
+ desc "Enumerate all #{annotation} annotations"
+ task annotation.downcase.intern do
+ SourceAnnotationExtractor.enumerate annotation
+ end
end
- desc "Enumerate all FIXME annotations"
- task :fixme do
- SourceAnnotationExtractor.enumerate "FIXME"
- end
-
- desc "Enumerate all TODO annotations"
- task :todo do
- SourceAnnotationExtractor.enumerate "TODO"
+ desc "Enumerate a custom annotation, specify with ANNOTATION=WTFHAX"
+ task :custom do
+ SourceAnnotationExtractor.enumerate ENV['ANNOTATION']
end
end \ No newline at end of file