Rails plugin that allows to override exisitng rake tasks
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead of eugenebolshakov:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


OverrideRakeTask plugin by Eugene Bolshakov, eugene.bolshakov@gmail.com, http://www.taknado.com

This plugin is based on the Matthew Bass's idea described here:

The installation script is based on the one found in the app_config plugin
by Daniel Owsianski, http://jarmark.org/projects/app-config/

When using rake with rails it loads tasks in the following order:

1. Default rails tasks (like db:migrate)
2. The tasks in your app's lib/tasks directory
3. The tasks in your vendor/plugins directory

This plugin allows to override and/or extend rake tasks that have been defined earlier. It means that 
you're able to override default rails tasks by putting new ones in lib/tasks and override tasks
defined in lib/tasks by new ones from plugins.

In order to override a task you need to define it using the "override_task" 
method instead of "task". You can also call the original (aliased) task inside the new one:

namespace :db do
  override_task :migrate do
    # To invoke the original task add ":original" to its name

In order to make this work the plugin must be loaded before the tasks and the install script
supplied with the plugin adds a line to load itself to the Rakefile. If can't modify your Rakefile, 
it will let you know and you'll need to modify it manually.

Tested with: Rake 0.8.7, Rails 2.3.5
Doesn't seem to work with Rails 3


* John Wood http://github.com/jwood
* Mark Foster http://github.com/markwfoster