deepstream 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/deepstream.gemspec +1 -1
- data/lib/deepstream/event_handler.rb +4 -3
- data/lib/deepstream/record_handler.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e00298b459500663f55824322702e2a55c83fce
|
4
|
+
data.tar.gz: 9e07348cb46bcd259fd49bcbca1567a18f615be2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b818fa8a7461bd044a57be618b5d5807c5c8fa7ceaada8c6c28bb3b2581f7106eb7b83942ec0c4547c400f5038c58c52e767263449676bcf546a187f66553144
|
7
|
+
data.tar.gz: 62cad77a5bf3606d7386283f589253d813559f5a8c4d1c5a78c5f29562cec476204ef7cefae8852cba8e25e64e358f76ece16a164e425405ff897909796a1f72
|
data/deepstream.gemspec
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'deepstream/ack_timeout_registry'
|
2
2
|
require 'deepstream/constants'
|
3
|
+
require 'deepstream/exceptions'
|
3
4
|
require 'deepstream/helpers'
|
4
5
|
|
5
6
|
module Deepstream
|
@@ -45,12 +46,12 @@ module Deepstream
|
|
45
46
|
when ACTION::EVENT then fire_event_callback(message)
|
46
47
|
when ACTION::SUBSCRIPTION_FOR_PATTERN_FOUND then fire_listen_callback(message)
|
47
48
|
when ACTION::SUBSCRIPTION_FOR_PATTERN_REMOVED then fire_listen_callback(message)
|
48
|
-
else
|
49
|
+
else raise(UnknownAction, message)
|
49
50
|
end
|
50
51
|
end
|
51
52
|
|
52
|
-
def emit(event, data = nil, timeout: @client.options[:emit_timeout])
|
53
|
-
@client.send_message(TOPIC::EVENT, ACTION::EVENT, event, Helpers.to_deepstream_type(data), timeout: timeout)
|
53
|
+
def emit(event, data = nil, opts = { timeout: @client.options[:emit_timeout] })
|
54
|
+
@client.send_message(TOPIC::EVENT, ACTION::EVENT, event, Helpers.to_deepstream_type(data), timeout: opts[:timeout])
|
54
55
|
rescue => e
|
55
56
|
@client.on_exception(e)
|
56
57
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'deepstream/constants'
|
2
|
-
require 'deepstream/
|
2
|
+
require 'deepstream/exceptions'
|
3
3
|
require 'deepstream/list'
|
4
|
+
require 'deepstream/record'
|
4
5
|
|
5
6
|
module Deepstream
|
6
7
|
class RecordHandler
|
@@ -15,7 +16,7 @@ module Deepstream
|
|
15
16
|
when ACTION::PATCH then patch(message)
|
16
17
|
when ACTION::READ then read(message)
|
17
18
|
when ACTION::UPDATE then update(message)
|
18
|
-
else
|
19
|
+
else raise(UnknownAction, message)
|
19
20
|
end
|
20
21
|
end
|
21
22
|
|