resque-uniq 0.0.7 → 0.0.8

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 ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NjRmZjI0Zjc1ZDZhYTlmMzdkZmEwMzliZDI0ZDVmMjdiZmQ3MGU0Nw==
5
+ data.tar.gz: !binary |-
6
+ NGI1MzBmYTAxZmQyMmUzYzA3OWMxYmRhOWY3NjkyY2Y4MjYwNDgzYw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZGZlODU2YWZkZGM2MDRkMjEyOWU4MTdlZDg5YjA4M2MzZDM0YzU5M2UwMjdh
10
+ YmY1NTBkYjE3ZmJmYzA4M2ZkNzM2OWYzNTcwMzRhZmM3YzRhYWVmMGJlMDEy
11
+ YjljNzFjZTg2MzNhMWRhMjgyZGY1MzcyYmJhZDEyY2RjZWQ2MDA=
12
+ data.tar.gz: !binary |-
13
+ Y2VlY2MxYTczNjFjMGUwMGM2NTZiYjYyY2QzMjdiYTM4YTVhMzA1N2ZlY2Jm
14
+ NDdkYjBiYjA5ZDgyMmJhYzMxYWU3NjA1NWE4YTM5MjJkZDc5NTczNjM0M2Rm
15
+ ZTZmYWQ5MDJhMDFmYTRhNjI2N2M0Y2UxMTZlM2I2YTJiMDRkMDc=
data/.travis.yml CHANGED
@@ -1,7 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
3
  - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
6
+ services:
7
+ - redis
5
8
  notifications:
6
9
  email:
7
10
  - trung.travis@tdtran.org
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
@@ -56,6 +56,9 @@ module Resque
56
56
  end
57
57
 
58
58
  def around_perform_lock(*args)
59
+ # we must calculate the lock name before executing job's perform method, it can modify *args
60
+ jlock = lock(*args)
61
+
59
62
  rlock = run_lock(*args)
60
63
  Resque.redis.set(rlock, Time.now.to_i)
61
64
 
@@ -63,7 +66,7 @@ module Resque
63
66
  yield
64
67
  ensure
65
68
  Resque.redis.del(rlock)
66
- Resque.redis.del(lock(*args))
69
+ Resque.redis.del(jlock)
67
70
  end
68
71
  end
69
72
 
@@ -1,3 +1,3 @@
1
1
  module ResqueUniq
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-uniq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
5
- prerelease:
4
+ version: 0.0.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Trung Duc Tran
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-09-24 00:00:00.000000000 Z
11
+ date: 2014-01-24 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description:
15
14
  email:
@@ -31,33 +30,26 @@ files:
31
30
  - test/unique_job_test.rb
32
31
  homepage: http://github.com/tdtran/resque-uniq
33
32
  licenses: []
33
+ metadata: {}
34
34
  post_install_message:
35
35
  rdoc_options: []
36
36
  require_paths:
37
37
  - lib
38
38
  required_ruby_version: !ruby/object:Gem::Requirement
39
- none: false
40
39
  requirements:
41
40
  - - ! '>='
42
41
  - !ruby/object:Gem::Version
43
42
  version: '0'
44
- segments:
45
- - 0
46
- hash: -48705735375614892
47
43
  required_rubygems_version: !ruby/object:Gem::Requirement
48
- none: false
49
44
  requirements:
50
45
  - - ! '>='
51
46
  - !ruby/object:Gem::Version
52
47
  version: '0'
53
- segments:
54
- - 0
55
- hash: -48705735375614892
56
48
  requirements: []
57
49
  rubyforge_project:
58
- rubygems_version: 1.8.24
50
+ rubygems_version: 2.1.11
59
51
  signing_key:
60
- specification_version: 3
52
+ specification_version: 4
61
53
  summary: A Resque plugin to ensure only one job instance is queued or running at a
62
54
  time.
63
55
  test_files: