lib/named_seeds/railties/databases.rake in named_seeds-1.0.5 vs lib/named_seeds/railties/databases.rake in named_seeds-1.1.0

- old
+ new

@@ -1,27 +1,14 @@ -namespace :db do +namespace :named_seeds do - namespace :development do - - desc "Run all seeds for development" - task :seed => :environment do - Rake::Task["db:abort_if_pending_migrations"].invoke - Rake::Task["db:seed"].invoke - load NamedSeeds::Railtie.send(:seed_file) - end - + task :setup => :environment do + NamedSeeds::Railtie.setup end - namespace :test do - - desc "Run the seed data from db/test/seeds.rb" - task :seed => :environment do - Rake::Task["db:abort_if_pending_migrations"].invoke - NamedSeeds::Railtie.load_seed - end - + task :prepare do + NamedSeeds::Railtie.prepare end end -task 'db:setup' => 'db:development:seed' -task 'test:prepare' => 'db:test:seed' +Rake::Task['db:setup'].enhance { Rake::Task['named_seeds:setup'].invoke } +Rake::Task['db:test:prepare'].enhance { Rake::Task['named_seeds:prepare'].invoke }