Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dependencies in Gemfile #138

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 7 additions & 20 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,22 @@ branch = ENV.fetch('SOLIDUS_BRANCH', 'main')
gem 'solidus', github: 'solidusio/solidus', branch: branch

# The solidus_frontend gem has been pulled out since v3.2
if branch >= 'v3.2'
gem 'solidus_frontend'
elsif branch == 'main'
gem 'solidus_frontend', github: 'solidusio/solidus_frontend', branch: branch
else
gem 'solidus_frontend', github: 'solidusio/solidus', branch: branch
end

# Needed for Rails 7.0
gem 'concurrent-ruby', '< 1.3.5'
gem 'solidus_frontend'

# Needed to help Bundler figure out how to resolve dependencies,
# otherwise it takes forever to resolve them.
# See https://github.com/bundler/bundler/issues/6677
gem 'rails', '>0.a'
rails_requirement_string = ENV.fetch('RAILS_VERSION', '~> 7.0')
gem 'rails', rails_requirement_string

case ENV.fetch('DB', nil)
when 'mysql'
gem 'mysql2'
when 'postgresql'
gem 'pg'
else
gem 'sqlite3', '~> 1.4'
end
rails_version = Gem::Requirement.new(rails_requirement_string).requirements[0][1]
sqlite_version = rails_version < Gem::Version.new(7.2) ? "~> 1.4" : "~> 2.0"

# While we still support Ruby < 3 we need to workaround a limitation in
# the 'async' gem that relies on the latest ruby, since RubyGems doesn't
# resolve gems based on the required ruby version.
gem 'async', '< 3' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3')
gem 'sqlite3', sqlite_version
end

gemspec

Expand Down