deepstream 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/deepstream.gemspec +1 -1
  3. data/lib/deepstream.rb +14 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd6d503c71516f071673b0c63d6ed0c3ecd0e055
4
- data.tar.gz: 4e5087ecdc7b0420b0bccac544a6e1c0a7aa91d0
3
+ metadata.gz: c99b2702bcc1dda54eb10ab98c2cc2483779dbb1
4
+ data.tar.gz: d9a9d571cec27dc502ab83c94001b8bd6e4b0bbb
5
5
  SHA512:
6
- metadata.gz: 88de53ede59b95a78f1f596d2aac53a86e43a789745bf42fd97f24351e0ec4d73d39077b49198931728d34b7721a2faed4c48e50b18b79685acc4b8286452bec
7
- data.tar.gz: 1580071ce6dbbf29a2a7993348c243b69fea9da758b5c5e3f6aab705fdcb0574f2c2cbd093841e16210899f26e5d463c5c6e88290fbef92673f3ed46aae76751
6
+ metadata.gz: 1a8d350b3d9079c48834328bc45e29f3518048864e339d1864f22f076029a57124715822d478461472c71bb7611a1991afa5c63f052ab30c43a9b2a664625c90
7
+ data.tar.gz: da05c393f30fba40c5f08e5156e689c0b0c965a9209fafe4553a28c116a12de3d97d9c2003e702049d019585476e12c613bc73081c52bfd8d63e6b65ac0a5fbc
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.1.4"
7
+ spec.version = "0.1.5"
8
8
  spec.authors = ["Currency-One S.A."]
9
9
  spec.email = ["piotr.szczudlak@currency-one.com"]
10
10
 
data/lib/deepstream.rb CHANGED
@@ -56,6 +56,10 @@ class Deepstream::Record
56
56
  @data[name] || @data[name[-1]]
57
57
  end
58
58
  end
59
+
60
+ def inspect
61
+ "Deepstream::Record (#{@version}) #{@name} #{@data.to_h}"
62
+ end
59
63
  end
60
64
 
61
65
  class Deepstream::List < Deepstream::Record
@@ -84,7 +88,7 @@ class Deepstream::List < Deepstream::Record
84
88
  end
85
89
 
86
90
  def all
87
- @data.map { |x| @client.get(x) }
91
+ @data.map { |x| @client.get_record(x) }
88
92
  end
89
93
 
90
94
  def keys
@@ -94,6 +98,10 @@ class Deepstream::List < Deepstream::Record
94
98
  def set(*args)
95
99
  fail 'cannot use set on a list'
96
100
  end
101
+
102
+ def inspect
103
+ "Deepstream::List (#{@version}) #{@name} keys: #{@data}"
104
+ end
97
105
  end
98
106
 
99
107
  class Deepstream::Client
@@ -135,7 +143,7 @@ class Deepstream::Client
135
143
  @timeout = 1
136
144
  begin
137
145
  _process_msg(_read_socket(timeout: 10))
138
- rescue TimeoutError
146
+ rescue Timeout::TimeoutError
139
147
  _write("heartbeat") # send anything to check if deepstream responds
140
148
  _process_msg(_read_socket(timeout: 10))
141
149
  end
@@ -292,4 +300,8 @@ class Deepstream::Client
292
300
  else JSON.parse(payload, object_class: OpenStruct)
293
301
  end
294
302
  end
303
+
304
+ def inspect
305
+ "Deepstream::Client #{@address}:#{@port} connected: #{@connected}"
306
+ end
295
307
  end
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.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Currency-One S.A.