X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=vendor%2Frails%2Frailties%2Flib%2Ftasks%2Fannotations.rake;fp=vendor%2Frails%2Frailties%2Flib%2Ftasks%2Fannotations.rake;h=48ac40099a0c089dc5df79512bfa731ebca5cbda;hb=d115f2e23823271635bad69229a42cd8ac68debe;hp=0000000000000000000000000000000000000000;hpb=37cb670bf3ddde90b214e591f100ed4446469484;p=depot.git

diff --git a/vendor/rails/railties/lib/tasks/annotations.rake b/vendor/rails/railties/lib/tasks/annotations.rake
new file mode 100644
index 0000000..48ac400
--- /dev/null
+++ b/vendor/rails/railties/lib/tasks/annotations.rake
@@ -0,0 +1,20 @@
+require 'source_annotation_extractor'
+
+desc "Enumerate all annotations"
+task :notes do
+  SourceAnnotationExtractor.enumerate "OPTIMIZE|FIXME|TODO", :tag => true
+end
+
+namespace :notes do
+  ["OPTIMIZE", "FIXME", "TODO"].each do |annotation|
+    desc "Enumerate all #{annotation} annotations"
+    task annotation.downcase.intern do
+      SourceAnnotationExtractor.enumerate annotation
+    end
+  end
+
+  desc "Enumerate a custom annotation, specify with ANNOTATION=WTFHAX"
+  task :custom do
+    SourceAnnotationExtractor.enumerate ENV['ANNOTATION']
+  end
+end
\ No newline at end of file