nezu 0.5.25 → 0.6.67
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/nezu/runtime/consumer.rb +3 -1
- data/lib/nezu/runtime/producer.rb +0 -1
- data/lib/nezu/runtime/recipient.rb +4 -3
- metadata +2 -2
data/Rakefile
CHANGED
@@ -43,7 +43,7 @@ namespace :version do
|
|
43
43
|
|
44
44
|
def store_version(major, minor, patch)
|
45
45
|
version = "#{major}.#{minor}.#{patch}"
|
46
|
-
f= File.new(File.join(File.dirname(__FILE__), 'VERSION'), File::WRONLY)
|
46
|
+
f= File.new(File.join(File.dirname(__FILE__), 'VERSION'), File::WRONLY|File::TRUNC)
|
47
47
|
f.write(version)
|
48
48
|
f.close
|
49
49
|
puts "version is now #{version}"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.67
|
@@ -7,8 +7,10 @@ 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
|
-
|
10
|
+
|
11
11
|
result = self.send(action.to_sym, params)
|
12
|
+
reply_to = result[:end] == 'true' ? nil : params['__reply_to']
|
13
|
+
|
12
14
|
if reply_to
|
13
15
|
result.reverse_merge!('__action' => "#{action}_result")
|
14
16
|
recipient = Nezu::Runtime::Recipient.new(reply_to)
|
@@ -8,11 +8,12 @@ module Nezu
|
|
8
8
|
|
9
9
|
class RecipientError < RuntimeError
|
10
10
|
def self.does_not_exist(q)
|
11
|
+
klass = q.sub(/^#{configatron.amqp.development.queue_prefix}./, '').sub(/.#{configatron.amqp.development.queue_postfix}$/,'').classify
|
11
12
|
message = %Q(
|
12
|
-
The class "#{
|
13
|
-
Please create one in \"app/producers/#{
|
13
|
+
The class "#{klass}" doesn`t exist or is not a child of "Nezu::Runtime::Producer".
|
14
|
+
Please create one in \"app/producers/#{klass.underscore}.rb\" with the content of at least:
|
14
15
|
|
15
|
-
class #{
|
16
|
+
class #{klass} < Nezu::Runtime::Producer
|
16
17
|
end
|
17
18
|
).gsub(/^\s*/, '')
|
18
19
|
self.new(message)
|
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.6.67
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-06-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: amqp
|