What's tasks for under the lib directory


#1

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


#2

On 12/8/05, Dave B. removed_email_address@domain.invalid 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


#3

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