deepstream 0.2.8 → 0.2.9

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: ae5c4c24417b9fee9b35deee733cb98bc8402caf
4
- data.tar.gz: 4e0f4378e8b7e1c0c05ab07c4b9ff3bf22d31bfd
3
+ metadata.gz: 0b877cee9255fb569e454a1e03b4b2e26c015f29
4
+ data.tar.gz: b70a7aedb5f127da0579067cca1cd1e059c84454
5
5
  SHA512:
6
- metadata.gz: d2a9d799f057eeeaa687cfbdc1ca5b190aa4b3951a2ab58fff3377b1daa39a35bc1c3baf1232aeeb1a574ecb77a7d96c4af210a285b49a6a9659134242c96271
7
- data.tar.gz: ff29a8e5642e88ad74685a7f1fd60007e52204c50dcd8bdc38dc33006977b1254402cc456f7094bf80f8d3df52be73934c8f0b61e2f63343930f729862f501a7
6
+ metadata.gz: 92e07ba4aa2ec9638305a76c0696dd78bb206d7eb0cf19b5b7b593b978e1142ffdb394a60b69f1aae9913a7eb093a5ae25b0bcffc37e01dad3bf958c7beddfb6
7
+ data.tar.gz: 880c86e61b26385814f984364859cf00e988ea4cc5368847f5a6afe0540dc423c5781043ff69b11f22e214c5257e9a041da08bb26c328b108427413643f01f56
@@ -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.8"
7
+ spec.version = "0.2.9"
8
8
  spec.authors = ["Currency-One S.A."]
9
9
  spec.email = ["piotr.szczudlak@currency-one.com"]
10
10
 
@@ -4,8 +4,6 @@ require 'deepstream/helpers'
4
4
 
5
5
  module Deepstream
6
6
  class Record
7
- attr_reader :name, :data, :version
8
-
9
7
  def initialize(client, name)
10
8
  @client = client
11
9
  @name = name
@@ -14,6 +12,10 @@ module Deepstream
14
12
  @client.send_message(TOPIC::RECORD, ACTION::CREATEORREAD, @name)
15
13
  end
16
14
 
15
+ def get_name
16
+ @name
17
+ end
18
+
17
19
  def inspect
18
20
  "#{self.class} #{@name} #{@version} #{@data}"
19
21
  end
@@ -27,7 +29,7 @@ module Deepstream
27
29
  end
28
30
 
29
31
  def set(*args)
30
- if args.one?
32
+ if args.size == 1
31
33
  raise(ArgumentError, "Record data must be a hash") unless args.first.is_a?(Hash)
32
34
  @data = args.first
33
35
  @client.send_message(TOPIC::RECORD, ACTION::UPDATE, @name, (@version += 1), @data.to_json) if @version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deepstream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Currency-One S.A.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-10 00:00:00.000000000 Z
11
+ date: 2017-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid-websocket-client