rails/rails — pull request #3350 by whilefalse (2011-10-17 15:28:54+00:00)
Title: Added environment rake task to engines

Some gems/plugins require the rake :environment task to load the rails stack to do their stuff, but this isn't available in engines.

In the past I have fixed this by modifying things to check if :environment exists as a task, and if not use app:environment.

I think it makes sense however to fix this in one place - gems shouldn't have to worry about whether they are being used by an engine or not as much as possible.

I couldn't find any tests for this - please direct me to them if I've missed it and I'll add a test.