Skip to content

Commit 77af695

Browse files
committed
Expand build matrix
Moving our apps to Ruby 2.4 and Rails 5 will take some time. Until that is complete we will have to support several different combinations of versions. This expands the build matrix to help ensure this coverage.
1 parent 172d741 commit 77af695

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.travis.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,13 @@ cache: bundler
44
sudo: false
55
script: bin/rake
66
rvm:
7-
- 2.3.1
7+
- 2.3.3
8+
- 2.4.0
9+
env:
10+
- RAILS_VERSION='~> 5.0.0'
11+
- RAILS_VERSION='~> 4.2.0'
12+
matrix:
13+
include:
14+
- rvm: 2.2.3
15+
env: RAILS_VERSION="4.2.5"
16+
fast_finish: true

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ gemspec
1212

1313
# To use debugger
1414
# gem 'debugger'
15+
16+
rails_dependencies_gemfile = File.expand_path("../Gemfile-rails-dependencies", __FILE__)
17+
eval_gemfile rails_dependencies_gemfile

Gemfile-rails-dependencies

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version_file = File.expand_path("../.rails-version", __FILE__)
2+
version = ENV.fetch('RAILS_VERSION') {
3+
File.read(version_file).chomp if File.exist?(version_file)
4+
}
5+
6+
if version && !version.empty?
7+
gem "rails", version
8+
elsif RUBY_VERSION.to_f < 2.4
9+
gem "rails", "~> 4.2.0"
10+
else
11+
gem "rails", "~> 5.0"
12+
end

0 commit comments

Comments
 (0)