-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
47 lines (38 loc) · 832 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
35
36
37
38
39
40
41
42
43
44
45
46
47
require 'rubygems'
require 'rake'
require 'yaml'
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/app')
require 'boot'
task :default do
ENV['RACK_ENV'] = 'test'
Rake::Task['test'].invoke
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
task :environment do
require 'lib/play'
require "bundler/setup"
end
desc "Run tests as CI sees them"
task :ci do
ENV['CI'] = '1'
Rake::Task['test'].invoke
end
desc "Open an irb session preloaded with this library"
task :console do
sh "irb -rubygems -r ./app/boot"
end
desc "Start the server"
task :start do
Kernel.exec "bundle exec foreman start"
end
namespace :redis do
desc "Wipe all data in redis"
task :reset do
$redis.flushdb
end
end