agis 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/agis.rb +20 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20af34669ab28f91465c183b98dfb44695466186
|
4
|
+
data.tar.gz: 11d27c5d2e30a220e2b76ec352a51b2573bf3712
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f444b12163fec19bf60e80859b5314243387bae5452d3f3e902010dea34f34123fa201736f66a12080817839ffbda905c7f61ae80d2b9e2f9bf56ee7672613b8
|
7
|
+
data.tar.gz: 25a757423d3994021a6539c91a962a54f18d24924848ebae32ebe197cce72d99ebaf55f79598c6ef61dadb605701e598c990245e2c545e863773724c7ed8c1cf
|
data/lib/agis.rb
CHANGED
@@ -154,16 +154,23 @@ module Agis
|
|
154
154
|
return nil
|
155
155
|
end
|
156
156
|
mn = mni[2..-1]
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
157
|
+
mns = mn.to_sym
|
158
|
+
if mn == "AGIS_NOOP" # NOOP
|
159
|
+
redis.hset self.agis_returnbox, lusig, "done"
|
160
|
+
popfive(redis)
|
161
|
+
return :next
|
162
|
+
else
|
163
|
+
mc = @agis_methods[mns][:arity]
|
164
|
+
mrm = @agis_methods[mns][:mode]
|
165
|
+
meti = @agis_methods[mns][:method]
|
166
|
+
case meti
|
167
|
+
when Proc
|
168
|
+
met = meti
|
169
|
+
when Symbol
|
170
|
+
met = self.method(meti)
|
171
|
+
when NilClass
|
172
|
+
met = self.method(mn.to_sym) # when proc is Nil, call the class methods all the same
|
173
|
+
end
|
167
174
|
end
|
168
175
|
|
169
176
|
begin
|
@@ -237,7 +244,8 @@ module Agis
|
|
237
244
|
|
238
245
|
# Push a call and ncrunch immediately
|
239
246
|
# this returns the last return value from the queue
|
240
|
-
def agis_call(redis, name, arg1=nil, arg2=nil, arg3=nil)
|
247
|
+
def agis_call(redis, name=nil, arg1=nil, arg2=nil, arg3=nil)
|
248
|
+
name ||= "AGIS_NOOP"
|
241
249
|
until_sig = Time.now.to_s + ":" + Process.pid.to_s + Random.new.rand(4000000000).to_s + Random.new.rand(4000000000).to_s
|
242
250
|
loop do
|
243
251
|
begin
|
@@ -255,7 +263,7 @@ module Agis
|
|
255
263
|
end
|
256
264
|
|
257
265
|
# Alias for agis_call
|
258
|
-
def acall(redis, name, arg1=nil, arg2=nil, arg3=nil)
|
266
|
+
def acall(redis, name=nil, arg1=nil, arg2=nil, arg3=nil)
|
259
267
|
agis_call(redis, name, arg1, arg2, arg3)
|
260
268
|
end
|
261
269
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gert Oja
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|