Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Remove ruby 2.7 support

Rafal Cymerysf4c52dd57a3b
diff --git a/.circleci/config.yml b/.circleci/config.yml
index bfacdd2c07..e0f2607336 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -9,50 +9,12 @@ defaults: &defaults
BUNDLE_PATH: ~/spree/vendor/bundle
RAILS_VERSION: '~> 7.0'
working_directory: ~/spree
- docker:
- - image: &ruby_2_7_image circleci/ruby:2.7-node-browsers
- - image: &redis_image circleci/redis:6.2-alpine
-
-defaults_3_2: &defaults_3_2
- <<: *defaults
docker:
- image: &ruby_3_2_image cimg/ruby:3.2.0-browsers
- - image: *redis_image
-
-run_tests_2_7: &run_tests_2_7
- <<: *defaults
- parallelism: 3
- steps:
- - checkout
- - restore_cache:
- keys:
- - spree-bundle-v10-ruby-2-7-{{ .Branch }}
- - spree-bundle-v10-ruby-2-7
- - run:
- name: Add keyserver
- command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
- - run:
- name: Install libvips
- command: sudo apt-get update && sudo apt-get install libvips
- - run:
- name: Ensure Bundle Install
- command: |
- bundle install
- ./bin/build-ci.rb install
- - run:
- name: Run rspec in parallel
- command: ./bin/build-ci.rb test
- - store_artifacts:
- path: /tmp/test-artifacts
- destination: test-artifacts
- - store_artifacts:
- path: /tmp/test-results
- destination: raw-test-output
- - store_test_results:
- path: /tmp/test-results
+ - image: &redis_image circleci/redis:6.2-alpine
run_tests_3_2: &run_tests_3_2
- <<: *defaults_3_2
+ <<: *defaults
parallelism: 3
steps:
- checkout
@@ -81,32 +43,8 @@ run_tests_3_2: &run_tests_3_2
path: /tmp/test-results
jobs:
- bundle_ruby_2_7:
- <<: *defaults
- steps:
- - checkout
- - restore_cache:
- keys:
- - spree-bundle-v10-ruby-2-7-{{ .Branch }}
- - spree-bundle-v10-ruby-2-7
- - run:
- name: Add keyserver
- command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
- - run:
- name: Install libvips
- command: sudo apt-get update && sudo apt-get install libvips
- - run:
- name: Bundle Install
- command: |
- bundle check || bundle install
- ./bin/build-ci.rb install
- - save_cache:
- key: spree-bundle-v10-ruby-2-7-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
- paths:
- - ~/spree/vendor/bundle
-
bundle_ruby_3_2:
- <<: *defaults_3_2
+ <<: *defaults
steps:
- checkout
- restore_cache:
@@ -127,7 +65,7 @@ jobs:
- ~/spree/vendor/bundle
brakeman:
- <<: *defaults_3_2
+ <<: *defaults
steps:
- checkout
- restore_cache:
@@ -152,31 +90,22 @@ jobs:
paths:
- ~/spree/vendor/bundle
- tests_ruby_2_7_rails_7_0_postgres: &tests_ruby_2_7_rails_7_0_postgres
- <<: *run_tests_2_7
+ tests_ruby_3_2_rails_7_0_postgres: &tests_ruby_3_2_rails_7_0_postgres
+ <<: *run_tests_3_2
environment: &postgres_environment
<<: *environment
DB: postgres
DB_HOST: localhost
DB_USERNAME: postgres
docker:
- - image: *ruby_2_7_image
- - image: *redis_image
+ - image: *ruby_3_2_image
- image: &postgres_image circleci/postgres:12-alpine
environment:
POSTGRES_USER: postgres
-
- tests_ruby_3_2_rails_7_0_postgres:
- <<: *run_tests_3_2
- environment:
- <<: *postgres_environment
- docker:
- - image: *ruby_3_2_image
- - image: *postgres_image
- image: *redis_image
- tests_ruby_2_7_rails_6_1_postgres:
- <<: *tests_ruby_2_7_rails_7_0_postgres
+ tests_ruby_3_2_rails_6_1_postgres:
+ <<: *tests_ruby_3_2_rails_7_0_postgres
environment:
<<: *postgres_environment
RAILS_VERSION: '~> 6.1.0'
@@ -262,7 +191,6 @@ workflows:
version: 2
main:
jobs:
- - bundle_ruby_2_7
- bundle_ruby_3_2
- brakeman:
requires:
@@ -270,12 +198,9 @@ workflows:
- tests_ruby_3_2_rails_7_0_postgres:
requires:
- bundle_ruby_3_2
- - tests_ruby_2_7_rails_7_0_postgres:
+ - tests_ruby_3_2_rails_6_1_postgres:
requires:
- - bundle_ruby_2_7
- - tests_ruby_2_7_rails_6_1_postgres:
- requires:
- - bundle_ruby_2_7
+ - bundle_ruby_3_2
- tests_ruby_3_2_rails_7_0_mysql:
requires:
- bundle_ruby_3_2
diff --git a/.codeclimate.yml b/.codeclimate.yml
index 9fb5a5958e..3d29c03a80 100644
--- a/.codeclimate.yml
+++ b/.codeclimate.yml
@@ -15,7 +15,7 @@ plugins:
enabled: false
config:
file: .rubocop.yml
- channel: "rubocop-1-10-0"
+ channel: "rubocop-1-50-3"
exclude_patterns:
- "**/bin/"
- "**/script/"
diff --git a/.rubocop.yml b/.rubocop.yml
index e5f1ed2cd9..a54cc3d3a9 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,7 +1,7 @@
require: rubocop-rspec
AllCops:
- TargetRubyVersion: 2.5
+ TargetRubyVersion: 3.0
Exclude:
- '**/sandbox/**/*'
- '**/db/migrate/*'
diff --git a/api/spree_api.gemspec b/api/spree_api.gemspec
index c110fadd70..87e9e4c0d3 100644
--- a/api/spree_api.gemspec
+++ b/api/spree_api.gemspec
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
'source_code_uri' => "https://github.com/spree/spree/tree/v#{s.version}",
}
- s.required_ruby_version = '>= 2.5'
+ s.required_ruby_version = '>= 3.0'
s.files = `git ls-files`.split($\).reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
diff --git a/cli/lib/spree_cli/templates/extension/.rubocop.yml b/cli/lib/spree_cli/templates/extension/.rubocop.yml
index 73f41725c5..e0959ee25a 100644
--- a/cli/lib/spree_cli/templates/extension/.rubocop.yml
+++ b/cli/lib/spree_cli/templates/extension/.rubocop.yml
@@ -1,6 +1,6 @@
AllCops:
DisplayCopNames: true
- TargetRubyVersion: 2.5
+ TargetRubyVersion: 3.0
Include:
- '**/Gemfile'
- '**/Rakefile'
diff --git a/cli/lib/spree_cli/templates/extension/extension.gemspec b/cli/lib/spree_cli/templates/extension/extension.gemspec
index 0b8e35adcf..4aaba86a30 100644
--- a/cli/lib/spree_cli/templates/extension/extension.gemspec
+++ b/cli/lib/spree_cli/templates/extension/extension.gemspec
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.version = <%= class_name %>.version
s.summary = 'Add extension summary here'
s.description = 'Add (optional) extension description here'
- s.required_ruby_version = '>= 2.5'
+ s.required_ruby_version = '>= 3.0'
s.author = 'You'
s.email = '[email protected]'
diff --git a/core/spree_core.gemspec b/core/spree_core.gemspec
index 4baa729a0b..099a8d979d 100644
--- a/core/spree_core.gemspec
+++ b/core/spree_core.gemspec
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
"source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
}
- s.required_ruby_version = '>= 2.5.0'
+ s.required_ruby_version = '>= 3.0'
s.required_rubygems_version = '>= 1.8.23'
s.files = `git ls-files`.split("\n").reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
diff --git a/emails/spree_emails.gemspec b/emails/spree_emails.gemspec
index f8d5ec137b..dbd53bdcb6 100644
--- a/emails/spree_emails.gemspec
+++ b/emails/spree_emails.gemspec
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
"source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
}
- s.required_ruby_version = '>= 2.5.0'
+ s.required_ruby_version = '>= 3.0'
s.required_rubygems_version = '>= 1.8.23'
s.files = `git ls-files`.split("\n").reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
diff --git a/spree.gemspec b/spree.gemspec
index 0bd053a205..9edfa6a0dc 100644
--- a/spree.gemspec
+++ b/spree.gemspec
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
"source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
}
- s.required_ruby_version = '>= 2.5'
+ s.required_ruby_version = '>= 3.0'
s.files = Dir['README.md', 'lib/**/*']
s.require_path = 'lib'