-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
34 lines (29 loc) · 881 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
32
33
34
namespace :db do
desc "Migrate the database"
task(:migrate => :environment) do
require 'logger'
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Migration.verbose = true
ActiveRecord::Migrator.migrate("db/migrate")
end
task(:rollback => :environment) do
require 'logger'
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Migration.verbose = true
ActiveRecord::Migrator.rollback('db/migrate')
end
end
desc 'Runs cucumber features for this project'
task :cucumber do
exec "cucumber features"
end
desc 'Loads up this project\'s environment'
task :environment do
require File.join(File.dirname(__FILE__), 'environment')
end
desc 'Runs irb in this project\'s context'
task :irb do |t|
exec "irb -I lib -r '#{File.join(File.dirname(__FILE__), 'environment')}'"
end
desc 'Alias for irb'
task :console => :irb