34 lines
560 B
Ruby
34 lines
560 B
Ruby
|
|
|
||
|
|
Rails.logger = Logger.new(STDOUT)
|
||
|
|
|
||
|
|
namespace :guitarcenter do
|
||
|
|
|
||
|
|
task init: :environment do |task, args|
|
||
|
|
|
||
|
|
GuitarCenter.init
|
||
|
|
end
|
||
|
|
|
||
|
|
task bootstrap_teacher: :environment do |task, args|
|
||
|
|
|
||
|
|
email = ENV['EMAIL']
|
||
|
|
|
||
|
|
if email.nil? || email == ''
|
||
|
|
raise 'no email ENV specified'
|
||
|
|
end
|
||
|
|
|
||
|
|
GuitarCenter.bootstrap_teacher(email)
|
||
|
|
end
|
||
|
|
|
||
|
|
task bootstrap_user: :environment do |task, args|
|
||
|
|
|
||
|
|
email = ENV['EMAIL']
|
||
|
|
|
||
|
|
if email.nil? || email == ''
|
||
|
|
raise 'no email ENV specified'
|
||
|
|
end
|
||
|
|
|
||
|
|
GuitarCenter.bootstrap_user(email, true)
|
||
|
|
end
|
||
|
|
|
||
|
|
end
|