-
Notifications
You must be signed in to change notification settings - Fork 7
/
Rakefile
31 lines (24 loc) · 798 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$LOAD_PATH.unshift 'lib'
require 'rake'
require 'resque/tasks'
task :environment, :env do |cmd, args|
ENV["RACK_ENV"] ||= args[:env] || "development"
require 'crowdring'
end
namespace :db do
desc "Create database, env symbol are in [development, test, production]."
task :migrate, :env do |cmd, args|
env = args[:env] || "development"
Rake::Task['environment'].invoke(env)
DataMapper.repository.auto_migrate!
end
task :update, :env do |cmd, args|
env = args[:env] || "development"
Rake::Task['environment'].invoke(env)
DataMapper.repository.auto_upgrade!
User.set(
email: ENV["ADMIN_EMAIL"] || 'frodo@crowdring.org',
password: ENV["ADMIN_PASSWORD"] || 'gAnd0lf',
password_confirmation: ENV["ADMIN_PASSWORD"] || 'gAnd0lf')
end
end