Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Ruby < 2.3; add support for Ruby 3.3, Rails 7.1 #64

Merged
merged 7 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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