Skip to content

Commit

Permalink
Bump the minimum ruby version to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Apr 24, 2023
1 parent ad170fd commit 8ffe3d1
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ executors:
parameters: &parameters
ruby:
type: string
default: "2.7"
default: "3.0"
working_directory: &workdir ~/solidus
environment: &environment
DEFAULT_MAX_WAIT_TIME: 10
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AllCops:
- '*/spec/dummy/**/*'
- 'sandbox/**/*'
- '**/templates/**/*'
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0

# Sometimes I believe this reads better
# This also causes spacing issues on multi-line fixes
Expand Down
20 changes: 0 additions & 20 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,6 @@ gem 'i18n-tasks', '~> 0.9', require: false
gem 'factory_bot_rails', '>= 4.8', require: false

group :backend do
# 'net/http' is required by 'capybara/server', triggering
# a few "already initialized constant" warnings when loaded
# from default gems. See:
# - https://github.com/ruby/net-protocol/issues/10
# - https://stackoverflow.com/a/72474475
v = ->(string) { Gem::Version.new(string) }
if Gem::Requirement.new(['>= 2.7', '< 3']) === Gem::Version.new(RUBY_VERSION)
gem 'net-http', require: false
end


if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3')
# Need to explicitly declare gems when using ruby 3.0 with older versions of rails. Can be removed when mail 2.8.0 is released.
# - https://bugs.ruby-lang.org/issues/17873
# - https://stackoverflow.com/a/72474475
gem 'net-smtp', require: false
gem 'net-imap', require: false
gem 'net-pop', require: false
end

gem 'capybara', '~> 3.13', require: false
gem 'capybara-screenshot', '>= 1.0.18', require: false
gem 'selenium-webdriver', require: false
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Wait for all the gems to be installed (progress can be checked through `docker-c
You can provide the ruby version you want your image to use:

```bash
docker-compose build --build-arg RUBY_VERSION=2.7 app
docker-compose build --build-arg RUBY_VERSION=3.0 app
docker-compose up -d
```

Expand Down
2 changes: 1 addition & 1 deletion api/solidus_api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
f.match(%r{^(spec|script)/})
end

s.required_ruby_version = '>= 2.7.0'
s.required_ruby_version = '>= 3.0.0'
s.required_rubygems_version = '>= 1.8.23'

s.add_dependency 'jbuilder', '~> 2.8'
Expand Down
2 changes: 1 addition & 1 deletion backend/solidus_backend.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
f.match(%r{^(spec|script)/})
end

s.required_ruby_version = '>= 2.7.0'
s.required_ruby_version = '>= 3.0.0'
s.required_rubygems_version = '>= 1.8.23'

s.add_dependency 'solidus_api', s.version
Expand Down
2 changes: 1 addition & 1 deletion core/solidus_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
f.match(%r{^(spec|script)/})
end

s.required_ruby_version = '>= 2.7.0'
s.required_ruby_version = '>= 3.0.0'
s.required_rubygems_version = '>= 1.8.23'

%w[
Expand Down
2 changes: 1 addition & 1 deletion sample/solidus_sample.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
f.match(%r{^(spec|script)/})
end

s.required_ruby_version = '>= 2.7.0'
s.required_ruby_version = '>= 3.0.0'
s.required_rubygems_version = '>= 1.8.23'

s.add_dependency 'solidus_core', s.version
Expand Down
2 changes: 1 addition & 1 deletion solidus.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |s|

s.files = Dir['README.md', 'lib/**/*']

s.required_ruby_version = '>= 2.7.0'
s.required_ruby_version = '>= 3.0.0'
s.required_rubygems_version = '>= 1.8.23'

s.add_dependency 'solidus_api', s.version
Expand Down

0 comments on commit 8ffe3d1

Please sign in to comment.