sidetiq 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/sidetiq/version.rb +2 -2
- data/sidetiq.gemspec +1 -1
- data/test/helper.rb +1 -1
- data/test/test_sidetiq.rb +7 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e74875f92ae3dde7fe52ed987ee793e739b33410
|
4
|
+
data.tar.gz: 3d11a3504aabcb2c039a77e039f3719a392a06e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77728e60b7e676d22fde48e7718ce50deec35d2326eb338a409ab64a7455c36c43e6971f4cf36460ef7a37362d175610fa9f56700a705eaf464a08c49f603092
|
7
|
+
data.tar.gz: 30dc8422161e6620872b702b5135c11cb507fba8f4183abd8cbaa6c1abc74e9b91e3b81e5026e47f45230560f2bf259beac9e5cfc233ada171c7e0d2a4981c01
|
data/CHANGELOG.md
CHANGED
data/lib/sidetiq/version.rb
CHANGED
data/sidetiq.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
gem.extensions = []
|
21
21
|
|
22
|
-
gem.add_dependency 'sidekiq', '
|
22
|
+
gem.add_dependency 'sidekiq', '>= 2.16.0'
|
23
23
|
gem.add_dependency 'celluloid', '>= 0.14.1'
|
24
24
|
gem.add_dependency 'ice_cube', '~> 0.11.0'
|
25
25
|
|
data/test/helper.rb
CHANGED
@@ -35,7 +35,7 @@ class Sidekiq::Client
|
|
35
35
|
# Sidekiq testing helper now overwrites raw_push so we need to use
|
36
36
|
# raw_push_old below to keep tests as is.
|
37
37
|
# https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/testing.rb
|
38
|
-
def
|
38
|
+
def push_old(item)
|
39
39
|
normed = normalize_item(item)
|
40
40
|
payload = process_single(item['class'], normed)
|
41
41
|
|
data/test/test_sidetiq.rb
CHANGED
@@ -19,9 +19,10 @@ class TestSidetiq < Sidetiq::TestCase
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def test_scheduled
|
22
|
+
client = Sidekiq::Client.new
|
22
23
|
SimpleWorker.perform_at(Time.local(2011, 1, 1, 1))
|
23
24
|
hash = SimpleWorker.jobs.first
|
24
|
-
|
25
|
+
client.push_old(hash.merge("at" => hash["enqueued_at"]))
|
25
26
|
|
26
27
|
scheduled = Sidetiq.scheduled
|
27
28
|
|
@@ -35,9 +36,10 @@ class TestSidetiq < Sidetiq::TestCase
|
|
35
36
|
end
|
36
37
|
|
37
38
|
def test_scheduled_given_arguments
|
39
|
+
client = Sidekiq::Client.new
|
38
40
|
SimpleWorker.perform_at(Time.local(2011, 1, 1, 1))
|
39
41
|
hash = SimpleWorker.jobs.first
|
40
|
-
|
42
|
+
client.push_old(hash.merge("at" => hash["enqueued_at"]))
|
41
43
|
|
42
44
|
assert_equal 1, Sidetiq.scheduled(SimpleWorker).length
|
43
45
|
assert_equal 0, Sidetiq.scheduled(ScheduledWorker).length
|
@@ -47,13 +49,14 @@ class TestSidetiq < Sidetiq::TestCase
|
|
47
49
|
end
|
48
50
|
|
49
51
|
def test_scheduled_yields_each_job
|
52
|
+
client = Sidekiq::Client.new
|
50
53
|
SimpleWorker.perform_at(Time.local(2011, 1, 1, 1))
|
51
54
|
hash = SimpleWorker.jobs.first
|
52
|
-
|
55
|
+
client.push_old(hash.merge("at" => hash["enqueued_at"]))
|
53
56
|
|
54
57
|
ScheduledWorker.perform_at(Time.local(2011, 1, 1, 1))
|
55
58
|
hash = ScheduledWorker.jobs.first
|
56
|
-
|
59
|
+
client.push_old(hash.merge("at" => hash["enqueued_at"]))
|
57
60
|
|
58
61
|
jobs = []
|
59
62
|
Sidetiq.scheduled { |job| jobs << job }
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidetiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Svensson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.16.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.16.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: celluloid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|