Skip to content

Commit 2b79f72

Browse files
Merge pull request solidusio#4845 from nebulab/waiting-for-dev/remove_ruby_v2.5_support
Remove Ruby v2.5 support
2 parents 843a9a1 + 1f11c28 commit 2b79f72

File tree

11 files changed

+12
-22
lines changed

11 files changed

+12
-22
lines changed

.circleci/config.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -277,17 +277,7 @@ jobs:
277277
BUILDKITE_ANALYTICS_EXECUTION_NAME_PREFIX: "(<< parameters.ruby >>:<< parameters.rails >>:<< parameters.database >>:<< parameters.paperclip >>)"
278278
steps:
279279
- setup
280-
- when:
281-
condition:
282-
not:
283-
equal: [<<parameters.ruby>>, '2.5']
284-
steps:
285-
- libvips
286-
- when:
287-
condition:
288-
equal: [<<parameters.ruby>>, '2.5']
289-
steps:
290-
- imagemagick
280+
- libvips
291281
- test
292282
- notify
293283

@@ -356,6 +346,6 @@ workflows:
356346
- test_solidus:
357347
context: slack-secrets
358348
name: *name
359-
matrix: { parameters: { rails: ['5.2'], ruby: ['2.5'], database: ['sqlite'], paperclip: [true] } }
349+
matrix: { parameters: { rails: ['5.2'], ruby: ['2.6'], database: ['sqlite'], paperclip: [true] } }
360350
- dev_tools:
361351
context: slack-secrets

api/solidus_api.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
2020
f.match(%r{^(spec|script)/})
2121
end
2222

23-
s.required_ruby_version = '>= 2.5.0'
23+
s.required_ruby_version = '>= 2.6.0'
2424
s.required_rubygems_version = '>= 1.8.23'
2525

2626
s.add_dependency 'jbuilder', '~> 2.8'

backend/solidus_backend.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
2020
f.match(%r{^(spec|script)/})
2121
end
2222

23-
s.required_ruby_version = '>= 2.5.0'
23+
s.required_ruby_version = '>= 2.6.0'
2424
s.required_rubygems_version = '>= 1.8.23'
2525

2626
s.add_dependency 'solidus_api', s.version

core/app/models/spree/credit_card.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def cc_type=(type)
9797

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

103103
# @return [String] the credit card type if it can be determined from the

core/lib/generators/solidus/install/app_templates/frontend/break_down_solidus_gem.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def build_gem_lines(conservative_versioning)
1818
requirement = if is_local
1919
", path: \"#{d.source.path}\""
2020
elsif is_git
21-
", git: \"#{d.git}\"".yield_self { |g| d.ref ? g + ", ref: \"#{d.ref}\"" : g }
21+
", git: \"#{d.git}\"".then { |g| d.ref ? g + ", ref: \"#{d.ref}\"" : g }
2222
elsif conservative_versioning
2323
", \"#{conservative_version(@definition.specs[d.name][0])}\""
2424
else

core/lib/generators/spree/dummy/dummy_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def application_definition
120120
dummy_application_path = File.expand_path("#{dummy_path}/config/application.rb", destination_root)
121121
unless options[:pretend] || !File.exist?(dummy_application_path)
122122
contents = File.read(dummy_application_path)
123-
contents[(contents.index("module #{module_name}"))..-1]
123+
contents[(contents.index("module #{module_name}"))..]
124124
end
125125
end
126126
end

core/lib/spree/core.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class GatewayError < RuntimeError; end
8686

8787
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.7")
8888
Spree::Deprecation.warn <<~HEREDOC
89-
Ruby 2.5 & Ruby 2.6 (both EOL) are deprecated and will not be supported anymore from the next Solidus version.
89+
Ruby 2.6, which reached EOL, is deprecated and will not be supported anymore from the next Solidus version.
9090
Please, upgrade to a more recent Ruby version.
9191
Read more on the release notes for different Ruby versions here:
9292
https://www.ruby-lang.org/en/downloads/releases/

core/lib/spree/testing_support/factory_bot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def self.deprecate_cherry_picking
3737
Spree::Deprecation.warn(
3838
"Please do not cherry-pick factories, this is not well supported by FactoryBot, " \
3939
'follow the changelog instructions on how to migrate your current setup.',
40-
callsites[index..-1]
40+
callsites[index..]
4141
)
4242
end
4343

core/solidus_core.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
2020
f.match(%r{^(spec|script)/})
2121
end
2222

23-
s.required_ruby_version = '>= 2.5.0'
23+
s.required_ruby_version = '>= 2.6.0'
2424
s.required_rubygems_version = '>= 1.8.23'
2525

2626
%w[

sample/solidus_sample.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
2020
f.match(%r{^(spec|script)/})
2121
end
2222

23-
s.required_ruby_version = '>= 2.5.0'
23+
s.required_ruby_version = '>= 2.6.0'
2424
s.required_rubygems_version = '>= 1.8.23'
2525

2626
s.add_dependency 'solidus_core', s.version

0 commit comments

Comments
 (0)