-
Notifications
You must be signed in to change notification settings - Fork 127
/
Rakefile
45 lines (38 loc) · 878 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
task :default => :test
require "bundler/gem_tasks"
desc "Run unit tests."
task :test do
ruby "test.rb"
end
rails_versions = %w(
6.1
7.0
7.1
)
rails_versions.each do |version|
dotless = version.delete('.')
namespace :bundle do
desc "Bundle with Rails #{version}.x"
task :"rails#{dotless}" do
ENV['BUNDLE_GEMFILE'] = "gemfiles/rails_#{dotless}.gemfile"
sh "bundle"
end
end
namespace :test do
desc "Test with Rails #{version}.x"
task :"rails#{dotless}" do
ENV['BUNDLE_GEMFILE'] = "gemfiles/rails_#{dotless}.gemfile"
ruby "test.rb"
end
end
end
namespace :test do
desc "Test with all supported Rails versions"
task :railsall do
rails_versions.each do |version|
dotless = version.delete('.')
ENV['BUNDLE_GEMFILE'] = "gemfiles/rails_#{dotless}.gemfile"
ruby "test.rb"
end
end
end