Skip to content

Commit

Permalink
Require Ruby version 2.6 or greater
Browse files Browse the repository at this point in the history
Older versions are EOL'd
  • Loading branch information
cjlarose committed Feb 13, 2022
1 parent 2af39fe commit c4cfd1b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 27 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
fail-fast: false
matrix:
ruby:
- 2.4
- 2.5
- 2.6
- 2.7
- jruby
Expand Down
36 changes: 13 additions & 23 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit c4cfd1b

Please sign in to comment.