-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
52 lines (41 loc) · 993 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
48
49
50
51
52
require 'rake'
desc "Run specs"
task "spec" => ["test:spec"]
desc "Run specs using RCov"
task "spec:rcov" => ["test:spec:rcov"]
desc "Run ci using SimpleCov"
task "spec:ci" => ["test:spec:ci"]
namespace "bundler" do
desc "Install gems"
task "install" do
sh("bundle install")
end
desc "Install gems for test"
task "install:test" do
sh("bundle install --without development production")
end
desc "Install gems for production"
task "install:production" do
sh("bundle install --without development test")
end
desc "Install gems for development"
task "install:development" do
sh("bundle install --without test production")
end
end
namespace "test" do
def run_spec
sh "nats-server &"
Dir.chdir("spec"){ yield }
sh "pkill -f nats-server"
end
task "spec" do |t|
run_spec{ sh "rake spec" }
end
task "spec:rcov" do |t|
run_spec{ sh "rake simcov" }
end
task "spec:ci" do |t|
run_spec{ sh "rake spec:ci" }
end
end