Sha256: 2d063dc91d14ccfc8e5f3e7e4fbb05fd669152270b0ec979769d338293a6739b

Contents?: true

Size: 984 Bytes

Versions: 21

Compression:

Stored size: 984 Bytes

Contents

namespace :shoppe do
  desc "Load seed data for the Shoppe"
  task :seed => :environment do
    require File.join(Shoppe.root, 'db', 'seeds')
  end
  
  desc "Create a default admin user"
  task :create_default_user => :environment do
    Shoppe::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
    Shoppe::CountryImporter.import
  end
  
  desc "Run the key setup tasks for a new application"
  task :setup => :environment do
    Rake::Task["shoppe:import_countries"].invoke    if Shoppe::Country.all.empty?
    Rake::Task["shoppe:create_default_user"].invoke if Shoppe::User.all.empty?
  end
  
end

Version data entries

21 entries across 21 versions & 3 rubygems

Version Path
shoppe-1.0.8 lib/tasks/shoppe.rake
kylekthompson-shoppe-1.0.7 lib/tasks/shoppe.rake
shoppe-1.0.7 lib/tasks/shoppe.rake
shoppe-1.0.6 lib/tasks/shoppe.rake
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/shoppe-1.0.5/lib/tasks/shoppe.rake
shoppe-1.0.5 lib/tasks/shoppe.rake
shoppe-1.0.3 lib/tasks/shoppe.rake
shoppe-1.0.2 lib/tasks/shoppe.rake
shoppe-1.0.1 lib/tasks/shoppe.rake
shoppe-1.0.0 lib/tasks/shoppe.rake
shoppe-0.0.21 lib/tasks/shoppe.rake
shoppe-0.0.20 lib/tasks/shoppe.rake
shoppe-0.0.19 lib/tasks/shoppe.rake
shoppe-0.0.18 lib/tasks/shoppe.rake
shoppe-0.0.17 lib/tasks/shoppe.rake
shoppe-0.0.16 lib/tasks/shoppe.rake
shoppe-0.0.15 lib/tasks/shoppe.rake
shoppe-0.0.14 lib/tasks/shoppe.rake
shoppe-0.0.13 lib/tasks/shoppe.rake
shoppe-0.0.12 lib/tasks/shoppe.rake