aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks/annotations.rake
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/tasks/annotations.rake')
-rw-r--r--railties/lib/rails/tasks/annotations.rake6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/tasks/annotations.rake b/railties/lib/rails/tasks/annotations.rake
index 65af778a15..3a78de418a 100644
--- a/railties/lib/rails/tasks/annotations.rake
+++ b/railties/lib/rails/tasks/annotations.rake
@@ -2,20 +2,20 @@
require "rails/source_annotation_extractor"
-task :notes do
+task notes: :environment do
Rails::SourceAnnotationExtractor::Annotation.notes_task_deprecation_warning
Rails::Command.invoke :notes
end
namespace :notes do
["OPTIMIZE", "FIXME", "TODO"].each do |annotation|
- task annotation.downcase.intern do
+ task annotation.downcase.intern => :environment do
Rails::SourceAnnotationExtractor::Annotation.notes_task_deprecation_warning
Rails::Command.invoke :notes, ["--annotations", annotation]
end
end
- task :custom do
+ task custom: :environment do
Rails::SourceAnnotationExtractor::Annotation.notes_task_deprecation_warning
Rails::Command.invoke :notes, ["--annotations", ENV["ANNOTATION"]]
end