public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Support for custom annotations with rake notes:custom and DRY up the task 
definition.

e.g.  rake notes:custom ANNOTATION=WTF
NZKoz (author)
Sun Jun 22 06:00:40 -0700 2008
commit  dc2d754d60378b529c239e1291932503d4d8fca5
tree    294ba9085ce85d183520ff8e2edc987ecfb21d96
parent  7098143f07bd03223bbbeea8a9c23506a7b5dffc
...
6
7
8
9
10
11
 
 
 
 
 
12
13
14
15
16
17
18
19
20
21
 
 
 
22
23
24
...
6
7
8
 
 
 
9
10
11
12
13
14
15
 
 
 
 
 
 
 
 
16
17
18
19
20
21
0
@@ -6,18 +6,15 @@ task :notes do
0
 end
0
 
0
 namespace :notes do
0
-  desc "Enumerate all OPTIMIZE annotations"
0
-  task :optimize do
0
-    SourceAnnotationExtractor.enumerate "OPTIMIZE"
0
+  ["OPTIMIZE", "FIXME", "TODO"].each do |annotation|
0
+    desc "Enumerate all #{annotation} annotations"
0
+    task annotation.downcase.intern do
0
+      SourceAnnotationExtractor.enumerate annotation
0
+    end
0
   end
0
 
0
-  desc "Enumerate all FIXME annotations"
0
-  task :fixme do
0
-    SourceAnnotationExtractor.enumerate "FIXME"
0
-  end
0
-
0
-  desc "Enumerate all TODO annotations"
0
-  task :todo do
0
-    SourceAnnotationExtractor.enumerate "TODO"
0
+  desc "Enumerate a custom annotation, specify with ANNOTATION=WTFHAX"
0
+  task :custom do
0
+    SourceAnnotationExtractor.enumerate ENV['ANNOTATION']
0
   end
0
 end
0
\ No newline at end of file

Comments