wampus 0.0.6 → 0.0.7
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/wampus/pubsub/server_ext.rb +2 -2
- data/lib/wampus/rpc/server_ext.rb +14 -14
- data/lib/wampus/servers/wamp.rb +1 -0
- data/lib/wampus/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fab89846514435d31da67a8901ff932dfb5f00f
|
4
|
+
data.tar.gz: 7860fa6dafa8ac71cef8d93c006c8218d18507fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baf0b7adcfb7a01b95121e07f0983de9871087fb20e6774536cd2d2cbe02dc6bc532faabadd8f75ee0eb45dc07fc41ff8b5f85d4be147d70c54babbe503035db
|
7
|
+
data.tar.gz: 8d69e07b83649147a4f5faa415c349a2839b1e1b0fc70f0c57d55b3eff470802cabc05ee6a161a03d3c05f863a163b3706a5b9432d91b5d6df154101ac01b6df
|
@@ -168,14 +168,14 @@ module Wampus
|
|
168
168
|
|
169
169
|
def get_subscribe_handler(topic_uri)
|
170
170
|
topic = topic_for_uri topic_uri
|
171
|
-
nil unless topic
|
171
|
+
return nil unless topic
|
172
172
|
handler = topic.subscribe_handler
|
173
173
|
[topic.uri, topic_uri[topic.uri.length..-1], *handler]
|
174
174
|
end
|
175
175
|
|
176
176
|
def get_publish_handler(topic_uri)
|
177
177
|
topic = topic_for_uri topic_uri
|
178
|
-
nil unless topic
|
178
|
+
return nil unless topic
|
179
179
|
handler = topic.publish_handler
|
180
180
|
[topic.uri, topic_uri[topic.uri.length..-1], *handler]
|
181
181
|
end
|
@@ -40,7 +40,6 @@ module Wampus
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
# TODO FIXME Use EM Deferred
|
44
43
|
def handle_call_msg(connection, data)
|
45
44
|
call_id, proc_uri, *args = data
|
46
45
|
|
@@ -53,19 +52,20 @@ module Wampus
|
|
53
52
|
raise Wampus::Errors::CallError.new(Wampus::Protocols::Wamp::URI_ERROR+'NoSuchRPCEndpoint', 'Missing Method')
|
54
53
|
end
|
55
54
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
msg = call_error_msg call_id, *error.to_call_error
|
62
|
-
connection.write msg
|
63
|
-
on_after_send_call_error connection, msg
|
64
|
-
else
|
65
|
-
result = on_after_call_success connection, result
|
66
|
-
connection.write call_result_msg call_id, result
|
55
|
+
begin
|
56
|
+
if handler[0]
|
57
|
+
result = handler[0].send handler[1], connection, *args
|
58
|
+
elsif handler[1].is_a? Proc
|
59
|
+
result = handler[1].call connection, *args
|
67
60
|
end
|
68
|
-
|
61
|
+
result = on_after_call_success connection, result
|
62
|
+
connection.write call_result_msg call_id, result
|
63
|
+
rescue => error
|
64
|
+
error = on_after_call_error connection, error
|
65
|
+
msg = call_error_msg call_id, *error.to_call_error
|
66
|
+
connection.write msg
|
67
|
+
on_after_send_call_error connection, msg
|
68
|
+
end
|
69
69
|
end
|
70
70
|
|
71
71
|
# -- RPC Hooks
|
@@ -80,7 +80,7 @@ module Wampus
|
|
80
80
|
|
81
81
|
def on_after_call_error(connection, error)
|
82
82
|
unless error.is_a? Wampus::Errors::CallError
|
83
|
-
error = Wampus::Errors::CallError.new(Wampus::Protocols::Wamp::URI_ERROR+'generic',
|
83
|
+
error = Wampus::Errors::CallError.new(Wampus::Protocols::Wamp::URI_ERROR+'generic', "RPC Call Error: #{error.message}")
|
84
84
|
end
|
85
85
|
error
|
86
86
|
end
|
data/lib/wampus/servers/wamp.rb
CHANGED
data/lib/wampus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wampus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Stack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
131
|
rubyforge_project:
|
132
|
-
rubygems_version: 2.1.
|
132
|
+
rubygems_version: 2.1.11
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: ''
|