Skip to content

Commit

Permalink
Drop support for Ruby < 2.3; add support for Ruby 3.3, Rails 7.1 (#64)
Browse files Browse the repository at this point in the history
* Remove action support for ruby < 2.3

* bump to 8.0.0

* Add support for ruby 3.3, rails 7.1

* Update action matrix with rails 7.1 compat

* Update ruby compat matrix

* Update README according to action results

* Remove commented out code

---------

Co-authored-by: Morgan Brown <[email protected]>
  • Loading branch information
mhgbrown and Morgan Brown authored May 8, 2024
1 parent 1596721 commit a2d1b33
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 38 deletions.
44 changes: 19 additions & 25 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,11 @@ jobs:

strategy:
matrix:
ruby-version: ['1.9', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
rails-version: ['4.2', '5.0', '5.1', '6.0', '6.1', '7.0']
ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
rails-version: ['4.2', '5.0', '5.1', '6.0', '6.1', '7.0', '7.1']
exclude:
# Segmentation faults during tests, but should work?
- ruby-version: '2.2'
rails-version: '5.0'
- ruby-version: '2.2'
rails-version: '5.1'
# Too old
- ruby-version: '1.9'
rails-version: '5.0'
- ruby-version: '1.9'
rails-version: '5.1'
- ruby-version: '1.9'
rails-version: '6.0'
- ruby-version: '1.9'
rails-version: '6.1'
- ruby-version: '1.9'
rails-version: '7.0'
# activesupport (~> 6.0.0) was resolved to 6.0.6.1, which depends on ruby (>= 2.5.0)
# activesupport (~> 6.1.0) was resolved to 6.1.7.2, which depends on ruby (>= 2.5.0)
- ruby-version: '2.2'
rails-version: '6.0'
- ruby-version: '2.2'
rails-version: '6.1'
- ruby-version: '2.3'
rails-version: '6.0'
- ruby-version: '2.3'
Expand All @@ -53,8 +33,6 @@ jobs:
- ruby-version: '2.4'
rails-version: '6.1'
# activesupport (~> 7.0.0) was resolved to 7.0.4.2, which depends on Ruby (>= 2.7.0)
- ruby-version: '2.2'
rails-version: '7.0'
- ruby-version: '2.3'
rails-version: '7.0'
- ruby-version: '2.4'
Expand Down Expand Up @@ -87,9 +65,25 @@ jobs:
rails-version: '5.0'
- ruby-version: '3.2'
rails-version: '5.1'
# rails (~> 7.1.0) was resolved to 7.1.3.2, which depends on Ruby (>= 2.7.0)
- ruby-version: '2.3'
rails-version: '7.1'
- ruby-version: '2.4'
rails-version: '7.1'
- ruby-version: '2.5'
rails-version: '7.1'
- ruby-version: '2.6'
rails-version: '7.1'
# Because rails >= 4.0.0.beta1, < 5.0.5.rc1 depends on bundler >= 1.3.0, < 2.0
# and the current Bundler version (2.5.9) does not satisfy bundler >= 1.3.0, < 2.0,
# rails >= 4.0.0.beta1, < 5.0.5.rc1 cannot be used.
# So, because Gemfile depends on rails ~> 4.2.0,
# version solving has failed.
- ruby-version: '3.3'
rails-version: '4.2'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ when "6.1"
eval_gemfile('../gemfiles/6.1.gemfile')
when "7.0"
eval_gemfile('../gemfiles/7.0.gemfile')
when "7.1"
eval_gemfile('../gemfiles/7.1.gemfile')
else
puts "\e[93mNo TEST_RAILS_VERSION present, letting dependency manager decide what's best.\e[0m" if ENV['DEBUG']
end
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ gem install cached_resource

CachedResource is designed to be framework agnostic, but will hook into Rails for caching and logging if available. CachedResource supports the following ActiveSupport/Rails (right) and Ruby (down) version combinations:

| | πŸ›€οΈ 4.2 | πŸ›€οΈ 5.0 | πŸ›€οΈ 5.1 | πŸ›€οΈ 6.0 | πŸ›€οΈ 6.1 | πŸ›€οΈ 7.0 |
|-------|-----|-----|-----|-----|-----|-----|
| πŸ’Ž 1.9 | βœ… | | | | | |
| πŸ’Ž 2.2 | βœ… | | | | | |
| πŸ’Ž 2.3 | βœ… | βœ… | βœ… | | | |
| πŸ’Ž 2.4 | βœ… | βœ… | βœ… | | | |
| πŸ’Ž 2.5 | βœ… | βœ… | βœ… | βœ… | βœ… | |
| πŸ’Ž 2.6 | βœ… | βœ… | βœ… | βœ… | βœ… | |
| πŸ’Ž 2.7 | | βœ… | βœ… | βœ… | βœ… | βœ… |
| πŸ’Ž 3.0 | | | | βœ… | βœ… | βœ… |
| πŸ’Ž 3.1 | | | | βœ… | βœ… | βœ… |
| πŸ’Ž 3.2 | | | | βœ… | βœ… | βœ… |
| | πŸ›€οΈ 4.2 | πŸ›€οΈ 5.0 | πŸ›€οΈ 5.1 | πŸ›€οΈ 6.0 | πŸ›€οΈ 6.1 | πŸ›€οΈ 7.0 | πŸ›€οΈ 7.1 |
|-------|-----|-----|-----|-----|-----|-----|-----|
| πŸ’Ž 2.3 | βœ… | βœ… | βœ… | | | | |
| πŸ’Ž 2.4 | βœ… | βœ… | βœ… | | | | |
| πŸ’Ž 2.5 | βœ… | βœ… | βœ… | βœ… | βœ… | | |
| πŸ’Ž 2.6 | βœ… | βœ… | βœ… | βœ… | βœ… | |
| πŸ’Ž 2.7 | | βœ… | βœ… | βœ… | βœ… | βœ… |βœ… |
| πŸ’Ž 3.0 | | | | βœ… | βœ… | βœ… | βœ… |
| πŸ’Ž 3.1 | | | | βœ… | βœ… | βœ… | βœ… |
| πŸ’Ž 3.2 | | | | βœ… | βœ… | βœ… | βœ… |
| πŸ’Ž 3.3 | | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… |

## Limitations

Expand Down
3 changes: 3 additions & 0 deletions gemfiles/7.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "http://rubygems.org"

gem "rails", "~> 7.1.0"
2 changes: 1 addition & 1 deletion lib/cached_resource/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module CachedResource
VERSION = "7.2.0"
VERSION = "8.0.0"
end

0 comments on commit a2d1b33

Please sign in to comment.