Rake :needs deprecated
Recently I updated rake on a project and was met with this warning:
WARNING: ‘task :t, arg, :needs => [deps]‘ is deprecated. Please use ‘task :t, [args] => [deps]‘ instead.
It wasn’t immediately obvious to me what exactly the needed change was, and much googling didn’t reveal anything helpful. However blind poking about did. Turns out it means one should change this:
task :staging, :post, :needs => :environment do |t, args|
to this:
task :staging, [:post] => :environment do |t, args|