Sha256: c42285c376320155ab7daa0bea1f227bb858d1673e4bae661bae1daedfdb32c4
Contents?: true
Size: 1015 Bytes
Versions: 3
Compression:
Stored size: 1015 Bytes
Contents
namespace :kkt_shoppe do desc "Load seed data for the KktShoppe" task :seed => :environment do require File.join(KktShoppe.root, 'db', 'seeds') end desc "Create a default admin user" task :create_default_user => :environment do KktShoppe::User.create(:email_address => 'admin@example.com', :password => 'password', :password_confirmation => 'password', :first_name => 'Default', :last_name => 'Admin') puts puts " New user has been created successfully." puts puts " E-Mail Address..: admin@example.com" puts " Password........: password" puts end desc "Import default set of countries" task :import_countries => :environment do KktShoppe::CountryImporter.import end desc "Run the key setup tasks for a new application" task :setup => :environment do Rake::Task["kkt_shoppe:import_countries"].invoke if KktShoppe::Country.all.empty? Rake::Task["kkt_shoppe:create_default_user"].invoke if KktShoppe::User.all.empty? end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kkt_shoppe-1.1.2 | lib/tasks/kylekthompson_shoppe.rake |
kkt_shoppe-1.1.1 | lib/tasks/kylekthompson_shoppe.rake |
kkt_shoppe-1.1.0 | lib/tasks/kylekthompson_shoppe.rake |