Skip to content

Update Simple Scheduler Testing to Modern Ruby/ActiveJob/Sidekiq#67

Merged
bmedenwald merged 7 commits intosimplymadeapps:masterfrom
bmedenwald:appraisals-update
Nov 14, 2025
Merged

Update Simple Scheduler Testing to Modern Ruby/ActiveJob/Sidekiq#67
bmedenwald merged 7 commits intosimplymadeapps:masterfrom
bmedenwald:appraisals-update

Conversation

@bmedenwald
Copy link
Copy Markdown
Contributor

@bmedenwald bmedenwald commented Nov 9, 2025

This pull request started as just a modernization of the appraisal matrix to run against modern versions of ActiveJob, Ruby, and Sidekiq. Unfortunately it ballooned from there due to the tests all being broken because of changes to ActiveSupport in 7.x (major change to time travel in test helpers) and Sidekiq in 7.x (minor type casting change).

This can be reviewed commit-by-commit to separate changes. Notes below for each commit.

  • Update Ruby matrix to versions currently supported for security updates, which at this time is 3.2+. Updated Github checkout action to latest version and redis action to latest. Updated appraisal matrix to versions of ActiveJob still receiving security updates (7.2+) and Sidekiq (security updates in last two major versions, so 7+). Need to lock down Rspec to get a later version as well. Updated Rubocop for target version and added declaration to allow add_development_dependency to continue without error.
  • Fixed Rubocop issue with redundant path declarations that were not necessary.
  • Refactored the At class. This was the big change, and necessary, because of the changes to ActiveSupport's time travel test helper. Starting sometime in ActiveSupport 7, the time travel test helper overwrites Time. Because our At class inherits from Time, it too was being overwritten. Therefore, all tests were broken. To resolve this, I've reworked the class to use SimpleDelegator instead. This allows for __getobj__ to referencing methods in Time without inheriting. It's essentially a class of its own, yet delegates to Time when needed. I renamed a few variables for clarity and removed an unnecessary freeze pointed out by Rubocop.
  • Sidekiq 7+ takes the score and casts it to a float, breaking if nil is handed in. Changed our tests to hand in an integer like the rest of the tests.
  • Due to the dropping of Ruby 2.x and the big change of the At class, I bumped to 2.0.
  • I removed Code Climate. Simply Made Apps moved on from this and closed our account some time back. The images have been broken for a while.
  • Finally, I added a schedule to run tests weekly. This way we'll be alerted to changes earlier than this. Set this to only run on the primary repo and not forks.

Copy link
Copy Markdown
Collaborator

@brianpattison brianpattison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to look up how the heck SimpleDelegator works 😜, but looks good!

@bmedenwald bmedenwald merged commit fac50a8 into simplymadeapps:master Nov 14, 2025
3 checks passed
@bmedenwald bmedenwald deleted the appraisals-update branch November 14, 2025 23:52
@bmedenwald
Copy link
Copy Markdown
Contributor Author

Me too @brianpattison

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants