sidekiq-superworker 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,13 +1,17 @@
1
- # Allow a job's JID to be specified in Sidekiq::Client#push
2
- module Sidekiq
3
- class Client
4
- class << self
5
- alias_method :original_normalize_item, :normalize_item
1
+ # We need to be able to inject the jid for a job when we call Sidekiq::Client#push.
2
+ # Sidekiq didn't support this prior to 2.12.2, so we need to add support for it to
3
+ # those versions.
4
+ if Gem::Version.new(Sidekiq::VERSION) < Gem::Version.new('2.12.2')
5
+ module Sidekiq
6
+ class Client
7
+ class << self
8
+ alias_method :original_normalize_item, :normalize_item
6
9
 
7
- def normalize_item(item)
8
- normalized_item = original_normalize_item(item)
9
- normalized_item['jid'] = item['jid'] if item['jid'].present?
10
- normalized_item
10
+ def normalize_item(item)
11
+ normalized_item = original_normalize_item(item)
12
+ normalized_item['jid'] = item['jid'] if item['jid'].present?
13
+ normalized_item
14
+ end
11
15
  end
12
16
  end
13
17
  end
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Superworker
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-superworker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-13 00:00:00.000000000 Z
12
+ date: 2014-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq