Skip to content

Commit 2c9139a

Browse files
lazyatomgtd
authored andcommitted
Test against all versions of Rails 5 and Ruby
Later versions of Rails require higher ruby versions; early versions of Ruby can't run recent Rails, and vice versa. This exclusion matrix will get more complicated until we drop some compatibility. Note that in order to avoid having to install a specific version of bundler for each ruby version, we need to constraint the one installed to a verson compatible with Ruby 2.1; the latest bundler on the 1.x branch requires Ruby 2.3 or above. In order to ensure we have the right version of sqlite3 (since a specific version is required by these versions of active record), we define it explicitly in the appraisals file. We can also use this to add minitest for the Rails 3.2 build automatically.
1 parent dad5b1a commit 2c9139a

File tree

9 files changed

+73
-2
lines changed

9 files changed

+73
-2
lines changed

.travis.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,44 @@
11
language: ruby
22
rvm:
3+
- 2.6
4+
- 2.5
5+
- 2.4
6+
- 2.3
37
- 2.2
48
- 2.1
59
cache: bundler
6-
before_install: gem install bundler
10+
before_install: gem install bundler -v 1.16.2
711
gemfile:
812
- gemfiles/rails_3.2.gemfile
913
- gemfiles/rails_4.0.gemfile
1014
- gemfiles/rails_4.1.gemfile
1115
- gemfiles/rails_4.2.gemfile
1216
- gemfiles/rails_5.0.gemfile
17+
- gemfiles/rails_5.1.gemfile
18+
- gemfiles/rails_5.2.gemfile
1319
matrix:
1420
exclude:
1521
- rvm: 2.1
1622
gemfile: gemfiles/rails_5.0.gemfile
23+
- rvm: 2.1
24+
gemfile: gemfiles/rails_5.1.gemfile
25+
- rvm: 2.1
26+
gemfile: gemfiles/rails_5.2.gemfile
27+
- rvm: 2.4
28+
gemfile: gemfiles/rails_3.2.gemfile
29+
- rvm: 2.4
30+
gemfile: gemfiles/rails_4.0.gemfile
31+
- rvm: 2.4
32+
gemfile: gemfiles/rails_4.1.gemfile
33+
- rvm: 2.5
34+
gemfile: gemfiles/rails_3.2.gemfile
35+
- rvm: 2.5
36+
gemfile: gemfiles/rails_4.0.gemfile
37+
- rvm: 2.5
38+
gemfile: gemfiles/rails_4.1.gemfile
39+
- rvm: 2.6
40+
gemfile: gemfiles/rails_3.2.gemfile
41+
- rvm: 2.6
42+
gemfile: gemfiles/rails_4.0.gemfile
43+
- rvm: 2.6
44+
gemfile: gemfiles/rails_4.1.gemfile

Appraisals

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
11
appraise "rails-3.2" do
2+
gem "sqlite3", "~> 1.3.6"
23
gem "activerecord", "~> 3.2.22"
4+
gem "minitest"
35
end
46

57
appraise "rails-4.0" do
8+
gem 'sqlite3', '~> 1.3.6'
69
gem "activerecord", "~> 4.0.13"
710
end
811

912
appraise "rails-4.1" do
13+
gem 'sqlite3', '~> 1.3.6'
1014
gem "activerecord", "~> 4.1.11"
1115
end
1216

1317
appraise "rails-4.2" do
18+
gem 'sqlite3', '~> 1.3.6'
1419
gem "activerecord", "~> 4.2.2"
1520
end
21+
22+
appraise "rails-5.0" do
23+
gem 'sqlite3', '~> 1.3.6'
24+
gem "activerecord", "~> 5.0.0"
25+
end
26+
27+
appraise "rails-5.1" do
28+
gem 'sqlite3', '~> 1.3.6'
29+
gem "activerecord", "~> 5.1.0"
30+
end
31+
32+
appraise "rails-5.2" do
33+
gem 'sqlite3', '~> 1.3.6'
34+
gem "activerecord", "~> 5.2.0"
35+
end

gemfiles/rails_3.2.gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
source "http://www.rubygems.org"
44

55
gem "appraisal"
6+
gem "sqlite3", "~> 1.3.6"
67
gem "activerecord", "~> 3.2.22"
7-
gem 'minitest' # To fix ruby 2.2 + rails 3.2 build
8+
gem "minitest"
89

910
gemspec :path => "../"

gemfiles/rails_4.0.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
source "http://www.rubygems.org"
44

55
gem "appraisal"
6+
gem "sqlite3", "~> 1.3.6"
67
gem "activerecord", "~> 4.0.13"
78

89
gemspec :path => "../"

gemfiles/rails_4.1.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
source "http://www.rubygems.org"
44

55
gem "appraisal"
6+
gem "sqlite3", "~> 1.3.6"
67
gem "activerecord", "~> 4.1.11"
78

89
gemspec :path => "../"

gemfiles/rails_4.2.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
source "http://www.rubygems.org"
44

55
gem "appraisal"
6+
gem "sqlite3", "~> 1.3.6"
67
gem "activerecord", "~> 4.2.2"
78

89
gemspec :path => "../"

gemfiles/rails_5.0.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
source "http://www.rubygems.org"
44

55
gem "appraisal"
6+
gem "sqlite3", "~> 1.3.6"
67
gem "activerecord", "~> 5.0.0"
78

89
gemspec :path => "../"

gemfiles/rails_5.1.gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file was generated by Appraisal
2+
3+
source "http://www.rubygems.org"
4+
5+
gem "appraisal"
6+
gem "sqlite3", "~> 1.3.6"
7+
gem "activerecord", "~> 5.1.0"
8+
9+
gemspec :path => "../"

gemfiles/rails_5.2.gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file was generated by Appraisal
2+
3+
source "http://www.rubygems.org"
4+
5+
gem "appraisal"
6+
gem "sqlite3", "~> 1.3.6"
7+
gem "activerecord", "~> 5.2.0"
8+
9+
gemspec :path => "../"

0 commit comments

Comments
 (0)