Skip to content

Commit

Permalink
Rails 8 support (#49)
Browse files Browse the repository at this point in the history
This PR runs our test suite against Rails 8 on CI.

There was only one major change. `ActiveSupport::ProxyObject` was
deprecated in 7.2 and removed in 8.0.
  • Loading branch information
rzane authored Jan 15, 2025
1 parent c8ac357 commit a8b6c9c
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 69 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,26 @@ jobs:
- gemfiles/rails_7_0.gemfile
- gemfiles/rails_7_1.gemfile
- gemfiles/rails_7_2.gemfile
- gemfiles/rails_8_0.gemfile
exclude:
- ruby: '3.2'
gemfile: gemfiles/rails_5_2.gemfile
- ruby: '3.1'
gemfile: gemfiles/rails_8_0.gemfile
- ruby: '3.1'
gemfile: gemfiles/rails_5_2.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_7_2.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_8_0.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_5_2.gemfile
- ruby: '2.7'
gemfile: gemfiles/rails_8_0.gemfile
- ruby: '2.7'
gemfile: gemfiles/rails_7_2.gemfile
- ruby: '2.7'
gemfile: gemfiles/rails_7_1.gemfile
- ruby: '2.6'
gemfile: gemfiles/rails_7_1.gemfile
- ruby: '2.6'
gemfile: gemfiles/rails_7_0.gemfile
services:
postgres:
image: postgres
Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ inherit_mode:
AllCops:
TargetRubyVersion: 2.6
Exclude:
- 'gemfiles/*.gemfile'
- 'lib/generators/delayed/templates/*.rb'
NewCops: enable

Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.3
3.2.3
14 changes: 14 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,49 @@ appraise 'rails-5-2' do
gem 'actionmailer', '~> 5.2.0'
gem 'activejob', '~> 5.2.0'
gem 'activerecord', '~> 5.2.0'
gem 'sqlite3', '~> 1.3', '>= 1.3.6'
end

appraise 'rails-6-0' do
gem 'actionmailer', '~> 6.0.0'
gem 'activejob', '~> 6.0.0'
gem 'activerecord', '~> 6.0.0'
gem 'sqlite3', '~> 1.4'
end

appraise 'rails-6-1' do
gem 'actionmailer', '~> 6.1.0'
gem 'activejob', '~> 6.1.0'
gem 'activerecord', '~> 6.1.0'
gem 'sqlite3', '~> 1.4'
end

appraise 'rails-7-0' do
gem 'actionmailer', '~> 7.0.0'
gem 'activejob', '~> 7.0.0'
gem 'activerecord', '~> 7.0.0'
gem 'sqlite3', '~> 1.4'
end

appraise 'rails-7-1' do
gem 'actionmailer', '~> 7.1.0'
gem 'activejob', '~> 7.1.0'
gem 'activerecord', '~> 7.1.0'
gem 'sqlite3', '>= 1.4'
end

appraise 'rails-7-2' do
gem 'actionmailer', '~> 7.2.0'
gem 'activejob', '~> 7.2.0'
gem 'activerecord', '~> 7.2.0'
gem 'sqlite3', '>= 1.4'
end

appraise 'rails-8-0' do
gem 'actionmailer', '~> 8.0.0'
gem 'activejob', '~> 8.0.0'
gem 'activerecord', '~> 8.0.0'
gem 'sqlite3', '>= 2.1'
end

appraise 'rails-main' do
Expand All @@ -42,4 +55,5 @@ appraise 'rails-main' do
gem 'actionpack', github: 'rails/rails', glob: 'actionpack/*.gemspec'
gem 'activesupport', github: 'rails/rails', glob: 'activesupport/*.gemspec'
gem 'activemodel', github: 'rails/rails', glob: 'activemodel/*.gemspec'
gem 'sqlite3', '>= 2.1'
end
12 changes: 2 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project aims to adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added <!-- for new features. -->
### Changed <!-- for changes in existing functionality. -->
### Deprecated <!-- for soon-to-be removed features. -->
### Removed <!-- for now removed features. -->
### Fixed <!-- for any bug fixes. -->
Please visit the [GitHub releases page](https://github.com/Betterment/delayed/releases) to see
changelog entries for all new releases.

## [0.5.3] - 2024-01-12
### Changed
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ gem 'mysql2'
gem 'pg'
gem 'rake'
gem 'rspec'
gem 'sqlite3', '~> 1.7.3'
gem 'timecop'
gem 'zeitwerk'
gem 'sqlite3', '>= 1.4'
82 changes: 44 additions & 38 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,71 +1,75 @@
PATH
remote: .
specs:
delayed (0.6.0)
delayed (0.7.0)
activerecord (>= 5.2)
concurrent-ruby

GEM
remote: https://rubygems.org/
specs:
actionmailer (7.1.3.4)
actionpack (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activesupport (= 7.1.3.4)
actionmailer (7.1.5.1)
actionpack (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.3.4)
actionview (= 7.1.3.4)
activesupport (= 7.1.3.4)
actionpack (7.1.5.1)
actionview (= 7.1.5.1)
activesupport (= 7.1.5.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actionview (7.1.3.4)
activesupport (= 7.1.3.4)
actionview (7.1.5.1)
activesupport (= 7.1.5.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3.4)
activesupport (= 7.1.3.4)
activejob (7.1.5.1)
activesupport (= 7.1.5.1)
globalid (>= 0.3.6)
activemodel (7.1.3.4)
activesupport (= 7.1.3.4)
activerecord (7.1.3.4)
activemodel (= 7.1.3.4)
activesupport (= 7.1.3.4)
activemodel (7.1.5.1)
activesupport (= 7.1.5.1)
activerecord (7.1.5.1)
activemodel (= 7.1.5.1)
activesupport (= 7.1.5.1)
timeout (>= 0.4.0)
activesupport (7.1.3.4)
activesupport (7.1.5.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0)
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
ast (2.4.2)
base64 (0.2.0)
benchmark (0.4.0)
betterlint (1.9.0)
rubocop (~> 1.62.0)
rubocop-performance (~> 1.21.0)
rubocop-rails (~> 2.24.0)
rubocop-rake (~> 0.6.0)
rubocop-rspec (~> 2.28.0)
bigdecimal (3.1.8)
bigdecimal (3.1.9)
builder (3.2.4)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
Expand All @@ -76,10 +80,11 @@ GEM
erubi (1.12.0)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
logger (1.6.5)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand All @@ -92,7 +97,7 @@ GEM
minitest (5.22.3)
mutex_m (0.2.0)
mysql2 (0.5.6)
net-imap (0.4.14)
net-imap (0.4.18)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -101,17 +106,17 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
nokogiri (1.16.7-aarch64-linux)
nokogiri (1.16.8-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm-linux)
nokogiri (1.16.8-arm-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
nokogiri (1.16.8-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86-linux)
nokogiri (1.16.8-x86-linux)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
nokogiri (1.16.8-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
nokogiri (1.16.8-x86_64-linux)
racc (~> 1.4)
parallel (1.24.0)
parser (3.3.0.5)
Expand All @@ -128,9 +133,9 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (~> 1.14)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.0)
Expand Down Expand Up @@ -184,16 +189,17 @@ GEM
rubocop-rspec_rails (2.28.2)
rubocop (~> 1.40)
ruby-progressbar (1.13.0)
sqlite3 (1.7.3-aarch64-linux)
sqlite3 (1.7.3-arm-linux)
sqlite3 (1.7.3-arm64-darwin)
sqlite3 (1.7.3-x86-linux)
sqlite3 (1.7.3-x86_64-darwin)
sqlite3 (1.7.3-x86_64-linux)
securerandom (0.4.1)
sqlite3 (2.5.0-aarch64-linux-gnu)
sqlite3 (2.5.0-arm-linux-gnu)
sqlite3 (2.5.0-arm64-darwin)
sqlite3 (2.5.0-x86-linux-gnu)
sqlite3 (2.5.0-x86_64-darwin)
sqlite3 (2.5.0-x86_64-linux-gnu)
strscan (3.1.0)
thor (1.3.1)
timecop (0.9.8)
timeout (0.4.1)
timeout (0.4.3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
Expand All @@ -218,7 +224,7 @@ DEPENDENCIES
pg
rake
rspec
sqlite3 (~> 1.7.3)
sqlite3 (>= 1.4)
timecop
zeitwerk

Expand Down
2 changes: 1 addition & 1 deletion delayed.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']
spec.summary = 'a multi-threaded, SQL-driven ActiveJob backend used at Betterment to process millions of background jobs per day'

spec.version = '0.6.0'
spec.version = '0.7.0'
spec.metadata = {
'changelog_uri' => 'https://github.com/betterment/delayed/blob/main/CHANGELOG.md',
'bug_tracker_uri' => 'https://github.com/betterment/delayed/issues',
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_5_2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ gem "mysql2"
gem "pg"
gem "rake"
gem "rspec"
gem "sqlite3", "~> 1.7.3"
gem "timecop"
gem "zeitwerk"
gem "sqlite3", "~> 1.3", ">= 1.3.6"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/rails_6_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ gem "mysql2"
gem "pg"
gem "rake"
gem "rspec"
gem "sqlite3", "~> 1.7.3"
gem "timecop"
gem "zeitwerk"
gem "sqlite3", "~> 1.4"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/rails_6_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ gem "mysql2"
gem "pg"
gem "rake"
gem "rspec"
gem "sqlite3", "~> 1.7.3"
gem "timecop"
gem "zeitwerk"
gem "sqlite3", "~> 1.4"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ gem "mysql2"
gem "pg"
gem "rake"
gem "rspec"
gem "sqlite3", "~> 1.7.3"
gem "timecop"
gem "zeitwerk"
gem "sqlite3", "~> 1.4"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/rails_7_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ gem "mysql2"
gem "pg"
gem "rake"
gem "rspec"
gem "sqlite3", "~> 1.7.3"
gem "timecop"
gem "zeitwerk"
gem "sqlite3", ">= 1.4"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/rails_7_2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ gem "mysql2"
gem "pg"
gem "rake"
gem "rspec"
gem "sqlite3", "~> 1.7.3"
gem "timecop"
gem "zeitwerk"
gem "sqlite3", ">= 1.4"

gemspec path: "../"
18 changes: 18 additions & 0 deletions gemfiles/rails_8_0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "actionmailer", "~> 8.0.0"
gem "activejob", "~> 8.0.0"
gem "activerecord", "~> 8.0.0"
gem "appraisal"
gem "betterlint"
gem "mysql2"
gem "pg"
gem "rake"
gem "rspec"
gem "timecop"
gem "zeitwerk"
gem "sqlite3", ">= 2.1"

gemspec path: "../"
Loading

0 comments on commit a8b6c9c

Please sign in to comment.