From 580e812b3552b646b5e0b6dea8733dc4b10b82a9 Mon Sep 17 00:00:00 2001 From: jacobherrington Date: Wed, 3 Oct 2018 05:56:04 -0500 Subject: [PATCH] Fix factory girl dependency for Solidus < 2.5 We need to load a factory_bot version that has factory_girl in it to support Solidus versions < 2.5 This change also includes conditional logic for the database interface gems. --- Gemfile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 47eb04f..1f50a79 100644 --- a/Gemfile +++ b/Gemfile @@ -3,14 +3,26 @@ source 'https://rubygems.org' branch = ENV.fetch('SOLIDUS_BRANCH', 'master') gem 'solidus', github: 'solidusio/solidus', branch: branch -gem 'rails-controller-testing', group: :test +group :test do + gem 'rails-controller-testing' + if branch < "v2.5" + gem 'factory_bot', '4.10.0' + else + gem 'factory_bot', '> 4.10.0' + end +end + if branch == 'master' || branch >= "v2.3" gem 'rails', '~> 5.1.0' # HACK: broken bundler dependency resolution elsif branch >= "v2.0" gem 'rails', '~> 5.0.0' # HACK: broken bundler dependency resolution end -gem 'pg', '~> 0.21' -gem 'mysql2', '~> 0.4.10' + +if ENV['DB'] == 'mysql' + gem 'mysql2', '~> 0.4.10' +else + gem 'pg', '~> 0.21' +end # Provides basic authentication functionality for testing parts of your engine gem 'solidus_auth_devise', '~> 1.0'