simple-rpc 1.0.5 → 1.0.6

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
  SHA256:
3
- metadata.gz: c97c4c362a8cdc9cd7d8dab1152525995fc9956d6b864fa9992bd4bb0901fcf1
4
- data.tar.gz: d32bcd8aa8c120c6da3c449cc869284e40a72a53be0535f885e9ac2ff1c931ab
3
+ metadata.gz: ec79166d56ea060feb7dc367bb49a7fed04c01288132a2fcbfc19f8a0057dd13
4
+ data.tar.gz: b4174af4e1ab4a400c0b9d79b4042bb7358fce71b42496147b8ac558af6b2ba8
5
5
  SHA512:
6
- metadata.gz: ac67dd97f74ccabe5e7b3408bc061c8840f90bcfa68f2d966fc161e46dbe5db79633f2a304a6538c142b8db99082c10cb2f9ddb9ec3759f2d4df9c4d2ffcb3a2
7
- data.tar.gz: b82bc3f7c87e601a5ba3b45a6c5e68c2f912c42b06445d3ae2af514c1255ccb8b846d844bbad65964e1ab839644fd8355fb28e7f2fd1abe207f3fac8aa6c2af2
6
+ metadata.gz: d5bb88542c8e66935697f152be7d0bfc3fbc92e5ace4755405a86c18269ae9f570ae8135f639642524f0d01537f669702ad38462b6c05ebb9896a50cd9f3cfbc
7
+ data.tar.gz: cec09dd3a1d349942731379303e99b242961d61900df0f91d6e213940aa7c414ff5b3a3d3d049aa0884e653a18136550fcd326ad7a53060b747c73ffb5eb723b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple-rpc (1.0.5)
4
+ simple-rpc (1.0.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -8,6 +8,7 @@ module SimpleRPC
8
8
  def initialize(client)
9
9
  @client = client
10
10
  is_child = ENV['CHILD'] ? true : false
11
+ raise "env var 'CHANNEL' not set" unless ENV['CHANNEL']
11
12
  parent_channel = ENV['CHANNEL'] + '_parent'
12
13
  child_channel = ENV['CHANNEL'] + '_child'
13
14
  receive_channel = is_child ? parent_channel : child_channel
@@ -16,6 +17,10 @@ module SimpleRPC
16
17
  @socket.add_listener(Events::MESSAGE_RECEIVED, method(:message_received))
17
18
  end
18
19
 
20
+ def is_connected?
21
+ @socket.status == Status::CONNECTED
22
+ end
23
+
19
24
  def message_received json_array_string
20
25
  array = JSON.parse(json_array_string)
21
26
  @client.send(*array)
@@ -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 = "simple-rpc"
7
- spec.version = "1.0.5"
7
+ spec.version = "1.0.6"
8
8
  spec.authors = ["Clint M"]
9
9
  spec.email = ["cmodien@gmail.com"]
10
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-rpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clint M
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-25 00:00:00.000000000 Z
11
+ date: 2018-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler