resque-unique_by_arity 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 072dbabfd78802670a7af15eac3041207d41794f
4
- data.tar.gz: f473a59c94324b20f61dc86bcd2274dd4712baed
3
+ metadata.gz: 4444b6a7c6bf4b6a8d24ba5d6ecda5b0626e702e
4
+ data.tar.gz: db5347bfc38db54129cae0afb7af62b0d9596d80
5
5
  SHA512:
6
- metadata.gz: 484353175f6ba29e39a592f3c092ab242a888b448e2f7053d6858dd07cb320662bc99d0eea318c948fa8a3d4e5ceaab0439c970d30b145ca34c044eaf8667441
7
- data.tar.gz: 6a1b8226179d38f45b82ec5454a7ad71343c39af9a0bb75851c1c05d5654a5ab423e24dcc178c36617be79a7378accc46ef24e907806959d13da2605b1323c7f
6
+ metadata.gz: 4ba38bc31db1ac84cc2665a7443265ba98d55377abfc346b65218a81e4d6df174496b7361c48ef6c3a94b89a7030b599ca1b52a1aa01e88396d35d5428709a06
7
+ data.tar.gz: 0546e76f497598b47b8769159c2ea644ee3f840e482717be9433dbb16a9c2171283ec537d10a7495a30cb455079311e03b818d9ef960a433e85bc68135204d56
@@ -17,9 +17,12 @@ module Resque
17
17
  @unique_at_runtime = options.key?(:unique_at_runtime) ? options[:unique_at_runtime] : false
18
18
  @unique_in_queue = options.key?(:unique_in_queue) ? options[:unique_in_queue] : false
19
19
  @unique_across_queues = options.key?(:unique_across_queues) ? options[:unique_across_queues] : false
20
- warn ":arity_for_uniqueness is set to #{@arity_for_uniqueness}, but no uniqueness enforcement was turned on [:unique_at_runtime, :unique_in_queue, :unique_across_queues]" unless @unique_at_runtime || @unique_in_queue || @unique_across_queues
21
- warn ":lock_after_execution_period is set to #{@lock_after_execution_period}, but :unique_at_runtime is not set" if @lock_after_execution_period && !@unique_at_runtime
22
- warn ":unique_in_queue and :unique_across_queues should not be set at the same time, as :unique_across_queues will always supercede :unique_in_queue" if @unique_in_queue && @unique_across_queues
20
+ # The default config initialization shouldn't trigger any warnings.
21
+ if options.keys.length > 0
22
+ warn ":arity_for_uniqueness is set to #{@arity_for_uniqueness}, but no uniqueness enforcement was turned on [:unique_at_runtime, :unique_in_queue, :unique_across_queues]" unless @unique_at_runtime || @unique_in_queue || @unique_across_queues
23
+ warn ":lock_after_execution_period is set to #{@lock_after_execution_period}, but :unique_at_runtime is not set" if @lock_after_execution_period && !@unique_at_runtime
24
+ warn ":unique_in_queue and :unique_across_queues should not be set at the same time, as :unique_across_queues will always supercede :unique_in_queue" if @unique_in_queue && @unique_across_queues
25
+ end
23
26
  end
24
27
  def to_hash
25
28
  {
@@ -1,5 +1,5 @@
1
1
  module Resque
2
2
  module UniqueByArity
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-unique_by_arity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling