delayed_job 4.1.11 → 4.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5abe29ddb94836277901e7d618f7291ff9078ca25619b40405a3ccc5a471950
4
- data.tar.gz: fb35d6e6eb7618ba31e44e31580c369aa80fe90353bbc282cf933613c82d152c
3
+ metadata.gz: e5f3ae184659ada7959790d1028acaa2b8a7559294704bdf264ff3293b1d9536
4
+ data.tar.gz: ea333a83c85b2009d85ac69376431434560ec4de435571088f350246ed5e8873
5
5
  SHA512:
6
- metadata.gz: 5427056c3a1adcd9a484a2eeec2d2ce6f3b2ad4c845f31a98d917a3ac228ee0c58a9ca7ced028b03a7935704dceaf6419ee71a4f7077287e7b39429dc517abd1
7
- data.tar.gz: '082c6fa5d5407d3e87c2393f16c2dfdb233f12a2012bc28d03a1baca749d0d95ca8263d7ed67796561ab1376fe1fa7963af57c87fc06b362d6c1dffc07bc6b98'
6
+ metadata.gz: e542cc9f0b42bc332e93bf9aea570172a53cc2c949195fde5fe6c315cd6e04bb06b1190a37cca83368c87e5c0c0955f72b5b6ccf311f780fd9c333b37f45929f
7
+ data.tar.gz: bf351eb531b87a4d2dc01b1a2af53963ad37c18c555721af8208d764212721ee3ad5d653b9441ae1210e40f83efd7739c77be8d226f4425a11e9571fd3602d90
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ 4.1.12 - 2024-08-14
2
+ =======================
3
+ * Add missing require for extract_options
4
+ * Fix rails 7.2 ActiveSupport::ProxyObject deprecation
5
+ * Multiple contributors on current and legacy test suite improvements
6
+
7
+ 4.1.12.rc1 - 2024-08-13
8
+ =======================
9
+ * Validating trusted publishing release
10
+ * Add missing require for extract_options
11
+ * Fix rails 7.2 ActiveSupport::ProxyObject deprecation
12
+ * Multiple contributors on current and legacy test suite improvements
13
+
1
14
  4.1.11 - 2022-09-28
2
15
  ===================
3
16
  * Fix missing require for Rails 7.0.3+
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  **If you're viewing this at https://github.com/collectiveidea/delayed_job,
2
2
  you're reading the documentation for the master branch.
3
3
  [View documentation for the latest release
4
- (4.1.11).](https://github.com/collectiveidea/delayed_job/tree/v4.1.11)**
4
+ (4.1.12).](https://github.com/collectiveidea/delayed_job/tree/v4.1.12)**
5
5
 
6
6
  Delayed::Job
7
7
  ============
data/delayed_job.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.require_paths = ['lib']
14
14
  spec.summary = 'Database-backed asynchronous priority queue system -- Extracted from Shopify'
15
15
  spec.test_files = Dir.glob('spec/**/*')
16
- spec.version = '4.1.11'
16
+ spec.version = '4.1.12'
17
17
  spec.metadata = {
18
18
  'changelog_uri' => 'https://github.com/collectiveidea/delayed_job/blob/master/CHANGELOG.md',
19
19
  'bug_tracker_uri' => 'https://github.com/collectiveidea/delayed_job/issues',
@@ -1,3 +1,5 @@
1
+ require 'active_support/core_ext/array/extract_options'
2
+
1
3
  module Delayed
2
4
  module Backend
3
5
  class JobPreparer
@@ -230,7 +230,7 @@ shared_examples_for 'a delayed_job backend' do
230
230
  end
231
231
 
232
232
  it 'reserves jobs scheduled for the past when time zones are involved' do
233
- Time.zone = 'US/Eastern'
233
+ Time.zone = 'America/New_York'
234
234
  job = create_job :run_at => described_class.db_time_now - 1.minute
235
235
  expect(described_class.reserve(worker)).to eq(job)
236
236
  end
@@ -595,7 +595,12 @@ shared_examples_for 'a delayed_job backend' do
595
595
  worker.work_off
596
596
  @job.reload
597
597
  expect(@job.last_error).to match(/did not work/)
598
- expect(@job.last_error).to match(/sample_jobs.rb:\d+:in `perform'/)
598
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0')
599
+ # Ruby 3.4 produces a more verbose message
600
+ expect(@job.last_error).to match(/sample_jobs.rb:\d+:in 'ErrorJob#perform'/)
601
+ else
602
+ expect(@job.last_error).to match(/sample_jobs.rb:\d+:in `perform'/)
603
+ end
599
604
  expect(@job.attempts).to eq(1)
600
605
  expect(@job.run_at).to be > Delayed::Job.db_time_now - 10.minutes
601
606
  expect(@job.run_at).to be < Delayed::Job.db_time_now + 10.minutes
@@ -3,25 +3,13 @@ require 'active_support/version'
3
3
  module Delayed
4
4
  module Compatibility
5
5
  if ActiveSupport::VERSION::MAJOR >= 4
6
- require 'active_support/proxy_object'
7
-
8
6
  def self.executable_prefix
9
7
  'bin'
10
8
  end
11
-
12
- def self.proxy_object_class
13
- ActiveSupport::ProxyObject
14
- end
15
9
  else
16
- require 'active_support/basic_object'
17
-
18
10
  def self.executable_prefix
19
11
  'script'
20
12
  end
21
-
22
- def self.proxy_object_class
23
- ActiveSupport::BasicObject
24
- end
25
13
  end
26
14
  end
27
15
  end
@@ -1,5 +1,15 @@
1
1
  module Delayed
2
- class DelayProxy < Delayed::Compatibility.proxy_object_class
2
+ class DelayProxy < BasicObject
3
+ # What additional methods exist on BasicObject has changed over time
4
+ (::BasicObject.instance_methods - [:__id__, :__send__, :instance_eval, :instance_exec]).each do |method|
5
+ undef_method method
6
+ end
7
+
8
+ # Let DelayProxy raise exceptions.
9
+ def raise(*args)
10
+ ::Object.send(:raise, *args)
11
+ end
12
+
3
13
  def initialize(payload_class, target, options)
4
14
  @payload_class = payload_class
5
15
  @target = target
data/spec/worker_spec.rb CHANGED
@@ -106,7 +106,7 @@ describe Delayed::Worker do
106
106
  expect(Delayed::Job).to receive(:reserve).exactly(10).times.and_raise(Exception)
107
107
  worker = Delayed::Worker.new
108
108
  9.times { worker.work_off }
109
- expect(lambda { worker.work_off }).to raise_exception Delayed::FatalBackendError
109
+ expect { worker.work_off }.to raise_exception Delayed::FatalBackendError
110
110
  end
111
111
 
112
112
  it 'allows the backend to attempt recovery from reservation errors' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.11
4
+ version: 4.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
@@ -12,10 +12,10 @@ authors:
12
12
  - Matt Griffin
13
13
  - Steve Richert
14
14
  - Tobias Lütke
15
- autorequire:
15
+ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2022-09-28 00:00:00.000000000 Z
18
+ date: 2024-08-14 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: activesupport
@@ -106,7 +106,7 @@ metadata:
106
106
  changelog_uri: https://github.com/collectiveidea/delayed_job/blob/master/CHANGELOG.md
107
107
  bug_tracker_uri: https://github.com/collectiveidea/delayed_job/issues
108
108
  source_code_uri: https://github.com/collectiveidea/delayed_job
109
- post_install_message:
109
+ post_install_message:
110
110
  rdoc_options: []
111
111
  require_paths:
112
112
  - lib
@@ -121,8 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.3.7
125
- signing_key:
124
+ rubygems_version: 3.5.11
125
+ signing_key:
126
126
  specification_version: 4
127
127
  summary: Database-backed asynchronous priority queue system -- Extracted from Shopify
128
128
  test_files: