-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
77 lines (62 loc) · 1.5 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# frozen_string_literal: true
require 'rake/testtask'
task default: [:test]
Rake::TestTask.new do |t|
t.pattern = 'spec/**/*_spec.rb'
end
desc 'run the tests and profile them'
task :prof do
exec 'ruby-prof --min_percent=1 ./bin/tests/spec.rb 2>/dev/null'
end
desc 'run the tests and print 10 slowest'
task :slowest do
exec './bin/tests/spec.rb --profile 2>/dev/null'
end
desc 'run all the tests, including style and coverage ones'
task :ta do
exec './bin/tests/all.sh'
end
desc 'run all the style tests'
task :style do
exec './bin/tests/all_style.sh'
end
desc 'run coverage and send to coveralls'
task :cov do
exec 'COVERALLS_RUN_LOCALLY=1 rake'
end
desc 'deploy to production'
task :dep do
exec './bin/ops/deploy'
end
desc 'backup production data to local machine'
task :backup do
exec './bin/ops/backup'
end
desc 'copy production data - preserves backup of local data'
task :copy do
exec './bin/ops/copy_production_data'
end
desc 'sync production data - does not preserve local data'
task :sync do
exec './bin/ops/sync_production_data'
end
desc 'sync production data to .app_data_git then commit and push'
task :gitsave do
exec './bin/ops/sync_and_git_save_production_data'
end
desc 'run the server'
task :server do
exec './bin/run_server'
end
desc 'run ./bin/hack if you have one'
task :hack do
exec './bin/hack'
end
desc 'run the tests ten times for timing'
task :time do
exec "
for i in {1..10};
do { time ./bin/tests/spec.rb >/dev/null ; } 2>&1 | grep real
done
"
end