Ron Lusk on 20 Apr 2006 15:20:52 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] extend doc:app rake task to Include lib/*?

Try this instead,

namespace :doc do
  desc "Generate documentation for the application""app") { |rdoc|
    rdoc.rdoc_dir = 'doc/app'
    rdoc.title    = "Rails Application Documentation"
    rdoc.options << '--line-numbers' << '--inline-source'

Note that I've added your lib directory at the end.  This is copied from
under the rails gem. 

(Curiously--to me, at least--this does not override the existing task definition, but just supplements it so the task is completely repeated (which you would want to do if you hoped to incorporate your app doc with your lib doc, I should think...but I'm not sure).  You may have to experiment a bit, or try renaming it to "lib" instead of "app", to see how things work together.)

To use the rake RDocTask (included by default in the generated Rakefile) you have to invoke it as, you cannot just call "task :app" as you would for normal user-defined tasks.


Ron Lusk
talk mailing list