nezu 0.8.0 → 0.9.0
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/Gemfile.lock +11 -11
- data/VERSION +1 -1
- data/lib/nezu/runtime/consumer.rb +10 -3
- data/lib/nezu/runtime.rb +1 -0
- 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: 0b7958507638d32509950d0bb5700e99dd53dc37
|
|
4
|
+
data.tar.gz: 3fc180a3a5ddf597317707b80ddcc60020f4593f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a198eaabed1459eda780ca4b4f41d917f41e01ffd0b5d8042872733ed938599254e15ae651d8433e2f2274607643375832fbb4076c4e0cbfdc2f5fa988b8b163
|
|
7
|
+
data.tar.gz: 8b347d3b83c894c659005d8e573ca92cd493caab003158863297e411f5d94835d7c201bc08319b6149e541687c434fec906c8d9ed870cd300c6556c108f6cf6e
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
nezu (0.
|
|
4
|
+
nezu (0.8.0)
|
|
5
5
|
activerecord
|
|
6
6
|
activesupport
|
|
7
7
|
amqp
|
|
@@ -13,16 +13,16 @@ PATH
|
|
|
13
13
|
GEM
|
|
14
14
|
remote: https://rubygems.org/
|
|
15
15
|
specs:
|
|
16
|
-
activemodel (4.0.
|
|
17
|
-
activesupport (= 4.0.
|
|
16
|
+
activemodel (4.0.3)
|
|
17
|
+
activesupport (= 4.0.3)
|
|
18
18
|
builder (~> 3.1.0)
|
|
19
|
-
activerecord (4.0.
|
|
20
|
-
activemodel (= 4.0.
|
|
19
|
+
activerecord (4.0.3)
|
|
20
|
+
activemodel (= 4.0.3)
|
|
21
21
|
activerecord-deprecated_finders (~> 1.0.2)
|
|
22
|
-
activesupport (= 4.0.
|
|
22
|
+
activesupport (= 4.0.3)
|
|
23
23
|
arel (~> 4.0.0)
|
|
24
24
|
activerecord-deprecated_finders (1.0.3)
|
|
25
|
-
activesupport (4.0.
|
|
25
|
+
activesupport (4.0.3)
|
|
26
26
|
i18n (~> 0.6, >= 0.6.4)
|
|
27
27
|
minitest (~> 4.2)
|
|
28
28
|
multi_json (~> 1.3)
|
|
@@ -33,9 +33,9 @@ GEM
|
|
|
33
33
|
amq-protocol (>= 1.9.2)
|
|
34
34
|
eventmachine
|
|
35
35
|
arel (4.0.2)
|
|
36
|
-
atomic (1.1.
|
|
36
|
+
atomic (1.1.15)
|
|
37
37
|
builder (3.1.4)
|
|
38
|
-
bunny (1.1.
|
|
38
|
+
bunny (1.1.3)
|
|
39
39
|
amq-protocol (>= 1.9.2)
|
|
40
40
|
columnize (0.3.6)
|
|
41
41
|
configatron (3.0.1)
|
|
@@ -68,8 +68,8 @@ GEM
|
|
|
68
68
|
rdoc (~> 4.0, < 5.0)
|
|
69
69
|
term-ansicolor (1.3.0)
|
|
70
70
|
tins (~> 1.0)
|
|
71
|
-
thread_safe (0.
|
|
72
|
-
atomic
|
|
71
|
+
thread_safe (0.2.0)
|
|
72
|
+
atomic (>= 1.1.7, < 2)
|
|
73
73
|
tins (1.0.0)
|
|
74
74
|
tzinfo (0.3.38)
|
|
75
75
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.9.0
|
|
@@ -7,13 +7,12 @@ module Nezu
|
|
|
7
7
|
Nezu.logger.debug("NEZU Consumer[#{self.class}] payload: #{payload}")
|
|
8
8
|
params = JSON.parse(payload.to_s)
|
|
9
9
|
action = params.delete('__action')
|
|
10
|
+
reply_to = params.delete('__reply_to')
|
|
10
11
|
|
|
11
12
|
result = self.send(action.to_sym, params)
|
|
12
|
-
#debugger
|
|
13
|
-
reply_to = result[:end] == 'true' ? nil : params['__reply_to']
|
|
14
13
|
|
|
15
14
|
if reply_to
|
|
16
|
-
result.reverse_merge!('__action' => "#{action}_result")
|
|
15
|
+
result.reverse_merge!({'__action' => "#{action}_result"})
|
|
17
16
|
recipient = Nezu::Runtime::Recipient.new(reply_to)
|
|
18
17
|
Nezu.logger.debug("sending result #{result}of #{action} to #{recipient}")
|
|
19
18
|
recipient.push!(result)
|
|
@@ -24,6 +23,14 @@ module Nezu
|
|
|
24
23
|
rescue NoMethodError => e
|
|
25
24
|
Nezu.logger.error(e)
|
|
26
25
|
end
|
|
26
|
+
|
|
27
|
+
def method_missing(meth, *params)
|
|
28
|
+
if meth.to_s.match(/_result$/)
|
|
29
|
+
{}
|
|
30
|
+
else
|
|
31
|
+
super
|
|
32
|
+
end
|
|
33
|
+
end
|
|
27
34
|
end
|
|
28
35
|
end
|
|
29
36
|
end
|
data/lib/nezu/runtime.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nezu
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sascha Teske
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: amqp
|