From c4cfd1b4f82b0a9770c47c5ad021b2075d92731f Mon Sep 17 00:00:00 2001 From: Chris LaRose Date: Sun, 13 Feb 2022 12:20:01 -0800 Subject: [PATCH] Require Ruby version 2.6 or greater Older versions are EOL'd --- .github/workflows/tests.yml | 2 -- Appraisals | 36 +++++++++++++----------------------- README.md | 4 +++- config.gemspec | 2 +- 4 files changed, 17 insertions(+), 27 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fb57915c..b9b6c9f4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,8 +17,6 @@ jobs: fail-fast: false matrix: ruby: - - 2.4 - - 2.5 - 2.6 - 2.7 - jruby diff --git a/Appraisals b/Appraisals index f4325aa1..30b1d35e 100644 --- a/Appraisals +++ b/Appraisals @@ -36,32 +36,22 @@ appraise 'rails-5.2' do gem 'sqlite3', '< 1.4.0', platform: :ruby end -# Rails 6.x requires Ruby >= 2.5.0 -if (RUBY_ENGINE == 'ruby' && RUBY_VERSION >= '2.5.0') || RUBY_ENGINE != 'ruby' - appraise 'rails-6.0' do - gem 'activerecord-jdbcsqlite3-adapter', '~> 60.1', platform: :jruby - gem 'bootsnap', '~> 1.4' - gem 'rails', '6.0.3.1' - gem 'rspec-rails', '~> 3.7' - gem 'sqlite3', '~> 1.4.0', platform: :ruby - end -else - puts 'Skipping rails-6.0 for Ruby < 2.5' +appraise 'rails-6.0' do + gem 'activerecord-jdbcsqlite3-adapter', '~> 60.1', platform: :jruby + gem 'bootsnap', '~> 1.4' + gem 'rails', '6.0.3.1' + gem 'rspec-rails', '~> 3.7' + gem 'sqlite3', '~> 1.4.0', platform: :ruby end # Test rails 6.1 with psych >= 4 -# Rails 6.x requires Ruby >= 2.5.0 -if (RUBY_ENGINE == 'ruby' && RUBY_VERSION >= '2.5.0') || RUBY_ENGINE != 'ruby' - appraise 'rails-6.1' do - gem 'activerecord-jdbcsqlite3-adapter', '~> 61.1', platform: :jruby - gem 'bootsnap', '>= 1.4.4' - gem 'rails', '6.1.4' - gem 'rspec-rails', '~> 5.0' - gem 'sqlite3', '~> 1.4', platform: :ruby - gem 'psych', '>= 4' - end -else - puts 'Skipping rails-6.1 for Ruby < 2.5' +appraise 'rails-6.1' do + gem 'activerecord-jdbcsqlite3-adapter', '~> 61.1', platform: :jruby + gem 'bootsnap', '>= 1.4.4' + gem 'rails', '6.1.4' + gem 'rspec-rails', '~> 5.0' + gem 'sqlite3', '~> 1.4', platform: :ruby + gem 'psych', '>= 4' end appraise 'sinatra' do diff --git a/README.md b/README.md index 50bfc57e..ec11bf3e 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Config helps you easily manage environment specific settings in an easy and usab Current version supports and is [tested](.github/workflows/tests.yml#L19) for the following interpreters and frameworks: * Interpreters - * [Ruby](https://www.ruby-lang.org) `>= 2.4` + * [Ruby](https://www.ruby-lang.org) `>= 2.6` * [JRuby](https://www.jruby.org) `>= 9.2` * [TruffleRuby](https://github.com/oracle/truffleruby) `>= 19.3` * Application frameworks @@ -34,6 +34,8 @@ Current version supports and is [tested](.github/workflows/tests.yml#L19) for th For Ruby `2.0` to `2.3` or Rails `3` to `4.1` use version `1.x` of this gem. For older versions of Rails or Ruby use [AppConfig](http://github.com/fredwu/app_config). +For Ruby `2.4` or `2.5`, use version `3.x` of this gem. + ## Installing ### Installing on Rails diff --git a/config.gemspec b/config.gemspec index d59ced0c..4c9d1eef 100644 --- a/config.gemspec +++ b/config.gemspec @@ -24,7 +24,7 @@ Donate: \e[34mhttps://opencollective.com/rubyconfig/donate\e[0m\n" s.files.select! { |file| /(^lib\/|^\w+.md$|\.gemspec$)/ =~ file } s.require_paths = ['lib'] - s.required_ruby_version = '>= 2.4.0' + s.required_ruby_version = '>= 2.6.0' s.add_dependency 'deep_merge', '~> 1.2', '>= 1.2.1' s.add_dependency 'dry-validation', '~> 1.0', '>= 1.0.0'