2016-08-06 13:15:47 -04:00
|
|
|
require "rails/source_annotation_extractor"
|
2007-02-25 14:40:37 -05:00
|
|
|
|
2010-06-09 16:19:03 -04:00
|
|
|
desc "Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)"
|
2007-02-25 14:40:37 -05:00
|
|
|
task :notes do
|
2012-10-14 06:03:39 -04:00
|
|
|
SourceAnnotationExtractor.enumerate "OPTIMIZE|FIXME|TODO", tag: true
|
2007-02-25 14:40:37 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
namespace :notes do
|
2008-06-22 09:00:40 -04:00
|
|
|
["OPTIMIZE", "FIXME", "TODO"].each do |annotation|
|
2010-06-09 16:19:03 -04:00
|
|
|
# desc "Enumerate all #{annotation} annotations"
|
2008-06-22 09:00:40 -04:00
|
|
|
task annotation.downcase.intern do
|
|
|
|
SourceAnnotationExtractor.enumerate annotation
|
|
|
|
end
|
2007-02-25 14:40:37 -05:00
|
|
|
end
|
|
|
|
|
2010-02-03 02:31:57 -05:00
|
|
|
desc "Enumerate a custom annotation, specify with ANNOTATION=CUSTOM"
|
2008-06-22 09:00:40 -04:00
|
|
|
task :custom do
|
2016-08-06 13:15:47 -04:00
|
|
|
SourceAnnotationExtractor.enumerate ENV["ANNOTATION"]
|
2007-02-25 14:40:37 -05:00
|
|
|
end
|
2016-08-06 13:55:02 -04:00
|
|
|
end
|