forked from makandra/active_type
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
36 lines (29 loc) · 691 Bytes
/
Rakefile
File metadata and controls
36 lines (29 loc) · 691 Bytes
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
require 'rake'
require 'bundler/gem_tasks'
desc 'Default: Run all specs.'
task :default => 'all:spec'
namespace :all do
desc "Run specs on all versions"
task :spec do
success = true
for_each_gemfile do
success &= system("bundle exec rspec spec")
end
fail "Tests failed" unless success
end
desc "Bundle all versions"
task :bundle do
for_each_gemfile do
system('bundle install')
end
end
end
def for_each_gemfile
version = ENV['VERSION'] || '*'
Dir["gemfiles/Gemfile.#{version}"].sort.each do |gemfile|
next if gemfile =~ /.lock/
puts '', "\033[44m#{gemfile}\033[0m", ''
ENV['BUNDLE_GEMFILE'] = gemfile
yield
end
end