-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
64 lines (53 loc) · 1.15 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
task :default => "test:all"
task :build do
ENV['EXCEPTIONER_BUILD'] = '1'
end
module TaskUtils
extend self
def run_tests(path)
system("cd #{path} && rake test")
end
def build(path)
system("cd #{path} && rake build")
end
def install_deps(path)
system("cd #{path} && bundle install")
end
def each_gem(action, paths = all_paths, &block)
all_paths.each do |path|
puts action
name = File.basename(path)
block.call(name, path)
end
end
def all_paths
Dir[File.join(File.dirname(__FILE__), 'exceptioner-*')]
end
end
namespace :dependencies do
desc "Install all dependencies"
task :install do
TaskUtils.each_gem("Installing dependencies...") do |name, path|
puts name
TaskUtils.install_deps(path)
end
end
end
namespace :build do
desc "Builds all gems"
task :all => :build do
TaskUtils.each_gem("Building...") do |name, path|
puts name
TaskUtils.build(path)
end
end
end
namespace :test do
desc "Run all exceptioner tests"
task :all do
TaskUtils.each_gem("Running tests...") do |name, path|
puts name
TaskUtils.run_tests(path)
end
end
end