nezu 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d98336e57c79a4eb2e7be4d6a93745250a518032
4
- data.tar.gz: 7a0fff0ba1aa12e30e8e985f2a0d0b9b7b75df43
3
+ metadata.gz: 0b7958507638d32509950d0bb5700e99dd53dc37
4
+ data.tar.gz: 3fc180a3a5ddf597317707b80ddcc60020f4593f
5
5
  SHA512:
6
- metadata.gz: 51585cd03c24893d086c8497cc798ad2a4bb67e159485c39bb1c2e9109c6542e84dc0521560b716fadc660fa06be4d13bec8cf71eaad509ec65ca87c35ea3978
7
- data.tar.gz: 1f8d1782cd621046137d7b8d2bc4a1d2215f6d24671e2c84872ee230ab2717a5667c5ca9c0433724581d9bdd14579e44e0c1f457a96edb9bc1a339a155cec5a1
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.7.2)
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.2)
17
- activesupport (= 4.0.2)
16
+ activemodel (4.0.3)
17
+ activesupport (= 4.0.3)
18
18
  builder (~> 3.1.0)
19
- activerecord (4.0.2)
20
- activemodel (= 4.0.2)
19
+ activerecord (4.0.3)
20
+ activemodel (= 4.0.3)
21
21
  activerecord-deprecated_finders (~> 1.0.2)
22
- activesupport (= 4.0.2)
22
+ activesupport (= 4.0.3)
23
23
  arel (~> 4.0.0)
24
24
  activerecord-deprecated_finders (1.0.3)
25
- activesupport (4.0.2)
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.14)
36
+ atomic (1.1.15)
37
37
  builder (3.1.4)
38
- bunny (1.1.2)
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.1.3)
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.8.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
@@ -27,6 +27,7 @@ module Nezu
27
27
  req_files += Dir.glob(Nezu.root.join('lib', '**', '*.rb'))
28
28
  end
29
29
  req_files.each do |file_name|
30
+ Nezu.logger.debug("requiring #{file_name}")
30
31
  require file_name #Autoload is not thread-safe :(
31
32
  end
32
33
 
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.8.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-02-12 00:00:00.000000000 Z
12
+ date: 2014-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: amqp