From f5624ce694e6fba3170ee2ea93c160ef85ff2d95 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Tue, 10 May 2022 00:11:30 +0000 Subject: [PATCH 01/26] fix: ActiveSupport 7.0.3 Compatibility Fixes https://github.com/collectiveidea/delayed_job/issues/1168 --- lib/delayed/worker.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/delayed/worker.rb b/lib/delayed/worker.rb index 1a352f775..7b983a206 100644 --- a/lib/delayed/worker.rb +++ b/lib/delayed/worker.rb @@ -1,5 +1,6 @@ require 'timeout' require 'active_support/dependencies' +require 'active_support/core_ext/kernel/reporting' require 'active_support/core_ext/numeric/time' require 'active_support/core_ext/class/attribute_accessors' require 'active_support/hash_with_indifferent_access' From 7042b1ddb87d3b3f468e8350bc2101a283922ed6 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Wed, 28 Sep 2022 14:41:01 -0400 Subject: [PATCH 02/26] Prepare 4.1.11 release --- CHANGELOG.md | 4 ++++ README.md | 2 +- delayed_job.gemspec | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d8f3c37d..86d801219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +4.1.11 - 2022-09-28 +=================== +* Fix missing require for Rails 7.0.3+ + 4.1.10 - 2022-01-17 =================== * Support for Rails 7.0. NOTE: If you are using Delayed Job independent of Rails, Active Support 7 has dropped classic dependency autoloading. You will need to add and setup zeitwerk for autoloading to continue working in ActiveSupport 7. diff --git a/README.md b/README.md index c72ed2f6f..ff7f2660b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ **If you're viewing this at https://github.com/collectiveidea/delayed_job, you're reading the documentation for the master branch. [View documentation for the latest release -(4.1.10).](https://github.com/collectiveidea/delayed_job/tree/v4.1.10)** +(4.1.11).](https://github.com/collectiveidea/delayed_job/tree/v4.1.11)** Delayed::Job ============ diff --git a/delayed_job.gemspec b/delayed_job.gemspec index ee290405e..0ed7afc33 100644 --- a/delayed_job.gemspec +++ b/delayed_job.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.summary = 'Database-backed asynchronous priority queue system -- Extracted from Shopify' spec.test_files = Dir.glob('spec/**/*') - spec.version = '4.1.10' + spec.version = '4.1.11' spec.metadata = { 'changelog_uri' => 'https://github.com/collectiveidea/delayed_job/blob/master/CHANGELOG.md', 'bug_tracker_uri' => 'https://github.com/collectiveidea/delayed_job/issues', From a83d1a4ac8dfa5851eb4f701428c2c6f2b41bc65 Mon Sep 17 00:00:00 2001 From: Orien Madgwick <497874+orien@users.noreply.github.com> Date: Sun, 15 Jan 2023 22:06:08 +1100 Subject: [PATCH 03/26] CI: add Ruby 3.2 to the test matrix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e451964d..8cb154edf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.7', '3.0', '3.1', jruby-head, ruby-head] + ruby: ['2.7', '3.0', '3.1', '3.2', jruby-head, ruby-head] rails_version: - '6.0.0' - '6.1.0' From c2f29f322d6bedf462084f2039d7a5e47f9b138d Mon Sep 17 00:00:00 2001 From: Orien Madgwick <497874+orien@users.noreply.github.com> Date: Sun, 15 Jan 2023 22:14:15 +1100 Subject: [PATCH 04/26] CI: use JRuby 9.4 to test Rails 7.0 and edge Rails 7 and above requires Ruby 2.7 compatibility, however JRuby 9.3.x provides only Ruby 2.6 compatibility. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cb154edf..31b73af00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,10 +39,10 @@ jobs: - ruby: jruby-9.2 rails_version: '6.1.0' - # jruby-9.3 - - ruby: jruby-9.3 + # jruby-9.4 + - ruby: jruby-9.4 rails_version: '7.0.0' - - ruby: jruby-9.3 + - ruby: jruby-9.4 rails_version: 'edge' # From 715fd2d35c2c8bf8c594cffe346815cb6443cef4 Mon Sep 17 00:00:00 2001 From: Rajan Agaskar Date: Tue, 24 Jan 2023 15:24:15 -0800 Subject: [PATCH 05/26] Ensure `Array` has been decorated with `#extract_options` --- lib/delayed/backend/job_preparer.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/delayed/backend/job_preparer.rb b/lib/delayed/backend/job_preparer.rb index f545eda0e..24c869752 100644 --- a/lib/delayed/backend/job_preparer.rb +++ b/lib/delayed/backend/job_preparer.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/array/extract_options' + module Delayed module Backend class JobPreparer From 7e972d7b0216e10c2029dece1c4a3f0b3b309ef2 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Mon, 2 Oct 2023 11:29:06 -0400 Subject: [PATCH 06/26] Use a block for expect to raise_exception This was probably the only way to do it 10 years ago when it was added. --- spec/worker_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/worker_spec.rb b/spec/worker_spec.rb index 1ce08ce99..eb525ede0 100644 --- a/spec/worker_spec.rb +++ b/spec/worker_spec.rb @@ -106,7 +106,7 @@ expect(Delayed::Job).to receive(:reserve).exactly(10).times.and_raise(Exception) worker = Delayed::Worker.new 9.times { worker.work_off } - expect(lambda { worker.work_off }).to raise_exception Delayed::FatalBackendError + expect { worker.work_off }.to raise_exception Delayed::FatalBackendError end it 'allows the backend to attempt recovery from reservation errors' do From 6f834aff6b8331e1e445631dee6bf1acd2c046ee Mon Sep 17 00:00:00 2001 From: Pirate Praveen Arimbrathodiyil Date: Fri, 9 Feb 2024 20:28:13 +0530 Subject: [PATCH 07/26] Change US/Eastern => America/New_York This fixes Invalid Timezone: US/Eastern error https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052730 --- lib/delayed/backend/shared_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/delayed/backend/shared_spec.rb b/lib/delayed/backend/shared_spec.rb index 39f497670..2774e7dc0 100644 --- a/lib/delayed/backend/shared_spec.rb +++ b/lib/delayed/backend/shared_spec.rb @@ -230,7 +230,7 @@ def create_job(opts = {}) end it 'reserves jobs scheduled for the past when time zones are involved' do - Time.zone = 'US/Eastern' + Time.zone = 'America/New_York' job = create_job :run_at => described_class.db_time_now - 1.minute expect(described_class.reserve(worker)).to eq(job) end From 25469d9622947562a6a70f179a572b4ac8ba438f Mon Sep 17 00:00:00 2001 From: Joshua Young Date: Tue, 30 Apr 2024 13:24:01 +1000 Subject: [PATCH 08/26] Address `ActiveSupport::ProxyObject` deprecation on Rails 7.2.0.alpha --- lib/delayed/compatibility.rb | 12 ------------ lib/delayed/message_sending.rb | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/delayed/compatibility.rb b/lib/delayed/compatibility.rb index 72778f9cc..0ef949b7a 100644 --- a/lib/delayed/compatibility.rb +++ b/lib/delayed/compatibility.rb @@ -3,25 +3,13 @@ module Delayed module Compatibility if ActiveSupport::VERSION::MAJOR >= 4 - require 'active_support/proxy_object' - def self.executable_prefix 'bin' end - - def self.proxy_object_class - ActiveSupport::ProxyObject - end else - require 'active_support/basic_object' - def self.executable_prefix 'script' end - - def self.proxy_object_class - ActiveSupport::BasicObject - end end end end diff --git a/lib/delayed/message_sending.rb b/lib/delayed/message_sending.rb index a2808fd39..960b73d0d 100644 --- a/lib/delayed/message_sending.rb +++ b/lib/delayed/message_sending.rb @@ -1,5 +1,5 @@ module Delayed - class DelayProxy < Delayed::Compatibility.proxy_object_class + class DelayProxy < BasicObject def initialize(payload_class, target, options) @payload_class = payload_class @target = target From 21b3dad718549ca2600571004ac00960c498c46e Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 11:05:35 -0400 Subject: [PATCH 09/26] Bring in missing functionality from ProxyObject --- lib/delayed/message_sending.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/delayed/message_sending.rb b/lib/delayed/message_sending.rb index 960b73d0d..6e1e834a1 100644 --- a/lib/delayed/message_sending.rb +++ b/lib/delayed/message_sending.rb @@ -1,5 +1,11 @@ module Delayed class DelayProxy < BasicObject + undef_method :== + undef_method :equal? + + # Let DelayProxy raise exceptions. + define_method(:raise, ::Object.instance_method(:raise)) + def initialize(payload_class, target, options) @payload_class = payload_class @target = target From 45680bb178c51ca190746acc239f03bf8cf4eecd Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 11:45:11 -0400 Subject: [PATCH 10/26] Update build matrix --- .github/workflows/ci.yml | 48 +++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31b73af00..cff283592 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,21 +12,13 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.7', '3.0', '3.1', '3.2', jruby-head, ruby-head] + ruby: ['3.1', '3.2', '3.3', jruby-head, ruby-head] rails_version: - - '6.0.0' - - '6.1.0' - '7.0.0' + - '7.1.0' + - '7.2.0' - 'edge' include: - # Rails 5.2 - - ruby: 2.6 - rails_version: '5.2.0' - - ruby: 2.7 - rails_version: '5.2.0' - - ruby: jruby-9.2 - rails_version: '5.2.0' - # Ruby 2.6 - ruby: 2.6 rails_version: '6.0.0' @@ -59,6 +51,40 @@ jobs: rails_version: '5.0.0' - ruby: 2.5 rails_version: '5.1.0' + - ruby: 2.6 + rails_version: '5.2.0' + - ruby: 2.7 + rails_version: '5.2.0' + - ruby: jruby-9.2 + rails_version: '5.2.0' + - ruby: 2.7 + rails_version: '6.0.0' + - ruby: 3.0 + rails_version: '6.0.0' + - ruby: 3.2 + rails_version: '6.0.0' + - ruby: jruby-9.4 + rails_version: '6.0.0' + - ruby: 2.7 + rails_version: '6.1.0' + - ruby: 3.0 + rails_version: '6.1.0' + - ruby: 3.2 + rails_version: '6.1.0' + - ruby: jruby-9.4 + rails_version: '6.0.0' + - ruby: 2.7 + rails_version: '7.0.0' + - ruby: 3.0 + rails_version: '7.0.0' + - ruby: jruby-9.4 + rails_version: '6.0.0' + + # EOL Ruby + - ruby: 2.7 + rails_version: '7.1.0' + - ruby: 3.0 + rails_version: '7.1.0' continue-on-error: ${{ matrix.rails_version == 'edge' || endsWith(matrix.ruby, 'head') }} From 7dfae6208eab29463eb8b4ddabc76abd3b1c9d4a Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 11:45:35 -0400 Subject: [PATCH 11/26] Add sqlite restriction --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index c66ff6e7e..d60e75898 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,8 @@ platforms :ruby do # Rails 6 now requires sqlite 1.4 if ENV['RAILS_VERSION'] && ENV['RAILS_VERSION'] < '5.1' gem 'sqlite3', '< 1.4' + elsif ENV['RAILS_VERSION'] && ENV['RAILS_VERSION'] < '7.2' + gem 'sqlite3', '~> 1.4' else gem 'sqlite3' end From 8327175b6355aa816136c4a3ae4339a188585ef4 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 11:56:50 -0400 Subject: [PATCH 12/26] Fix BasicObject cleanup --- lib/delayed/message_sending.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/delayed/message_sending.rb b/lib/delayed/message_sending.rb index 6e1e834a1..eeb7ee671 100644 --- a/lib/delayed/message_sending.rb +++ b/lib/delayed/message_sending.rb @@ -1,10 +1,14 @@ module Delayed class DelayProxy < BasicObject - undef_method :== - undef_method :equal? + # What additional methods exist on BasicObject has changed over time + (::BasicObject.instance_methods - [:__id__, :__send__, :instance_eval, :instance_exec]).each do |method| + undef_method method + end # Let DelayProxy raise exceptions. - define_method(:raise, ::Object.instance_method(:raise)) + def raise(*args) + ::Object.send(:raise, *args) + end def initialize(payload_class, target, options) @payload_class = payload_class From 2ded9a328b316de0a79c9f9af007197802877ba5 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 13:30:09 -0400 Subject: [PATCH 13/26] Fix rails 4.2 and 5.0 test dependencies --- Gemfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Gemfile b/Gemfile index d60e75898..4b5fce9a7 100644 --- a/Gemfile +++ b/Gemfile @@ -53,6 +53,11 @@ group :test do elsif ENV['RAILS_VERSION'] gem 'actionmailer', "~> #{ENV['RAILS_VERSION']}" gem 'activerecord', "~> #{ENV['RAILS_VERSION']}" + if ENV['RAILS_VERSION'] < '5.1' + gem 'loofah', '2.3.1' + gem 'nokogiri', '< 1.11.0' + gem 'rails-html-sanitizer', '< 1.4.0' + end else gem 'actionmailer', ['>= 3.0', '< 8.0'] gem 'activerecord', ['>= 3.0', '< 8.0'] From e815df8d125b3da6254e4c47adbd852ac42b3523 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 13:54:58 -0400 Subject: [PATCH 14/26] Ruby libraries moved out of standard lib in 3.4 --- Gemfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Gemfile b/Gemfile index 4b5fce9a7..ec2699867 100644 --- a/Gemfile +++ b/Gemfile @@ -71,6 +71,13 @@ group :test do else gem 'simplecov-lcov', :require => false end + if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.3.0') + # New dependencies with a deprecation notice in Ruby 3.3 and required in Ruby 3.4 + # Probably won't get released in rails 7.0 + gem 'base64' + gem 'bigdecimal' + gem 'mutex_m' + end if ENV['RAILS_VERSION'].nil? || ENV['RAILS_VERSION'] >= '6.0.0' gem 'zeitwerk', :require => false end From b27cdc97c73829d9ca5da3e611e38ecb514f20b7 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 14:05:10 -0400 Subject: [PATCH 15/26] Handle ruby 3.4 message expectation --- lib/delayed/backend/shared_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/delayed/backend/shared_spec.rb b/lib/delayed/backend/shared_spec.rb index 39f497670..b773666f8 100644 --- a/lib/delayed/backend/shared_spec.rb +++ b/lib/delayed/backend/shared_spec.rb @@ -595,7 +595,12 @@ def create_job(opts = {}) worker.work_off @job.reload expect(@job.last_error).to match(/did not work/) - expect(@job.last_error).to match(/sample_jobs.rb:\d+:in `perform'/) + if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0') + # Ruby 3.4 produces a more verbose message + expect(@job.last_error).to match(/sample_jobs.rb:\d+:in 'ErrorJob#perform'/) + else + expect(@job.last_error).to match(/sample_jobs.rb:\d+:in `perform'/) + end expect(@job.attempts).to eq(1) expect(@job.run_at).to be > Delayed::Job.db_time_now - 10.minutes expect(@job.run_at).to be < Delayed::Job.db_time_now + 10.minutes From c9947ab1727dc7ee46182f66f4a03a17aef9b021 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 14:12:28 -0400 Subject: [PATCH 16/26] Update actions/checkout --- .github/workflows/ci.yml | 2 +- .github/workflows/rubocop.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cff283592..d133056a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: continue-on-error: ${{ matrix.rails_version == 'edge' || endsWith(matrix.ruby, 'head') }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 env: RAILS_VERSION: ${{ matrix.rails_version }} diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 739473987..57bd319f0 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby 2.7 uses: ruby/setup-ruby@v1 with: From 3cbf1a31cddfc144b49c7560c152cc8659386c01 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 14:12:46 -0400 Subject: [PATCH 17/26] Run jruby-9.4 --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d133056a2..c0248776f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.1', '3.2', '3.3', jruby-head, ruby-head] + ruby: ['3.1', '3.2', '3.3', jruby-9.4, jruby-head, ruby-head] rails_version: - '7.0.0' - '7.1.0' @@ -31,12 +31,6 @@ jobs: - ruby: jruby-9.2 rails_version: '6.1.0' - # jruby-9.4 - - ruby: jruby-9.4 - rails_version: '7.0.0' - - ruby: jruby-9.4 - rails_version: 'edge' - # # The past # From b5c1d6a419317092ed4b87b9940d86e64de8687a Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 14:15:30 -0400 Subject: [PATCH 18/26] Switch to coveralls main --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0248776f..73334f9f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,7 @@ jobs: RAILS_VERSION: ${{ matrix.rails_version }} run: bundle exec rspec - name: Coveralls Parallel - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@main with: github-token: ${{ secrets.github_token }} flag-name: run-${{ matrix.ruby }}-${{ matrix.rails_version }} @@ -106,7 +106,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Coveralls Finished - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@main with: github-token: ${{ secrets.github_token }} parallel-finished: true From 604fb961a7e849a869091338d0a9d87a1368381b Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 14:17:15 -0400 Subject: [PATCH 19/26] Update actions/cache --- .github/workflows/rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 57bd319f0..9d1e97905 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -15,7 +15,7 @@ jobs: - name: Generate lockfile for cache key run: bundle lock - name: Cache gems - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: vendor/bundle key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }} From 98028530b62f044fc6f84377a735cd1e98c5485c Mon Sep 17 00:00:00 2001 From: Orien Madgwick <497874+orien@users.noreply.github.com> Date: Mon, 19 Feb 2024 20:38:03 +1100 Subject: [PATCH 20/26] CI: be precise regarding the Ubuntu version Older versions of Ruby segfault on newer versions of Ubuntu. --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73334f9f1..93536aa33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,8 @@ on: jobs: test: - runs-on: ubuntu-latest + name: Test (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails_version }}) + runs-on: ubuntu-${{ matrix.ubuntu }} strategy: fail-fast: false matrix: @@ -18,18 +19,23 @@ jobs: - '7.1.0' - '7.2.0' - 'edge' + ubuntu: [latest] include: # Ruby 2.6 - ruby: 2.6 rails_version: '6.0.0' + ubuntu: '20.04' - ruby: 2.6 rails_version: '6.1.0' + ubuntu: '20.04' # jruby-9.2 - ruby: jruby-9.2 rails_version: '6.0.0' + ubuntu: '20.04' - ruby: jruby-9.2 rails_version: '6.1.0' + ubuntu: '20.04' # # The past @@ -37,48 +43,69 @@ jobs: # EOL Active Record - ruby: 2.2 rails_version: '3.2.0' + ubuntu: '20.04' - ruby: 2.1 rails_version: '4.1.0' + ubuntu: '20.04' - ruby: 2.4 rails_version: '4.2.0' + ubuntu: '20.04' - ruby: 2.4 rails_version: '5.0.0' + ubuntu: '20.04' - ruby: 2.5 rails_version: '5.1.0' + ubuntu: '20.04' - ruby: 2.6 rails_version: '5.2.0' + ubuntu: '20.04' - ruby: 2.7 rails_version: '5.2.0' + ubuntu: '22.04' - ruby: jruby-9.2 rails_version: '5.2.0' + ubuntu: '22.04' - ruby: 2.7 rails_version: '6.0.0' + ubuntu: '22.04' - ruby: 3.0 rails_version: '6.0.0' + ubuntu: '22.04' - ruby: 3.2 rails_version: '6.0.0' + ubuntu: '22.04' - ruby: jruby-9.4 rails_version: '6.0.0' + ubuntu: '22.04' - ruby: 2.7 rails_version: '6.1.0' + ubuntu: '22.04' - ruby: 3.0 rails_version: '6.1.0' + ubuntu: '22.04' - ruby: 3.2 rails_version: '6.1.0' + ubuntu: '22.04' - ruby: jruby-9.4 rails_version: '6.0.0' + ubuntu: '22.04' - ruby: 2.7 rails_version: '7.0.0' + ubuntu: '22.04' - ruby: 3.0 rails_version: '7.0.0' + ubuntu: '22.04' - ruby: jruby-9.4 rails_version: '6.0.0' + ubuntu: '22.04' # EOL Ruby - ruby: 2.7 rails_version: '7.1.0' + ubuntu: '22.04' - ruby: 3.0 rails_version: '7.1.0' + ubuntu: '22.04' continue-on-error: ${{ matrix.rails_version == 'edge' || endsWith(matrix.ruby, 'head') }} From 95840470ef9e8d260b8381c62a26e9eeb13d68ff Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 15:28:44 -0400 Subject: [PATCH 21/26] Add trusted publishing workflow --- .github/workflows/publish_gem.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/publish_gem.yml diff --git a/.github/workflows/publish_gem.yml b/.github/workflows/publish_gem.yml new file mode 100644 index 000000000..613132fdd --- /dev/null +++ b/.github/workflows/publish_gem.yml @@ -0,0 +1,28 @@ +name: Publish Gem + +on: + push: + tags: + - v* + +jobs: + push: + if: github.repository == 'collectiveidea/delayed_job' + runs-on: ubuntu-latest + environment: publishing + + permissions: + contents: write + id-token: write + + steps: + # Set up + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ruby + + # Release + - uses: rubygems/release-gem@v1 From 062acf0eb4acff5a8d9dcc01bde108f035845abd Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 15:55:31 -0400 Subject: [PATCH 22/26] Prepare 4.1.12.rc1 release --- CHANGELOG.md | 7 +++++++ README.md | 2 +- delayed_job.gemspec | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86d801219..6a12fe2e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +4.1.12.rc1 - 2024-08-13 +======================= +* Validating trusted publishing release +* Add missing require for extract_options +* Fix rails 7.2 ActiveSupport::ProxyObject deprecation +* Multiple contributors on current and legacy test suite improvements + 4.1.11 - 2022-09-28 =================== * Fix missing require for Rails 7.0.3+ diff --git a/README.md b/README.md index ff7f2660b..0221f1970 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ **If you're viewing this at https://github.com/collectiveidea/delayed_job, you're reading the documentation for the master branch. [View documentation for the latest release -(4.1.11).](https://github.com/collectiveidea/delayed_job/tree/v4.1.11)** +(4.1.12.rc1).](https://github.com/collectiveidea/delayed_job/tree/v4.1.12.rc1)** Delayed::Job ============ diff --git a/delayed_job.gemspec b/delayed_job.gemspec index 0ed7afc33..4a1a61b8c 100644 --- a/delayed_job.gemspec +++ b/delayed_job.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.summary = 'Database-backed asynchronous priority queue system -- Extracted from Shopify' spec.test_files = Dir.glob('spec/**/*') - spec.version = '4.1.11' + spec.version = '4.1.12.rc1' spec.metadata = { 'changelog_uri' => 'https://github.com/collectiveidea/delayed_job/blob/master/CHANGELOG.md', 'bug_tracker_uri' => 'https://github.com/collectiveidea/delayed_job/issues', From 8cf3163b8dc37ed619f6a1d3ba924c4ccb4d5518 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 17:03:16 -0400 Subject: [PATCH 23/26] Prepare release 4.1.12 --- CHANGELOG.md | 6 ++++++ README.md | 2 +- delayed_job.gemspec | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a12fe2e4..e4ec1e796 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +4.1.12 - 2024-08-14 +======================= +* Add missing require for extract_options +* Fix rails 7.2 ActiveSupport::ProxyObject deprecation +* Multiple contributors on current and legacy test suite improvements + 4.1.12.rc1 - 2024-08-13 ======================= * Validating trusted publishing release diff --git a/README.md b/README.md index 0221f1970..be68f2c76 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ **If you're viewing this at https://github.com/collectiveidea/delayed_job, you're reading the documentation for the master branch. [View documentation for the latest release -(4.1.12.rc1).](https://github.com/collectiveidea/delayed_job/tree/v4.1.12.rc1)** +(4.1.12).](https://github.com/collectiveidea/delayed_job/tree/v4.1.12)** Delayed::Job ============ diff --git a/delayed_job.gemspec b/delayed_job.gemspec index 4a1a61b8c..765079cb7 100644 --- a/delayed_job.gemspec +++ b/delayed_job.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.summary = 'Database-backed asynchronous priority queue system -- Extracted from Shopify' spec.test_files = Dir.glob('spec/**/*') - spec.version = '4.1.12.rc1' + spec.version = '4.1.12' spec.metadata = { 'changelog_uri' => 'https://github.com/collectiveidea/delayed_job/blob/master/CHANGELOG.md', 'bug_tracker_uri' => 'https://github.com/collectiveidea/delayed_job/issues', From b60e70a20c45a767d9b8ae2ed12630b2f082f887 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Fri, 8 Nov 2024 15:15:31 -0500 Subject: [PATCH 24/26] Enable rails 8 --- Gemfile | 6 +++--- delayed_job.gemspec | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index ec2699867..72280c43a 100644 --- a/Gemfile +++ b/Gemfile @@ -38,7 +38,7 @@ platforms :jruby do elsif ENV['RAILS_VERSION'] gem 'railties', "~> #{ENV['RAILS_VERSION']}" else - gem 'railties', ['>= 3.0', '< 8.0'] + gem 'railties', ['>= 3.0', '< 9.0'] end end @@ -59,8 +59,8 @@ group :test do gem 'rails-html-sanitizer', '< 1.4.0' end else - gem 'actionmailer', ['>= 3.0', '< 8.0'] - gem 'activerecord', ['>= 3.0', '< 8.0'] + gem 'actionmailer', ['>= 3.0', '< 9.0'] + gem 'activerecord', ['>= 3.0', '< 9.0'] end gem 'net-smtp' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') gem 'rspec', '>= 3' diff --git a/delayed_job.gemspec b/delayed_job.gemspec index 765079cb7..b52026ef1 100644 --- a/delayed_job.gemspec +++ b/delayed_job.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |spec| - spec.add_dependency 'activesupport', ['>= 3.0', '< 8.0'] + spec.add_dependency 'activesupport', ['>= 3.0', '< 9.0'] spec.authors = ['Brandon Keepers', 'Brian Ryckbost', 'Chris Gaffney', 'David Genord II', 'Erik Michaels-Ober', 'Matt Griffin', 'Steve Richert', 'Tobias Lütke'] spec.description = 'Delayed_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background. It is a direct extraction from Shopify where the job table is responsible for a multitude of core tasks.' spec.email = ['brian@collectiveidea.com'] From 79b86255cfcbade2473f1528c173cfd237b88d8c Mon Sep 17 00:00:00 2001 From: David Genord II Date: Fri, 8 Nov 2024 15:21:33 -0500 Subject: [PATCH 25/26] Update matrix for Rails 8 --- .github/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93536aa33..43bf89128 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,11 +13,12 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.1', '3.2', '3.3', jruby-9.4, jruby-head, ruby-head] + ruby: ['3.2', '3.3', jruby-9.4, jruby-head, ruby-head] rails_version: - '7.0.0' - '7.1.0' - '7.2.0' + - '8.0.0' - 'edge' ubuntu: [latest] include: @@ -29,6 +30,17 @@ jobs: rails_version: '6.1.0' ubuntu: '20.04' + # ruby 3.1 (Dropped by Rails 8) + - ruby: 3.1 + rails_version: '7.0.0' + ubuntu: 'latest' + - ruby: 3.1 + rails_version: '7.1.0' + ubuntu: 'latest' + - ruby: 3.1 + rails_version: '7.2.0' + ubuntu: 'latest' + # jruby-9.2 - ruby: jruby-9.2 rails_version: '6.0.0' From c08d953e2074c96aedfb04cd7df933fcf6084647 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Fri, 8 Nov 2024 15:51:37 -0500 Subject: [PATCH 26/26] Prepare release 4.1.13 --- CHANGELOG.md | 4 ++++ README.md | 2 +- delayed_job.gemspec | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4ec1e796..ef33c0b48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +4.1.13 - 2024-11-08 +======================= +* Enable Rails 8 + 4.1.12 - 2024-08-14 ======================= * Add missing require for extract_options diff --git a/README.md b/README.md index be68f2c76..4badb2815 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ **If you're viewing this at https://github.com/collectiveidea/delayed_job, you're reading the documentation for the master branch. [View documentation for the latest release -(4.1.12).](https://github.com/collectiveidea/delayed_job/tree/v4.1.12)** +(4.1.13).](https://github.com/collectiveidea/delayed_job/tree/v4.1.13)** Delayed::Job ============ diff --git a/delayed_job.gemspec b/delayed_job.gemspec index b52026ef1..e6bc24b41 100644 --- a/delayed_job.gemspec +++ b/delayed_job.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.summary = 'Database-backed asynchronous priority queue system -- Extracted from Shopify' spec.test_files = Dir.glob('spec/**/*') - spec.version = '4.1.12' + spec.version = '4.1.13' spec.metadata = { 'changelog_uri' => 'https://github.com/collectiveidea/delayed_job/blob/master/CHANGELOG.md', 'bug_tracker_uri' => 'https://github.com/collectiveidea/delayed_job/issues',