backgrounded-resque 2.0.0.rc4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc
CHANGED
data/backgrounded.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.rubyforge_project = "backgrounded"
|
16
16
|
|
17
|
-
s.add_runtime_dependency(%q<backgrounded>, [">= 2.
|
17
|
+
s.add_runtime_dependency(%q<backgrounded>, [">= 2.1.0"])
|
18
18
|
s.add_runtime_dependency(%q<resque>, [">= 0.17.1"])
|
19
19
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
20
20
|
s.add_development_dependency(%q<resque_unit>, [">= 0.3.7"])
|
@@ -1,13 +1,12 @@
|
|
1
1
|
require 'resque'
|
2
|
-
require 'backgrounded/handler/abstract_handler'
|
3
2
|
|
4
3
|
# handler that acts like the in process handler but marshalls the arguments
|
5
4
|
# this simulates how resque encodes/decodes values to/from redis
|
6
5
|
# useful when passing symbols to arguments and they end up being processed as strings
|
7
6
|
module Backgrounded
|
8
7
|
module Resque
|
9
|
-
class PseudoResqueHandler
|
10
|
-
def request(object, method, args)
|
8
|
+
class PseudoResqueHandler
|
9
|
+
def request(object, method, args, options={})
|
11
10
|
marshalled_args = ::Resque.decode(::Resque.encode(args))
|
12
11
|
object.send method, *marshalled_args
|
13
12
|
end
|
@@ -1,11 +1,10 @@
|
|
1
1
|
require 'resque'
|
2
|
-
require 'backgrounded/handler/abstract_handler'
|
3
2
|
require 'active_record/base'
|
4
3
|
|
5
4
|
# enqueue requests in resque
|
6
5
|
module Backgrounded
|
7
6
|
module Resque
|
8
|
-
class ResqueHandler
|
7
|
+
class ResqueHandler
|
9
8
|
DEFAULT_QUEUE = 'backgrounded'
|
10
9
|
INVALID_ID = -1
|
11
10
|
|
@@ -17,7 +16,7 @@ module Backgrounded
|
|
17
16
|
# enqueue the requested operation into resque
|
18
17
|
# the resque worker will invoke .perform with the class/method/args
|
19
18
|
# @see .perform
|
20
|
-
def request(object, method, args)
|
19
|
+
def request(object, method, args, options={})
|
21
20
|
ResqueHandler.queue = options[:queue] || DEFAULT_QUEUE
|
22
21
|
instance, id = instance_identifiers(object)
|
23
22
|
::Resque.enqueue(ResqueHandler, instance, id, method, *args)
|
metadata
CHANGED
@@ -1,30 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backgrounded-resque
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ryan Sonnek
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-03-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: backgrounded
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 2.
|
21
|
+
version: 2.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.1.0
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: resque
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: 0.17.1
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.17.1
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: shoulda
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,10 +53,15 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: resque_unit
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ! '>='
|
@@ -54,10 +69,15 @@ dependencies:
|
|
54
69
|
version: 0.3.7
|
55
70
|
type: :development
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 0.3.7
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
79
|
name: mocha
|
60
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
61
81
|
none: false
|
62
82
|
requirements:
|
63
83
|
- - ! '>='
|
@@ -65,10 +85,15 @@ dependencies:
|
|
65
85
|
version: '0'
|
66
86
|
type: :development
|
67
87
|
prerelease: false
|
68
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
69
94
|
- !ruby/object:Gem::Dependency
|
70
95
|
name: sqlite3-ruby
|
71
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
72
97
|
none: false
|
73
98
|
requirements:
|
74
99
|
- - ! '>='
|
@@ -76,10 +101,15 @@ dependencies:
|
|
76
101
|
version: 1.3.2
|
77
102
|
type: :development
|
78
103
|
prerelease: false
|
79
|
-
version_requirements:
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.3.2
|
80
110
|
- !ruby/object:Gem::Dependency
|
81
111
|
name: rake
|
82
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
83
113
|
none: false
|
84
114
|
requirements:
|
85
115
|
- - ! '>='
|
@@ -87,10 +117,15 @@ dependencies:
|
|
87
117
|
version: 0.9.2.2
|
88
118
|
type: :development
|
89
119
|
prerelease: false
|
90
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 0.9.2.2
|
91
126
|
- !ruby/object:Gem::Dependency
|
92
127
|
name: pry
|
93
|
-
requirement:
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
94
129
|
none: false
|
95
130
|
requirements:
|
96
131
|
- - ! '>='
|
@@ -98,7 +133,12 @@ dependencies:
|
|
98
133
|
version: 0.9.9.6
|
99
134
|
type: :development
|
100
135
|
prerelease: false
|
101
|
-
version_requirements:
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 0.9.9.6
|
102
142
|
description: Execute any ActiveRecord Model method in the background
|
103
143
|
email:
|
104
144
|
- ryan@codecrate.com
|
@@ -134,16 +174,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
134
174
|
version: '0'
|
135
175
|
segments:
|
136
176
|
- 0
|
137
|
-
hash:
|
177
|
+
hash: 857242454710872088
|
138
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
179
|
none: false
|
140
180
|
requirements:
|
141
|
-
- - ! '
|
181
|
+
- - ! '>='
|
142
182
|
- !ruby/object:Gem::Version
|
143
|
-
version:
|
183
|
+
version: '0'
|
184
|
+
segments:
|
185
|
+
- 0
|
186
|
+
hash: 857242454710872088
|
144
187
|
requirements: []
|
145
188
|
rubyforge_project: backgrounded
|
146
|
-
rubygems_version: 1.8.
|
189
|
+
rubygems_version: 1.8.24
|
147
190
|
signing_key:
|
148
191
|
specification_version: 3
|
149
192
|
summary: Simple API to perform work in the background
|