Add rake task helper for single coop.

This commit is contained in:
benni 2012-12-24 12:50:37 +01:00
parent 2c0fe08be6
commit 9ad77f5256

View file

@ -9,4 +9,12 @@ namespace :multicoops do
end
end
desc 'Runs a specific rake task for a single coop, use rake mutlicoops:run_single db:migrate FOODCOOP=demo'
task :run_single => :environment do
task_to_run = ARGV[1]
FoodsoftConfig.select_foodcoop ENV['FOODCOOP']
puts "Run '#{task_to_run}' for #{ENV['FOODCOOP']}"
Rake::Task[task_to_run].invoke
end
end