sidekiq-unique-jobs 3.0.11 → 3.0.12

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sidekiq-unique-jobs might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58ca57b1c96449ad911a8877213042e5841fed6a
4
- data.tar.gz: ad3c813df8ea6af8fe777b5159486aef110c14ae
3
+ metadata.gz: 8c9eff48d1f8cefec85845b3219bdee4ade019fc
4
+ data.tar.gz: c4241dbb2845b7ed7ea2ff78197a9e1b22f134c4
5
5
  SHA512:
6
- metadata.gz: 48b85b8f6126bc57dd6456842f55f160bdc94f0b6937197b9b03669dca4b4b67c1a22b131312439f20a485a159a3f2981ec09d4044eace8a00b4c17d044d1bfa
7
- data.tar.gz: fcfd18f652ce9ca72db065a433401b9eb0e936700707186c53796200a2a2468a3d62aadc099ce424a14fad0972085c624d4cc8f82a45f263672a6909d756c740
6
+ metadata.gz: fb8d4676c2f6c74061c462f5c71da38df4c433ca6c46b79aa0f8e05fba1391e0fa06ebd5139438e9522b0c97e72653e60ed359beba9b10152d1478b42da1e94c
7
+ data.tar.gz: ff3c62e6f6e6676d8ebb3a13a5afa9e39533ae7fdda1c6ae602fde89f32593956f80006bec2cdd1a98e606793d2209db0c785454391da4cefdca07970a052eed
data/.travis.yml CHANGED
@@ -6,7 +6,8 @@ rvm:
6
6
  - jruby-19mode
7
7
  - rbx-19mode
8
8
  - 2.0.0
9
- - 2.1.0
9
+ - 2.1.2
10
+ - 2.2.2
10
11
  gemfile:
11
12
  - gemfiles/sidekiq_2.15.gemfile
12
13
  - gemfiles/sidekiq_2.16.gemfile
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'http://rubygems.org'
2
2
  gemspec
3
3
 
4
- gem 'appraisal', '~> 1.0.0'
4
+ gem 'appraisal', '~> 2.0.0'
5
5
  gem 'pry', platform: :mri
@@ -30,8 +30,8 @@ module SidekiqUniqueJobs
30
30
  end
31
31
  end
32
32
 
33
- def testing_enabled?
34
- if Sidekiq.const_defined?('Testing') && Sidekiq::Testing.enabled?
33
+ def inline_testing_enabled?
34
+ if Sidekiq.const_defined?('Testing') && Sidekiq::Testing.enabled? && Sidekiq::Testing.inline?
35
35
  require 'sidekiq_unique_jobs/testing'
36
36
  return true
37
37
  end
@@ -9,7 +9,7 @@ module SidekiqUniqueJobs
9
9
  def self.connection(redis_pool = nil, &block)
10
10
  CONNECTOR_TYPES.each do |connector|
11
11
  had_connection = connector.connection(redis_pool, &block)
12
- return if had_connection
12
+ break if had_connection
13
13
  end
14
14
  end
15
15
  end
@@ -2,7 +2,7 @@ module SidekiqUniqueJobs
2
2
  module Connectors
3
3
  class Testing
4
4
  def self.connection(_redis_pool = nil)
5
- return unless SidekiqUniqueJobs.config.testing_enabled?
5
+ return unless SidekiqUniqueJobs.config.inline_testing_enabled?
6
6
  yield SidekiqUniqueJobs.redis_mock
7
7
  true
8
8
  end
@@ -6,7 +6,7 @@ module SidekiqUniqueJobs
6
6
  module Strategies
7
7
  class TestingInline < Unique
8
8
  def self.elegible?
9
- SidekiqUniqueJobs.config.testing_enabled? && Sidekiq::Testing.inline?
9
+ SidekiqUniqueJobs.config.inline_testing_enabled?
10
10
  end
11
11
 
12
12
  def review
@@ -23,7 +23,10 @@ module SidekiqUniqueJobs
23
23
 
24
24
  def review
25
25
  item['unique_hash'] = payload_hash
26
- return unless unique_for_connection?
26
+ unless unique_for_connection?
27
+ Sidekiq.logger.warn "payload is not unique #{item}"
28
+ return
29
+ end
27
30
  yield
28
31
  end
29
32
 
@@ -1,3 +1,3 @@
1
1
  module SidekiqUniqueJobs
2
- VERSION = '3.0.11'
2
+ VERSION = '3.0.12'
3
3
  end
@@ -3,6 +3,7 @@ require 'sidekiq/worker'
3
3
  require 'sidekiq-unique-jobs'
4
4
  require 'sidekiq/scheduled'
5
5
  require 'sidekiq_unique_jobs/middleware/server/unique_jobs'
6
+ require 'active_support/core_ext/time'
6
7
  require 'active_support/testing/time_helpers'
7
8
  require 'rspec-sidekiq'
8
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-unique-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.11
4
+ version: 3.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-15 00:00:00.000000000 Z
11
+ date: 2015-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  version: '0'
192
192
  requirements: []
193
193
  rubyforge_project:
194
- rubygems_version: 2.2.2
194
+ rubygems_version: 2.4.6
195
195
  signing_key:
196
196
  specification_version: 4
197
197
  summary: The unique jobs that were removed from sidekiq