ledenet_api 0.1.0 → 0.1.1

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: 3b9e08414e8a7138101e626e53506a9e101646cc
4
- data.tar.gz: e763ee6fffb993e672db3d08ba631c2ad05de48d
3
+ metadata.gz: d209ac850060f4e0d6f43b75c14d65061bd928a6
4
+ data.tar.gz: 1bc387beff34d221247328228db77626e095dc19
5
5
  SHA512:
6
- metadata.gz: e1ebfcf2ab226033064a9e964c7c9c8cf23b234ccda03bdaff99d0f1a75ff9cb18070a7c876e44c229bbc3b380b05f6d34791d2f89cbc207f43bf757626f7855
7
- data.tar.gz: dd2ce1ef6f07fa007a8c1081ef7121ea126bc04365c3e11f8c010cf0e68d269a7945fd928c8cf36dbb79bd78659d1ee56b91a361000cdb5f139df4f2d778e862
6
+ metadata.gz: eade48784872b6538dc576a9ea88278dfd6e121c9d5641c90be9be953ff7b12bf9309740d6a15ced2f721e4a43208ea34acb66599dcc0c706821b631cf9b6a07
7
+ data.tar.gz: 2e8638b1c017dba772d61fad398edc4f147813beae22c58d2f8d9169ec4162d5881f10dac84c51c76518ed4a65bcd2580d6b5ecf74594c324f6e64d69bc04b0b
data/lib/ledenet/api.rb CHANGED
@@ -32,7 +32,7 @@ module LEDENET
32
32
  create_socket
33
33
  end
34
34
 
35
- #private
35
+ private
36
36
  def color_checksum(r, g, b)
37
37
  (r + g + b + 0x3F) % 0x100
38
38
  end
@@ -67,6 +67,7 @@ module LEDENET
67
67
  end
68
68
 
69
69
  def create_socket
70
+ @socket.close unless @socket.nil?
70
71
  @socket = TCPSocket.new(@device_address, API_PORT)
71
72
  end
72
73
  end
@@ -1,3 +1,3 @@
1
1
  module LEDENET
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ledenet_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Mullins
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-10 00:00:00.000000000 Z
11
+ date: 2015-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler