Skip to content

Commit

Permalink
Merge pull request #4845 from nebulab/waiting-for-dev/remove_ruby_v2.…
Browse files Browse the repository at this point in the history
…5_support

Remove Ruby v2.5 support
  • Loading branch information
waiting-for-dev authored Jan 11, 2023
2 parents 843a9a1 + 1f11c28 commit 2b79f72
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 22 deletions.
14 changes: 2 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,17 +277,7 @@ jobs:
BUILDKITE_ANALYTICS_EXECUTION_NAME_PREFIX: "(<< parameters.ruby >>:<< parameters.rails >>:<< parameters.database >>:<< parameters.paperclip >>)"
steps:
- setup
- when:
condition:
not:
equal: [<<parameters.ruby>>, '2.5']
steps:
- libvips
- when:
condition:
equal: [<<parameters.ruby>>, '2.5']
steps:
- imagemagick
- libvips
- test
- notify

Expand Down Expand Up @@ -356,6 +346,6 @@ workflows:
- test_solidus:
context: slack-secrets
name: *name
matrix: { parameters: { rails: ['5.2'], ruby: ['2.5'], database: ['sqlite'], paperclip: [true] } }
matrix: { parameters: { rails: ['5.2'], ruby: ['2.6'], database: ['sqlite'], paperclip: [true] } }
- dev_tools:
context: slack-secrets
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.5.0'
s.required_ruby_version = '>= 2.6.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.5.0'
s.required_ruby_version = '>= 2.6.0'
s.required_rubygems_version = '>= 1.8.23'

s.add_dependency 'solidus_api', s.version
Expand Down
2 changes: 1 addition & 1 deletion core/app/models/spree/credit_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def cc_type=(type)

# Sets the last digits field based on the assigned credit card number.
def set_last_digits
self.last_digits ||= number.to_s.length <= 4 ? number : number.to_s.slice(-4..-1)
self.last_digits ||= number.to_s.length <= 4 ? number : number.to_s.slice(-4..)
end

# @return [String] the credit card type if it can be determined from the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def build_gem_lines(conservative_versioning)
requirement = if is_local
", path: \"#{d.source.path}\""
elsif is_git
", git: \"#{d.git}\"".yield_self { |g| d.ref ? g + ", ref: \"#{d.ref}\"" : g }
", git: \"#{d.git}\"".then { |g| d.ref ? g + ", ref: \"#{d.ref}\"" : g }
elsif conservative_versioning
", \"#{conservative_version(@definition.specs[d.name][0])}\""
else
Expand Down
2 changes: 1 addition & 1 deletion core/lib/generators/spree/dummy/dummy_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def application_definition
dummy_application_path = File.expand_path("#{dummy_path}/config/application.rb", destination_root)
unless options[:pretend] || !File.exist?(dummy_application_path)
contents = File.read(dummy_application_path)
contents[(contents.index("module #{module_name}"))..-1]
contents[(contents.index("module #{module_name}"))..]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion core/lib/spree/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class GatewayError < RuntimeError; end

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.7")
Spree::Deprecation.warn <<~HEREDOC
Ruby 2.5 & Ruby 2.6 (both EOL) are deprecated and will not be supported anymore from the next Solidus version.
Ruby 2.6, which reached EOL, is deprecated and will not be supported anymore from the next Solidus version.
Please, upgrade to a more recent Ruby version.
Read more on the release notes for different Ruby versions here:
https://www.ruby-lang.org/en/downloads/releases/
Expand Down
2 changes: 1 addition & 1 deletion core/lib/spree/testing_support/factory_bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def self.deprecate_cherry_picking
Spree::Deprecation.warn(
"Please do not cherry-pick factories, this is not well supported by FactoryBot, " \
'follow the changelog instructions on how to migrate your current setup.',
callsites[index..-1]
callsites[index..]
)
end

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.5.0'
s.required_ruby_version = '>= 2.6.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.5.0'
s.required_ruby_version = '>= 2.6.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.5.0'
s.required_ruby_version = '>= 2.6.0'
s.required_rubygems_version = '>= 1.8.23'

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

0 comments on commit 2b79f72

Please sign in to comment.