Skip to content

Commit 803849b

Browse files
authored
Merge pull request #2191 from rspec/fix-other-builds
Update the default version of rails used in builds
2 parents 8958424 + 4a8e0f9 commit 803849b

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

Gemfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,19 @@ platforms :jruby do
2121
end
2222

2323
RAILS_VERSION ||= ""
24-
match = /(\d+)(\.|-)(\d+)/.match(RAILS_VERSION)
25-
if match.nil?
26-
# will be nil if master
24+
case RAILS_VERSION
25+
when /master/
2726
MAJOR = 6
2827
MINOR = 0
28+
when /stable/
29+
MAJOR = 6
30+
MINOR = 0
31+
when nil, false, ""
32+
MAJOR = 5
33+
MINOR = 1
2934
else
30-
MAJOR,MINOR = match.captures.map(&:to_i).compact
35+
match = /(\d+)(\.|-)(\d+)/.match(RAILS_VERSION)
36+
MAJOR, MINOR = match.captures.map(&:to_i).compact
3137
end
3238

3339
if MAJOR >= 6

Gemfile-rails-dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ when /stable$/
2525
gem rails_gem, :git => "https://github.com/rails/rails.git", :branch => version
2626
end
2727
when nil, false, ""
28-
gem "rails", "~> 5.0.0"
28+
gem "rails", "~> 5.1.0"
2929
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
3030
else
3131
gem "rails", version

0 commit comments

Comments
 (0)