resque_unit 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/resque_unit.rb +10 -4
- data/lib/resque_unit/helpers.rb +1 -1
- data/lib/resque_unit/resque.rb +2 -2
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8e67a54d90ec01474428f0328f36da823b55d6e
|
4
|
+
data.tar.gz: 078360022759d5029ebb071d853ad884be373fa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4742665653ca9edaf3e77d8d84ac464ebd6af9494b46258f83e0602408fce05055e7a497e904f91acfd7112d4d4c0ad48eb5c2a576473604281ffddbcaff9e6e
|
7
|
+
data.tar.gz: b5651bad1523134bcadf35980ffb0cf9aa05dd760e32942bfcd2f9b0e9d4d82ef58bc799fb6c4164c4ee733d5223e39f6be582837a5935dfb3d9ceb1c560ab2d
|
data/lib/resque_unit.rb
CHANGED
@@ -7,14 +7,20 @@ rescue LoadError
|
|
7
7
|
require 'json'
|
8
8
|
end
|
9
9
|
|
10
|
-
require 'test/unit/testcase'
|
11
10
|
require 'resque_unit/helpers'
|
12
11
|
require 'resque_unit/resque'
|
13
12
|
require 'resque_unit/errors'
|
14
13
|
require 'resque_unit/assertions'
|
15
14
|
require 'resque_unit/plugin'
|
16
15
|
|
17
|
-
Test::Unit
|
18
|
-
|
16
|
+
if defined?(Test::Unit)
|
17
|
+
Test::Unit::TestCase.send(:include, ResqueUnit::Assertions)
|
18
|
+
end
|
19
|
+
|
20
|
+
if defined?(MiniTest::Unit::TestCase)
|
19
21
|
MiniTest::Unit::TestCase.send(:include, ResqueUnit::Assertions)
|
20
|
-
end
|
22
|
+
end
|
23
|
+
|
24
|
+
if defined?(Minitest::Test)
|
25
|
+
Minitest::Test.send(:include, ResqueUnit::Assertions)
|
26
|
+
end
|
data/lib/resque_unit/helpers.rb
CHANGED
data/lib/resque_unit/resque.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# The fake Resque class. This needs to be loaded after the real Resque
|
2
2
|
# for the assertions in +ResqueUnit::Assertions+ to work.
|
3
3
|
module Resque
|
4
|
-
include Helpers
|
4
|
+
include ResqueUnit::Helpers
|
5
5
|
extend self
|
6
6
|
|
7
7
|
# Resets all the queues to the empty state. This should be called in
|
@@ -215,7 +215,7 @@ module Resque
|
|
215
215
|
end
|
216
216
|
|
217
217
|
class Job
|
218
|
-
extend Helpers
|
218
|
+
extend ResqueUnit::Helpers
|
219
219
|
def self.create(queue, klass_name, *args)
|
220
220
|
Resque.enqueue_unit(queue, {"class" => constantize(klass_name).to_s, "args" => args})
|
221
221
|
end
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque_unit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Weiss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.4.6
|
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
26
|
version: 1.4.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: shoulda
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description:
|
@@ -59,6 +59,8 @@ extensions: []
|
|
59
59
|
extra_rdoc_files:
|
60
60
|
- README.md
|
61
61
|
files:
|
62
|
+
- README.md
|
63
|
+
- lib/resque_unit.rb
|
62
64
|
- lib/resque_unit/assertions.rb
|
63
65
|
- lib/resque_unit/errors.rb
|
64
66
|
- lib/resque_unit/helpers.rb
|
@@ -66,14 +68,12 @@ files:
|
|
66
68
|
- lib/resque_unit/resque.rb
|
67
69
|
- lib/resque_unit/scheduler.rb
|
68
70
|
- lib/resque_unit/scheduler_assertions.rb
|
69
|
-
- lib/resque_unit.rb
|
70
71
|
- lib/resque_unit_scheduler.rb
|
71
72
|
- test/resque_test.rb
|
72
73
|
- test/resque_unit_scheduler_test.rb
|
73
74
|
- test/resque_unit_test.rb
|
74
75
|
- test/sample_jobs.rb
|
75
76
|
- test/test_helper.rb
|
76
|
-
- README.md
|
77
77
|
homepage: http://github.com/justinweiss/resque_unit
|
78
78
|
licenses: []
|
79
79
|
metadata: {}
|
@@ -83,17 +83,17 @@ require_paths:
|
|
83
83
|
- lib
|
84
84
|
required_ruby_version: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- -
|
86
|
+
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - ">="
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
95
|
rubyforge_project:
|
96
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.2.2
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Test::Unit support for resque job queueing
|