11# frozen_string_literal: true
22
3- source ' https://rubygems.org'
3+ source " https://rubygems.org"
44git_source ( :github ) { |repo | "https://github.com/#{ repo } .git" }
55
6- branch = ENV . fetch ( 'SOLIDUS_BRANCH' , 'master' )
7- solidus_git , solidus_frontend_git = if ( branch == 'master' ) || ( branch >= 'v3.2' )
8- %w[ solidusio/solidus solidusio/solidus_frontend ]
9- else
10- %w[ solidusio/solidus ] * 2
11- end
12- gem 'solidus' , github : solidus_git , branch : branch
13- gem 'solidus_frontend' , github : solidus_frontend_git , branch : branch
6+ branch = ENV . fetch "SOLIDUS_BRANCH" , "main"
7+
8+ gem "solidus" , github : "solidusio/solidus" , branch : branch
9+
10+ # The `solidus_frontend` gem is deprecated and isn't expected to have major
11+ # version updates after v3.2.
12+ if branch >= "v3.2"
13+ gem "solidus_frontend"
14+ elsif branch == "main"
15+ gem "solidus_frontend" , github : "solidusio/solidus_frontend" , branch : branch
16+ else
17+ gem "solidus_frontend" , github : "solidusio/solidus" , branch : branch
18+ end
1419
1520# Needed to help Bundler figure out how to resolve dependencies,
1621# otherwise it takes forever to resolve them.
1722# See https://github.com/bundler/bundler/issues/6677
18- gem 'rails' , '~> 6.0'
23+ rails_requirement_string = ENV . fetch ( "RAILS_VERSION" , "~> 8.0" )
24+ gem "rails" , rails_requirement_string
1925
2026# Provides basic authentication functionality for testing parts of your engine
21- gem ' solidus_auth_devise'
27+ gem " solidus_auth_devise"
2228
23- case ENV [ 'DB' ]
24- when ' mysql'
25- gem ' mysql2'
26- when ' postgresql'
27- gem 'pg'
29+ case ENV [ "DB" ]
30+ when " mysql"
31+ gem " mysql2"
32+ when " postgresql"
33+ gem "pg"
2834else
29- gem 'sqlite3'
35+ rails_version = Gem ::Requirement . new ( rails_requirement_string ) . requirements [ 0 ] [ 1 ]
36+ sqlite_version = ( rails_version < Gem ::Version . new ( 7.2 ) ) ? "~> 1.4" : "~> 2.0"
37+
38+ gem "sqlite3" , sqlite_version
3039end
3140
3241gemspec
@@ -36,4 +45,4 @@ gemspec
3645#
3746# We use `send` instead of calling `eval_gemfile` to work around an issue with
3847# how Dependabot parses projects: https://github.com/dependabot/dependabot-core/issues/1658.
39- send ( :eval_gemfile , ' Gemfile-local' ) if File . exist? ' Gemfile-local'
48+ send ( :eval_gemfile , " Gemfile-local" ) if File . exist? " Gemfile-local"
0 commit comments