mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Support for custom annotations with rake notes:custom and DRY up the task definition.
e.g. rake notes:custom ANNOTATION=WTF
This commit is contained in:
parent
7098143f07
commit
dc2d754d60
1 changed files with 8 additions and 11 deletions
|
@ -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
|
Loading…
Reference in a new issue