deepstream 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f892fdc582aa7e27a3fe12d61e0f27662fb08dd
4
- data.tar.gz: 49ce6f01d3ce6ad8cb382eab79679ac8cbe2a9f9
3
+ metadata.gz: 5e00298b459500663f55824322702e2a55c83fce
4
+ data.tar.gz: 9e07348cb46bcd259fd49bcbca1567a18f615be2
5
5
  SHA512:
6
- metadata.gz: 96be6f3399854e1dfe56ed878c5aa42f6389ca11ff3e45b45a82dd74681594899ae3ff41c3af89fd6b01894ed497fb371c6bbe320113e3e7c9666043acb884cf
7
- data.tar.gz: 8e313b9736f42b34681f0411e8cc4d13989805abe525563e0ef47e2ff82600282de8e2ae00dedcf92d1aff66f09cd08db8c13577dd3b16647cd725f7e379fa69
6
+ metadata.gz: b818fa8a7461bd044a57be618b5d5807c5c8fa7ceaada8c6c28bb3b2581f7106eb7b83942ec0c4547c400f5038c58c52e767263449676bcf546a187f66553144
7
+ data.tar.gz: 62cad77a5bf3606d7386283f589253d813559f5a8c4d1c5a78c5f29562cec476204ef7cefae8852cba8e25e64e358f76ece16a164e425405ff897909796a1f72
data/deepstream.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "deepstream"
7
- spec.version = "0.2.1"
7
+ spec.version = "0.2.2"
8
8
  spec.authors = ["Currency-One S.A."]
9
9
  spec.email = ["piotr.szczudlak@currency-one.com"]
10
10
 
@@ -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 @client.on_error(message)
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/record'
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 @client.on_error(message)
19
+ else raise(UnknownAction, message)
19
20
  end
20
21
  end
21
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deepstream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Currency-One S.A.