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 +4 -4
- data/deepstream.gemspec +1 -1
- data/lib/deepstream/record.rb +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b877cee9255fb569e454a1e03b4b2e26c015f29
|
4
|
+
data.tar.gz: b70a7aedb5f127da0579067cca1cd1e059c84454
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e07ba4aa2ec9638305a76c0696dd78bb206d7eb0cf19b5b7b593b978e1142ffdb394a60b69f1aae9913a7eb093a5ae25b0bcffc37e01dad3bf958c7beddfb6
|
7
|
+
data.tar.gz: 880c86e61b26385814f984364859cf00e988ea4cc5368847f5a6afe0540dc423c5781043ff69b11f22e214c5257e9a041da08bb26c328b108427413643f01f56
|
data/deepstream.gemspec
CHANGED
data/lib/deepstream/record.rb
CHANGED
@@ -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.
|
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.
|
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-
|
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
|