What's tasks for under the lib directory

Looking over the new directory structure for Rails 0.14.3 generated by
the “rails myproject” command, I noticed a “lib/tasks” directory.
What’s the purpose of the “tasks” directory?

Thanks

On 12/8/05, Dave B. [email protected] wrote:

Looking over the new directory structure for Rails 0.14.3 generated by
the “rails myproject” command, I noticed a “lib/tasks” directory.
What’s the purpose of the “tasks” directory?

Thanks

Add your own rake tasks by creating a lib/tasks/*.rake file. Before
the tasks were moved to railties, you’d have to add them to the bottom
of the massive Rakefile rails shipped with.


rick
http://techno-weenie.net

On Thu, 2005-12-08 at 19:05 +0100, Dave B. wrote:

Looking over the new directory structure for Rails 0.14.3 generated by
the “rails myproject” command, I noticed a “lib/tasks” directory.
What’s the purpose of the “tasks” directory?

Thanks

This directory is for any custom rake tasks you want to add to your
project. They should be named with a .rake extension, and just contain
the body of the rake task.

For example, a quick one from one of the projects we’re working on:

doc.rake

desc “Generate all documentation for application.”
task :rdoc => [:appdoc, :libdoc, :plugindoc]

To use it, we can just run ‘rake rdoc’ from the commandline, and it will
find it. Note that you specify the name of the task, not necessarily
the name of the file :stuck_out_tongue:

  • Jamie