From 406d61ee8c0311f742ac74b9a15845cc3cd214d3 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Wed, 15 Jun 2011 23:26:19 +0530 Subject: add details on how to use specific annotations in rake:notes --- railties/guides/source/command_line.textile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/railties/guides/source/command_line.textile b/railties/guides/source/command_line.textile index c71baa76d1..03ff3097da 100644 --- a/railties/guides/source/command_line.textile +++ b/railties/guides/source/command_line.textile @@ -402,7 +402,7 @@ If you want to strip out or rebuild any of the Rails documentation (including th h4. +notes+ -+rake notes+ will search through your code for comments beginning with FIXME, OPTIMIZE or TODO. This checks only for files with extension +.builder+, +.rb+, +.rxml+, +.rhtml+ and +.erb+. ++rake notes+ will search through your code for comments beginning with FIXME, OPTIMIZE or TODO. The search is only done in files with extension +.builder+, +.rb+, +.rxml+, +.rhtml+ and +.erb+ for both default and custom annotations. $ rake notes @@ -416,7 +416,19 @@ app/model/school.rb: * [ 17] [FIXME] -You can also use custom annotations in your code and list them using +rake notes:custom+ and specify the annotation using an environment variable +ANNOTATION+. +If you are looking for a specific annotation, say FIXME, you can use +rake notes:fixme+. Note that you have to lower case the annotation's name. + + +$ rake notes:fixme +(in /home/foobar/commandsapp) +app/controllers/admin/users_controller.rb: + * [132] high priority for next deploy + +app/model/school.rb: + * [ 17] + + +You can also use custom annotations in your code and list them using +rake notes:custom+ by specifying the annotation using an environment variable +ANNOTATION+. $ rake notes:custom ANNOTATION=BUG @@ -425,6 +437,8 @@ app/model/post.rb: * [ 23] Have to fix this one before pushing! +NOTE. When using specific annotations and custom annotations, the annotation name (FIXME, BUG etc) is not displayed in the output lines. + h4. +routes+ +rake routes+ will list all of your defined routes, which is useful for tracking down routing problems in your app, or giving you a good overview of the URLs in an app you're trying to get familiar with. -- cgit v1.2.3