sidekiq-status 2.0.2 → 2.1.0

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: 3e44ab90955a60880c79cadc648a5c9883e635faf6b5439093830bb138f0309c
4
- data.tar.gz: 4b61eefa63d54d14d8183616b5cb3806b13e234d810ee67a8fb0519614ac97d9
3
+ metadata.gz: fc3436d5bc785da39c9f4f9d56d8179d75acc534935b9cab980ef7266bcdbe94
4
+ data.tar.gz: 373f55bc1dc6cb235fe1f858ceb6ccb49fbe4e8864e9dd1951c83cd1ae053e69
5
5
  SHA512:
6
- metadata.gz: 874e1d6ceeb732aaab70c95ae1b41f78c1422a2da3f93e947b3ef353d558f9b51dd4dc395b3a5d7a19ee3b4560c509768e20dcb5faa9418ee344423b3c12412f
7
- data.tar.gz: fc8e8e604ba7fecea63d13933bd6cf8a0aa9232de253bc015244fe9f0b7c5b81dcedd457db9fc409d515b2a76c222e89d0124547bf33505a710cfdb740ba2119
6
+ metadata.gz: 30ac2390e17ceb73ace6481921e28ad42ab2111012007ff2577a997ca7f34a6e8da59f06fa856f7abcbb07086c1863110417a6c2063399af672ee3e17fc227ad
7
+ data.tar.gz: b0084cbfdd76b4215d6787b5d910d84722bc538de84ef0f0663990a2dd0ec2ed3bc3e8aee9b71b50336517c11c86843c5abd190964c6321e5a0c27f8353f3fb3
data/.travis.yml CHANGED
@@ -6,6 +6,7 @@ rvm:
6
6
  - ruby-head
7
7
  gemfile:
8
8
  - gemfiles/sidekiq_5.x.gemfile
9
+ - gemfiles/sidekiq_6.1.gemfile
9
10
  - gemfiles/sidekiq_6.x.gemfile
10
11
  before_install:
11
12
  - gem update --system
data/Appraisals CHANGED
@@ -2,6 +2,10 @@ appraise "sidekiq-5.x" do
2
2
  gem "sidekiq", "~> 5"
3
3
  end
4
4
 
5
+ appraise "sidekiq-6.1" do
6
+ gem "sidekiq", "~> 6.1"
7
+ end
8
+
5
9
  appraise "sidekiq-6.x" do
6
10
  gem "sidekiq", "~> 6"
7
11
  end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ **Version 2.0.2**
2
+ * Fixes for dark mode theme
3
+
1
4
  **Version 2.0.1**
2
5
  * Adds support for dark mode to the job status page
3
6
 
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "sidekiq", "~> 6.1"
6
+
7
+ gemspec path: "../"
@@ -1,4 +1,6 @@
1
1
  require 'sidekiq/api'
2
+ JOB_CLASS = Sidekiq.constants.include?(:JobRecord) ? Sidekiq::JobRecord : Sidekiq::Job
3
+
2
4
  module Sidekiq::Status
3
5
  # Should be in the client middleware chain
4
6
  class ClientMiddleware
@@ -34,7 +36,7 @@ module Sidekiq::Status
34
36
  initial_metadata = {
35
37
  jid: msg['jid'],
36
38
  status: :queued,
37
- worker: Sidekiq::Job.new(msg, queue).display_class,
39
+ worker: JOB_CLASS.new(msg, queue).display_class,
38
40
  args: display_args(msg, queue)
39
41
  }
40
42
  store_for_id msg['jid'], initial_metadata, job_class.new.expiration || @expiration, redis_pool
@@ -45,7 +47,7 @@ module Sidekiq::Status
45
47
  end
46
48
 
47
49
  def display_args(msg, queue)
48
- job = Sidekiq::Job.new(msg, queue)
50
+ job = JOB_CLASS.new(msg, queue)
49
51
  return job.display_args.to_a.empty? ? nil : job.display_args.to_json
50
52
  rescue Exception => e
51
53
  # For Sidekiq ~> 2.7
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Status
3
- VERSION = '2.0.2'
3
+ VERSION = '2.1.0'
4
4
  end
5
5
  end
@@ -159,7 +159,7 @@ describe Sidekiq::Status do
159
159
  end
160
160
 
161
161
  it "retries failed jobs" do
162
- allow(SecureRandom).to receive(:hex).and_return(retried_job_id)
162
+ allow(SecureRandom).to receive(:hex).exactly(3).times.and_return(retried_job_id)
163
163
  start_server do
164
164
  expect(capture_status_updates(3) {
165
165
  expect(RetriedJob.perform_async()).to eq(retried_job_id)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-status
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Tsvigun
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-07 00:00:00.000000000 Z
12
+ date: 2021-09-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq
@@ -142,6 +142,7 @@ files:
142
142
  - README.md
143
143
  - Rakefile
144
144
  - gemfiles/sidekiq_5.x.gemfile
145
+ - gemfiles/sidekiq_6.1.gemfile
145
146
  - gemfiles/sidekiq_6.x.gemfile
146
147
  - lib/sidekiq-status.rb
147
148
  - lib/sidekiq-status/client_middleware.rb