If you have rake tasks that don't rely on rails, it's really annoying that rails has to load before the tasks runs.
Instead this rakefile only loads rails if a rake task which depends on :environment
is called.
One caveat is that rake -T won't list rails/gem tasks, hence the added warning. To show all tasks use rake -T LOAD_RAILS=1
With thanks to @xshay http://rhnh.net/2010/09/07/speeding-up-rails-rake
Any thoughts?
I like this. I personally have a separate rspec suite for most of my application logic that exists outside of rails -- this is the best implementation of fighting Rails worming its way into your Rakefile that I've seen yet.