Skip to content

Commit f79067b

Browse files
committed
Help Bundler resolve dependencies in CI
1 parent 6c5d548 commit f79067b

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

Gemfile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,23 @@ source "https://rubygems.org"
55
branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
66
gem "solidus", github: "solidusio/solidus", branch: branch
77

8-
group :test do
9-
if branch == 'master' || branch >= "v2.0"
10-
gem 'rails-controller-testing', '~> 1.0'
11-
else
12-
gem "rails_test_params_backport"
13-
end
8+
# Needed to help Bundler figure out how to resolve dependencies,
9+
# otherwise it takes forever to resolve them
10+
if branch == 'master' || Gem::Version.new(branch[1..-1]) >= Gem::Version.new('2.10.0')
11+
gem 'rails', '~> 6.0'
12+
else
13+
gem 'rails', '~> 5.0'
14+
end
1415

15-
gem 'factory_bot', (branch < 'v2.5' ? '4.10.0' : '> 4.10.0')
16+
group :test do
17+
gem 'rails-controller-testing', '~> 1.0'
18+
gem 'factory_bot', '> 4.10.0'
1619
end
1720

18-
if ENV['DB'] == 'mysql'
21+
case ENV['DB']
22+
when 'mysql'
1923
gem 'mysql2', '~> 0.4.10'
20-
else
24+
when 'postgres'
2125
gem 'pg', '~> 0.21'
2226
end
2327

0 commit comments

Comments
 (0)