All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Removes everything 3.7.0 deprecated. Nothing here is a surprise if you upgraded to 3.7.0 and cleared its warnings; see Upgrading from 3.x in README.md.
- Ruby 3.2 and Rails 7.2 are the minimum, enforced by
required_ruby_versionandrailties/activerecord >= 7.2. Every combination CI verifies is now at or above the floors, which was not true before slack-notifieris no longer a runtime dependency.Patches::Notifierrequires it inside abegin/rescue, so thedefined?(Slack)guard it always carried finally does something. Applications that setconfig.use_slackaddgem 'slack-notifier'themselves- The Capistrano integration is removed -
require 'patches/capistrano'and itspatches:runtask. Invokebundle exec rake patches:runfrom your deployment process instead;docs/usage.mdshows where - The workers include
Sidekiq::Jobdirectly, so Sidekiq 6.3 or newer is required when the integration is used.Patches.sidekiq_job_moduleand itsSidekiq::Workerfallback are gone - The install migration declares
ActiveRecord::Migration[7.2]rather than[5.0]. A freshpatches_patchestherefore getsdatetime(6)timestamp columns, matching what a modern Rails schema uses, where[5.0]compatibility produceddatetimewithout precision. Existing installs are untouched - they ran their own copy of the file long ago - Rails is required rather than guarded for.
railtiesandactiverecordwere always hard dependencies and the gem ships an engine, so thedefined?(Rails)checks described a mode nobody used - one of them readdefined?(:Rails), always truthy, unnoticed until 3.6.3.lib/patches.rbnow requiresrails, because loading the engine without it fails
- The deprecation warnings 3.7.0 added, now that what they announced has
happened.
Patches.deprecatoritself stays - applications were told to configure it - and its horizon points at the next major
- CI covers every combination the gemspec allows, 12 cells rather than a wider
range, plus a leg for each optional-integration state: Sidekiq 7.x and 8.x
with strict arguments on and off, Sidekiq absent,
slack-notifierabsent, and neither installed - the last of which nothing covered before
Declares dependencies the gem always relied on, and announces what 4.0 is expected to require. No public API changes and no version constraint moves, so anything that installed 3.6.x installs this.
- Gem metadata (
source_code_uri,changelog_uri,bug_tracker_uri,documentation_uri). None were declared, so rubygems.org kept showing values carried over from older releases - 3.6.3 still listssource_code_uriashttp://github.com/jobready/patches, from before the org was renamed activerecordas an explicit runtime dependency, at the same>= 3.2floor asrailtiesso nothing currently installable is excluded.Patches::PatchsubclassesActiveRecord::BaseandPatches::Base#executecallsActiveRecord::Base.connection, but onlyrailtieshad been declaredPatches.deprecator, a gem-ownedActiveSupport::Deprecationinstance rather than the singleton Rails 7.1 deprecated and 8.0 removed. Host applications can silence or redirect it withPatches.deprecator.behavior = :silence- A deprecation warning when
config.use_slackis set: from 4.0 Patches will not depend onslack-notifier, so only applications using Slack carry it. Addgem 'slack-notifier'to your Gemfile to keep notifications working - A deprecation warning on
require 'patches/capistrano'. The Capistrano task is removed in 4.0; invokerake patches:runfrom your deployment process instead. It remains opt-in and loads nothing unless a Capfile requires it - Deprecation warnings for the two other things 4.0 is expected to require:
Sidekiq 6.3 or newer, which is where
Sidekiq::Jobarrives, and Ruby 3.2 / Rails 7.2. Those floors are higher than the range CI verifies - Ruby 3.0 and Rails 7.1 still pass - so anyone below them hears about it a release ahead. The Ruby and Rails notice runs from a Rails initializer, after the application's own, soPatches.deprecator.behaviorcan silence it
- The published gem carries only what a consumer needs - 27 files rather than
42.
Dockerfile,docker-compose.yml,.devcontainer/,.github/,bin/,Rakefile,RELEASING.mdand a decorative image were being packaged.lib, the install migration,docs/usage.mdand the top-level docs remain - The development container works again. It was pinned to
ruby:2.3, which cannot satisfy the current Gemfile, and had not been touched since 2018. The Ruby version is now a build argument and the gem versions are passed through from the shell, so any cell of the matrix in README.md is reproducible in it. A.devcontainer/referencing the same compose service comes with it, for VS Code and Codespaces
.github/workflows/publish.yml. It published onrelease: publishedusing aGEM_HOST_API_KEY, had never run in the four years since it was added, and would now attempt a duplicate push if a GitHub Release were created after a tag. Releases come from.github/workflows/release.yml- see RELEASING.md
Bug fixes only. No version constraint changes, no API changes and nothing removed from the public interface, so anything that installed 3.6.2 installs this. First step of a staged modernisation: declaring dependencies and adding deprecations comes in 3.7.0, raising minimums in 4.0.0.
- Sidekiq 7 and 8 compatibility. Strict argument checking, enabled by default
from Sidekiq 7, rejected the job arguments the workers enqueued:
patches:runpassed the runner class object itself andapplication_versionused a symbol key, so enqueueing raisedArgumentError: Job arguments to Patches::Worker must be native JSON types. The task now enqueues the runner class name and the key is a string. The serialised payload is byte-identical to 3.6.2's - the class already reached Redis as"Patches::Runner"and the symbol key as"application_version"- so in-flight jobs and rolling deploys that mix old and new workers are unaffected - The install migration inherited from a bare
ActiveRecord::Migration, which Rails has refused since 5.0 with "Directly inheriting from ActiveRecord::Migration is not supported", sorake patches:install:migrations && rake db:migratefailed on every Rails since. It now declaresActiveRecord::Migration[5.0], which Rails still supports through 8.1, so no minimum moves Patches.default_pathguarded ondefined?(:Rails), which tests a symbol literal and is always true; outside Rails it raisedNameErrorinstead of returning nil
- Specs for the install migration, which shipped with no coverage at all, and
for
Patches.sidekiq_job_module, including itsSidekiq::Workerfallback - A release workflow and
RELEASING.md, both matching rdytech/superset-client: pushing av-prefixed tag publishes to RubyGems through trusted publishing, and a tag not reachable fromdevelopis refused. It also waits for the version to appear on RubyGems, so a release that does not land fails loudly -3.6.1was tagged and released on GitHub but never published, and nothing reported it - CI now runs 17 Ruby/Rails combinations (Ruby 3.0-4.0 against Rails 7.1-8.1) in place of a single Ruby 2.7 cell, plus a leg for each Sidekiq state: absent, 6.5, and 7.x/8.x with strict arguments both on and off. Ruby 2.7 and Rails 6.1/7.0 are not exercised, being well past upstream support; they are untested rather than blocked, since no constraint changed. README.md records the verified range and how to check an older combination locally
- The workers resolve their mixin through
Patches.sidekiq_job_module, which prefersSidekiq::Job(Sidekiq 6.3+) and falls back toSidekiq::Worker, so no Sidekiq version loses support - Development dependencies pruned to those actually used:
capybara,factory_girl,timecop,generator_spec,byebuganddatabase_cleanerwere referenced by no spec, andrspec-railswas never required, so plainrspecreplaces it.rails,sqlite3,sidekiqandconcurrent-rubymoved to the Gemfile so CI can vary them; the stalesidekiq ~> 3.4.1pin is what hid the strict argument incompatibility, and it also heldjsonat~> 1.0 - Sidekiq-dependent specs moved under
spec/sidekiq/so the suite runs with the gem absent
- The install migration now declares
ActiveRecord::Migration[5.0], andActiveRecord::Migration.[]does not exist before Rails 5.0. A fresh install on Rails 4.2 or earlier therefore needspatches_patchescreated by hand - the table it wants is apathstring, timestamps, and a unique index onpath. Existing installs are unaffected, having already copied the migration into the host application. Those versions are far outside the range CI verifies, and the previous file could not be loaded by any Rails from 5.0 on, so this trades an impossible install for an unlikely one
lib/generators/patches.rb, a dead duplicate of the patch generator that wrote toapp/db/from a template (patch.erb) that does not exist. Not reachable through Rails' generator lookup, so not part of the public interface
Fixes incorrect release - tag and published gem back in sync
- Github actions to publish to Rubygems upon release
- Fix
patches:pendingrake task
3.6.1 changes were incorrectly published as 3.6.0 but tagged as 3.6.1
- Added
notification_prefixandnotification_suffixto configuration options - Linked to docs/usage.md in README
- Refactored
Patches::Notifier Patches::Notifier.append_tenant_messageeffectively replaced bytenant_suffix
- Enable application version constraint support on
Patches::TenantWorker
Patches::TenantWorkerapplication version constraint forward compatibility
- Application version constraints
- Added
Patches::Workerextra parameters to support forward compatibility with the upcoming releases
- Gem compatibility with Apartment 2
- Set icon_emoji of posted slack message to 🐶
- Hipchat is no longer supported
- Corrected gem ownership and authors.
- Changelog
- Dockerfile and BuildKite pipeline config
- Added slack notification configurability