Last active
August 29, 2015 14:02
-
-
Save hyoshida/11082eadd1bde94c9a04 to your computer and use it in GitHub Desktop.
notesタスクの対象にHACKとXXXを加える
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# refs http://crypt.codemancers.com/posts/2013-07-12-redefine-rake-routes-to-add-your-own-custom-tag-in-Rails/ | |
# | |
# for re-defining the Rake task | |
# otherwise the previous Rake task is still called | |
ADDITIONAL_NOTES = %w( hack xxx ) | |
task(:notes).clear | |
desc "Enumerate all annotations (use notes:optimize, :fixme, :todo, :#{ADDITIONAL_NOTES.join(', :')} for focus)" | |
task :notes do | |
SourceAnnotationExtractor.enumerate "OPTIMIZE|FIXME|TODO|#{ADDITIONAL_NOTES.map(&:upcase).join('|')}", tag: true | |
end | |
namespace :notes do | |
ADDITIONAL_NOTES.each do |task_name| | |
task(task_name).clear | |
task task_name do | |
SourceAnnotationExtractor.enumerate task_name.upcase, tag: true | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment