forked from bolshakov/activeadmin_sortable_table
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Appraisals
65 lines (60 loc) · 1.51 KB
/
Appraisals
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
require 'yaml'
ruby_versions = %w(2.5.7 2.6.5)
matrix = [
{
rails_version: '~> 4.2',
activeadmin_versions: ['1.4.3'],
sqlite_version: '< 1.4'
},
{
rails_version: '~> 5.2.3',
activeadmin_versions: %w(2.3.1 2.4.0),
sqlite_version: '< 1.4'
},
{
rails_version: '~> 6.0.0',
activeadmin_versions: %w(2.3.1 2.4.0),
sqlite_version: '>= 1.4'
},
]
matrix.each do |rails_version:, activeadmin_versions:, sqlite_version:|
activeadmin_versions.each do |activeadmin_version|
appraise "rails_#{rails_version}_activeadmin_#{activeadmin_version}" do
gem 'rails', "#{rails_version}"
gem 'activeadmin', "#{activeadmin_version}"
gem 'sqlite3', "#{sqlite_version}"
end
end
end
travis = ::YAML.dump(
'language' => 'ruby',
'matrix' => {
'include' => ruby_versions.flat_map do |ruby_version|
Dir['gemfiles/*.gemfile'].map do |gemfile_name|
{
'rvm' => ruby_version,
'gemfile' => gemfile_name
}
end
end
},
'before_install' => [
'gem uninstall -i $(rvm gemdir)@global -ax bundler || true',
'gem install bundler -v 1.17.3',
],
'env' => 'RAILS_ENV=test',
'install' => 'bundle install --retry=3',
'script' => [
'bundle exec rake dummy:prepare',
'bundle exec rspec',
'bundle exec rubocop',
],
'addons' => {
'code_climate' => {
'repo_token' => '085c9fc58ac3efcd9a8b311ee77bcec0b5c048575cde8a2234f7c63550910969'
}
}
)
::File.open('.travis.yml', 'w+') do |file|
file.write(travis)
end