As you know you can create your own .rake files in lib/tasks and
Rails will automatically find them - as Rake 0.7 adds namespace
support and Rails is already taking advantage of these namespaces if
you are on Edge Rails I thought it would make a lot of sense if Rails
automatically namespaced your own custom rake files, so I raised a
ticket for this and I’ve now implemented it myself and created a patch.
Creating tasks in lib/tasks/foo.rake will make all of your tasks in
that file available in the namespace foo e.g. foo:bar, foo:baz
This is only for people running on Edge Rails - hopefully it will be
included into the core for 1.1.
A word of warning - this of course means that any existing custom
tasks you have will now need to be accessed using the appropriate
namespace. I’m not sure how well this play with capistrano.
http://dev.rubyonrails.org/ticket/4342 for the patch.