2011-06-14 16:05:12 +00:00
|
|
|
namespace :db do
|
2011-06-17 21:49:32 +00:00
|
|
|
desc 'Imports test data from MusicBrainz database'
|
2011-09-14 16:03:21 +00:00
|
|
|
task :import, [:name, :dry_run] => :environment do |t, argv|
|
|
|
|
if argv[:dry_run].nil? or argv[:dry_run] == "true"
|
|
|
|
argv[:dry_run] = true
|
|
|
|
else
|
|
|
|
argv[:dry_run] = false
|
|
|
|
end
|
|
|
|
unless argv[:name].nil?
|
|
|
|
ImportController.importArtist(argv[:name], argv[:dry_run])
|
2011-06-14 18:06:46 +00:00
|
|
|
end
|
2011-06-14 16:05:12 +00:00
|
|
|
end
|
|
|
|
end
|