lightwaverf 0.6.3 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lightwaverf.rb +5 -2
- metadata +2 -2
data/lib/lightwaverf.rb
CHANGED
@@ -178,9 +178,10 @@ class LightWaveRF
|
|
178
178
|
self.put_config
|
179
179
|
end
|
180
180
|
@config = YAML.load_file self.get_config_file
|
181
|
-
# fix where
|
181
|
+
# fix where update made names and devices into arrays
|
182
182
|
if @config['room']
|
183
183
|
@config['room'].map! do | room |
|
184
|
+
room['name'] = room['name'].kind_of?( Array ) ? room['name'][0] : room['name']
|
184
185
|
room['device'].map! do | device |
|
185
186
|
device = device.kind_of?( Array ) ? device[0] : device
|
186
187
|
end
|
@@ -286,8 +287,10 @@ class LightWaveRF
|
|
286
287
|
# var gRoomStatus = [""]
|
287
288
|
# http://rubular.com/r/UH0H4b4afF
|
288
289
|
body.scan( /var (gDeviceNames|gDeviceStatus|gRoomNames|gRoomStatus)\s*=\s*([^;]*)/ ).each do | variable |
|
290
|
+
debug and ( p variable.to_s )
|
289
291
|
if variable[0]
|
290
|
-
variables[variable[0]] = variable[1].scan /"([^"]*)\"/
|
292
|
+
variables[variable[0]] = variable[1].scan( /"([^"]*)\"/ ).map! do | v | v.pop end
|
293
|
+
debug and ( p 'variables[' + variable[0] + '] = ' + variables[variable[0]].to_s )
|
291
294
|
end
|
292
295
|
end
|
293
296
|
debug and ( p '[Info - LightWaveRF Gem] so variables are ' + variables.inspect )
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lightwaverf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-10-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: htmlentities
|