From 2300d4a8a4651597479f7802e7ed940c4f061940 Mon Sep 17 00:00:00 2001 From: Connor Ferguson <68167430+cpfergus1@users.noreply.github.com> Date: Wed, 16 Jun 2021 11:33:10 -0600 Subject: [PATCH 1/3] Ruby 2.5 has reached EOL, bump to 2.6 Ruby 2.5 has reached EOL and will no longer recieve any security patches. Bumped version requirements to 2.6 as it is best practiced to use a maintained version of Ruby. Ruby 2.6 EOL slated for March 31, 2022 --- .rubocop.yml | 3 +-- lib/solidus_dev_support/rubocop/config.yml | 2 +- .../templates/extension/extension.gemspec.tt | 2 +- solidus_dev_support.gemspec | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 4cb053cb..18156293 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -42,7 +42,7 @@ Gemspec/DeprecatedAttributeAssignment: Enabled: false AllCops: - TargetRubyVersion: 2.5 + TargetRubyVersion: 2.6 Exclude: - tmp/**/* - "vendor/**/*" @@ -55,4 +55,3 @@ Style/FrozenStringLiteralComment: - "**/bin/*" - "**/exe/*" - "spec/**/*" - diff --git a/lib/solidus_dev_support/rubocop/config.yml b/lib/solidus_dev_support/rubocop/config.yml index ed66061f..972520c6 100644 --- a/lib/solidus_dev_support/rubocop/config.yml +++ b/lib/solidus_dev_support/rubocop/config.yml @@ -1,6 +1,6 @@ require: ["rubocop-rspec", "rubocop-rails", "rubocop-performance"] -AllCops: {TargetRubyVersion: 2.5, Exclude: ["spec/dummy/**/*", "sandbox/**/*", "vendor/**/*"]} +AllCops: {TargetRubyVersion: 2.6, Exclude: ["spec/dummy/**/*", "sandbox/**/*", "vendor/**/*"]} Layout/ArgumentAlignment: {EnforcedStyle: with_fixed_indentation} Layout/DotPosition: {Enabled: false, StyleGuide: "https://relaxed.ruby.style/#layoutdotposition"} diff --git a/lib/solidus_dev_support/templates/extension/extension.gemspec.tt b/lib/solidus_dev_support/templates/extension/extension.gemspec.tt index 1f09acd6..9928c578 100644 --- a/lib/solidus_dev_support/templates/extension/extension.gemspec.tt +++ b/lib/solidus_dev_support/templates/extension/extension.gemspec.tt @@ -17,7 +17,7 @@ Gem::Specification.new do |spec| spec.metadata['source_code_uri'] = '<%= gemspec.metadata["source_code_uri"] %>' spec.metadata['changelog_uri'] = '<%= gemspec.metadata["changelog_uri"] %>' - spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 4') + spec.required_ruby_version = Gem::Requirement.new('>= 2.6', '< 4') # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. diff --git a/solidus_dev_support.gemspec b/solidus_dev_support.gemspec index 0a0e5510..e9778893 100644 --- a/solidus_dev_support.gemspec +++ b/solidus_dev_support.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |spec| spec.metadata['changelog_uri'] = 'https://github.com/solidusio/solidus_dev_support/blob/master/CHANGELOG.md' spec.metadata['rubygems_mfa_required'] = 'true' - spec.required_ruby_version = '>= 2.5.0' + spec.required_ruby_version = '>= 2.6' # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. From 3db95ff9eda55900401d5b4cca6ca4db7c40e7cd Mon Sep 17 00:00:00 2001 From: Connor Ferguson <68167430+cpfergus1@users.noreply.github.com> Date: Wed, 16 Jun 2021 11:36:38 -0600 Subject: [PATCH 2/3] Remove non-required Rails version requirement The bug that this code fixed has been patched in the the latest versions of bundler and is no longer required. --- Gemfile | 3 --- lib/solidus_dev_support/templates/extension/Gemfile | 5 ----- 2 files changed, 8 deletions(-) diff --git a/Gemfile b/Gemfile index 9151647d..eb0159f0 100644 --- a/Gemfile +++ b/Gemfile @@ -10,9 +10,6 @@ gemspec branch = ENV.fetch('SOLIDUS_BRANCH', 'master') gem 'solidus', github: 'solidusio/solidus', branch: branch -# A workaround for https://github.com/bundler/bundler/issues/6677 -gem 'rails', '>0.a' - # These gems will be used by the temporary extensions generated by tests group :test do gem 'mysql2' diff --git a/lib/solidus_dev_support/templates/extension/Gemfile b/lib/solidus_dev_support/templates/extension/Gemfile index 5510b62e..13194bd7 100644 --- a/lib/solidus_dev_support/templates/extension/Gemfile +++ b/lib/solidus_dev_support/templates/extension/Gemfile @@ -10,11 +10,6 @@ gem 'solidus', github: 'solidusio/solidus', branch: branch gem 'solidus_frontend', github: 'solidusio/solidus_frontend' if branch == 'master' gem 'solidus_frontend' if branch >= 'v3.2' # rubocop:disable Bundler/DuplicatedGem -# 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' - # Provides basic authentication functionality for testing parts of your engine gem 'solidus_auth_devise' From c5bcda0dcd737bf01f1686fb49535d8df49a56cc Mon Sep 17 00:00:00 2001 From: Connor Ferguson <68167430+cpfergus1@users.noreply.github.com> Date: Wed, 16 Jun 2021 12:00:15 -0600 Subject: [PATCH 3/3] Update shell command to be more explicit The command `solidus extension .` may not work directly on some machines without `bundle exec`. Updated to be more explicit and prevent possible confusion. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 34f0326b..d2ceecb5 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ If you have an existing extension and want to update it to use the latest standa you can run the following in the extension's directory: ```console -$ solidus extension . +$ bundle exec solidus extension . ``` In case of conflicting files, you will be prompted for an action. You can overwrite the files with