sidetiq 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +7 -0
- data/lib/sidetiq/version.rb +1 -1
- data/sidetiq.gemspec +2 -2
- data/test/helper.rb +14 -0
- data/test/test_sidetiq.rb +4 -4
- metadata +17 -23
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6d833d80ba92d8c2ab671eaf83018b756a6a610f
|
4
|
+
data.tar.gz: db7174cfce2e6e2f1f2f915973d20aae2d8b0b29
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 81e03ae40d22adf557accb0bb171737889b4a929b47632c58051a7285d016de6edb8cd0ae7771c0e6ba245b17a73e937c2189d2c37234844a6b64ab74eb87be4
|
7
|
+
data.tar.gz: e52280dc91517a904e3746d63ed25199eb0e27b02bf8ae3301bb599b03823d1454286b7c0969e317f459f9a79a829bf5b4faecd051e54c6dd021d9c4e08a50e7
|
data/CHANGELOG.md
CHANGED
data/lib/sidetiq/version.rb
CHANGED
data/sidetiq.gemspec
CHANGED
@@ -19,6 +19,6 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
gem.extensions = ['ext/sidetiq_ext/extconf.rb']
|
21
21
|
|
22
|
-
gem.add_dependency 'sidekiq', '~> 2.
|
23
|
-
gem.add_dependency 'ice_cube', '~> 0.
|
22
|
+
gem.add_dependency 'sidekiq', '~> 2.12.0'
|
23
|
+
gem.add_dependency 'ice_cube', '~> 0.11.0'
|
24
24
|
end
|
data/test/helper.rb
CHANGED
@@ -20,6 +20,20 @@ Dir[File.join(File.dirname(__FILE__), 'fixtures/**/*.rb')].each do |fixture|
|
|
20
20
|
require fixture
|
21
21
|
end
|
22
22
|
|
23
|
+
class Sidekiq::Client
|
24
|
+
# Sidekiq testing helper now overwrites raw_push so we need to use
|
25
|
+
# raw_push_old below to keep tests as is.
|
26
|
+
# https://github.com/mperham/sidekiq/blob/v2.12.4/lib/sidekiq/client.rb#L39
|
27
|
+
def self.push_old(item)
|
28
|
+
normed = normalize_item(item)
|
29
|
+
payload = process_single(item['class'], normed)
|
30
|
+
|
31
|
+
pushed = false
|
32
|
+
pushed = raw_push_old([payload]) if payload
|
33
|
+
pushed ? payload['jid'] : nil
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
23
37
|
class Sidetiq::TestCase < MiniTest::Unit::TestCase
|
24
38
|
def setup
|
25
39
|
Sidekiq.redis { |r| r.flushall }
|
data/test/test_sidetiq.rb
CHANGED
@@ -23,7 +23,7 @@ class TestSidetiq < Sidetiq::TestCase
|
|
23
23
|
|
24
24
|
def test_scheduled
|
25
25
|
SimpleWorker.perform_at(Time.local(2011, 1, 1, 1))
|
26
|
-
|
26
|
+
Sidekiq::Client.push_old(SimpleWorker.jobs.first)
|
27
27
|
|
28
28
|
scheduled = Sidetiq.scheduled
|
29
29
|
|
@@ -38,7 +38,7 @@ class TestSidetiq < Sidetiq::TestCase
|
|
38
38
|
|
39
39
|
def test_scheduled_given_arguments
|
40
40
|
SimpleWorker.perform_at(Time.local(2011, 1, 1, 1))
|
41
|
-
|
41
|
+
Sidekiq::Client.push_old(SimpleWorker.jobs.first)
|
42
42
|
|
43
43
|
assert_equal 1, Sidetiq.scheduled(SimpleWorker).length
|
44
44
|
assert_equal 0, Sidetiq.scheduled(ScheduledWorker).length
|
@@ -49,10 +49,10 @@ class TestSidetiq < Sidetiq::TestCase
|
|
49
49
|
|
50
50
|
def test_scheduled_yields_each_job
|
51
51
|
SimpleWorker.perform_at(Time.local(2011, 1, 1, 1))
|
52
|
-
|
52
|
+
Sidekiq::Client.push_old(SimpleWorker.jobs.first)
|
53
53
|
|
54
54
|
ScheduledWorker.perform_at(Time.local(2011, 1, 1, 1))
|
55
|
-
|
55
|
+
Sidekiq::Client.push_old(ScheduledWorker.jobs.first)
|
56
56
|
|
57
57
|
jobs = []
|
58
58
|
Sidetiq.scheduled { |job| jobs << job }
|
metadata
CHANGED
@@ -1,48 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidetiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.3.0
|
4
|
+
version: 0.3.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Tobias Svensson
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-06-20 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
14
|
+
name: sidekiq
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
20
|
-
none: false
|
21
|
-
name: sidekiq
|
19
|
+
version: 2.12.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
23
|
requirements:
|
26
24
|
- - ~>
|
27
25
|
- !ruby/object:Gem::Version
|
28
|
-
version: 2.
|
29
|
-
none: false
|
26
|
+
version: 2.12.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
|
28
|
+
name: ice_cube
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
32
30
|
requirements:
|
33
31
|
- - ~>
|
34
32
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
36
|
-
none: false
|
37
|
-
name: ice_cube
|
33
|
+
version: 0.11.0
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
37
|
requirements:
|
42
38
|
- - ~>
|
43
39
|
- !ruby/object:Gem::Version
|
44
|
-
version: 0.
|
45
|
-
none: false
|
40
|
+
version: 0.11.0
|
46
41
|
description: Recurring jobs for Sidekiq
|
47
42
|
email:
|
48
43
|
- tob@tobiassvensson.co.uk
|
@@ -92,27 +87,26 @@ files:
|
|
92
87
|
homepage: http://github.com/tobiassvn/sidetiq
|
93
88
|
licenses:
|
94
89
|
- MIT
|
90
|
+
metadata: {}
|
95
91
|
post_install_message:
|
96
92
|
rdoc_options: []
|
97
93
|
require_paths:
|
98
94
|
- lib
|
99
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
100
96
|
requirements:
|
101
|
-
- -
|
97
|
+
- - '>='
|
102
98
|
- !ruby/object:Gem::Version
|
103
99
|
version: '0'
|
104
|
-
none: false
|
105
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
101
|
requirements:
|
107
|
-
- -
|
102
|
+
- - '>='
|
108
103
|
- !ruby/object:Gem::Version
|
109
104
|
version: '0'
|
110
|
-
none: false
|
111
105
|
requirements: []
|
112
106
|
rubyforge_project:
|
113
|
-
rubygems_version:
|
107
|
+
rubygems_version: 2.0.2
|
114
108
|
signing_key:
|
115
|
-
specification_version:
|
109
|
+
specification_version: 4
|
116
110
|
summary: Recurring jobs for Sidekiq
|
117
111
|
test_files:
|
118
112
|
- test/fixtures/backfill_worker.rb
|