resque_unit 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/resque_unit.rb +3 -1
- data/lib/resque_unit/resque.rb +1 -1
- data/lib/resque_unit/scheduler_assertions.rb +4 -6
- data/lib/resque_unit_scheduler.rb +3 -0
- metadata +13 -27
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9e0e3c7f7d4cad3dc63fa237ae005301f4af35b3
|
4
|
+
data.tar.gz: 70a5b02ed5489ca49dddede177aec931ffddd130
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 55708341b9b9da6130d5052c64984004ed5f0e21d386b23dfffc6a6f25cf9025a71cc845fb29e0d7d5ccd9bedbe0d5447a267c89fbda3b6347fc6e92638101e5
|
7
|
+
data.tar.gz: 32ed8a4ac5d7f8a015490ef31a2a35dc7e57bc1d8c260f1ec99a4b5936825d5df48b55f3472de5641f063496b41cef210f58c89240f2be43beef429438c543de
|
data/lib/resque_unit.rb
CHANGED
data/lib/resque_unit/resque.rb
CHANGED
@@ -116,7 +116,7 @@ module Resque
|
|
116
116
|
def enqueue_to( queue_name, klass, *args )
|
117
117
|
# Behaves like Resque, raise if no queue was specifed
|
118
118
|
raise NoQueueError.new("Jobs must be placed onto a queue.") unless queue_name
|
119
|
-
enqueue_unit(queue_name, {"class" => klass.
|
119
|
+
enqueue_unit(queue_name, {"class" => klass.to_s, "args" => args })
|
120
120
|
end
|
121
121
|
|
122
122
|
# :nodoc:
|
@@ -14,9 +14,8 @@ module ResqueUnit::SchedulerAssertions
|
|
14
14
|
# arguments.
|
15
15
|
def assert_queued_at(expected_timestamp, klass, args = nil, message = nil)
|
16
16
|
queue = Resque.queue_for(klass)
|
17
|
-
|
18
|
-
|
19
|
-
end
|
17
|
+
assert in_timestamped_queue?(queue, expected_timestamp, klass, args),
|
18
|
+
(message || "#{klass} should have been queued in #{queue} before #{expected_timestamp}: #{Resque.queue(queue).inspect}.")
|
20
19
|
end
|
21
20
|
|
22
21
|
# Similar to +assert_queued_at+, except it takes an expected time
|
@@ -28,9 +27,8 @@ module ResqueUnit::SchedulerAssertions
|
|
28
27
|
# opposite of +assert_queued_at+
|
29
28
|
def assert_not_queued_at(expected_timestamp, klass, args = nil, message = nil)
|
30
29
|
queue = Resque.queue_for(klass)
|
31
|
-
|
32
|
-
|
33
|
-
end
|
30
|
+
assert !in_timestamped_queue?(queue, expected_timestamp, klass, args),
|
31
|
+
(message || "#{klass} should not have been queued in #{queue} before #{expected_timestamp}.")
|
34
32
|
end
|
35
33
|
|
36
34
|
# opposite of +assert_queued_in+
|
metadata
CHANGED
@@ -1,62 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque_unit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Justin Weiss
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-09-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: json
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 1.4.6
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 1.4.6
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: bundler
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: shoulda
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
description:
|
@@ -83,33 +76,26 @@ files:
|
|
83
76
|
- README.md
|
84
77
|
homepage: http://github.com/justinweiss/resque_unit
|
85
78
|
licenses: []
|
79
|
+
metadata: {}
|
86
80
|
post_install_message:
|
87
81
|
rdoc_options: []
|
88
82
|
require_paths:
|
89
83
|
- lib
|
90
84
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
-
none: false
|
92
85
|
requirements:
|
93
|
-
- -
|
86
|
+
- - '>='
|
94
87
|
- !ruby/object:Gem::Version
|
95
88
|
version: '0'
|
96
|
-
segments:
|
97
|
-
- 0
|
98
|
-
hash: 2272660890872947016
|
99
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
90
|
requirements:
|
102
|
-
- -
|
91
|
+
- - '>='
|
103
92
|
- !ruby/object:Gem::Version
|
104
93
|
version: '0'
|
105
|
-
segments:
|
106
|
-
- 0
|
107
|
-
hash: 2272660890872947016
|
108
94
|
requirements: []
|
109
95
|
rubyforge_project:
|
110
|
-
rubygems_version:
|
96
|
+
rubygems_version: 2.0.6
|
111
97
|
signing_key:
|
112
|
-
specification_version:
|
98
|
+
specification_version: 4
|
113
99
|
summary: Test::Unit support for resque job queueing
|
114
100
|
test_files:
|
115
101
|
- test/resque_test.rb
|