Sha256: d9379aa16f201b1836c422f64cf8da4a82c886d488f7c56fc588f62ec48c98e6

Contents?: true

Size: 954 Bytes

Versions: 1

Compression:

Stored size: 954 Bytes

Contents

namespace :spree do
  desc "Loads admin user and other structural data required by RC.  You must run this task before using RC."
  task :bootstrap => :environment do
    # create the default admin user
    User.create(:login => 'rc_admin',
                :email => 'admin@changeme.com', 
                :salt => '7e3041ebc2fc05a40c60028e2c4901a81035d3cd', 
                :crypted_password => '00742970dc9e6319f8019fd54864d3ea740f04b1',
                :password => 'test', 
                :password_confirmation => 'test')
    
    # create an admin role and and assign the default admin user to the role
    role = Role.create(:name => 'admin')
    user = User.find(1)
    user.roles << role
    user.save!    

    # create some built-in tax treatments to choose from
    TaxTreatment.create(:name => "Non taxable")
    TaxTreatment.create(:name => "U.S. Sales Tax")
    
    puts "RC bootstrap process completed."
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree-0.0.5 starter-app/vendor/plugins/spree/lib/tasks/spree_bootstrap.rake