ten_hs_server 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/ten_hs_server/device.rb
CHANGED
@@ -231,7 +231,16 @@ module TenHsServer
|
|
231
231
|
misc: values[4]
|
232
232
|
}
|
233
233
|
end
|
234
|
-
|
234
|
+
|
235
|
+
if results.length > 1
|
236
|
+
raise MultipleFoundError
|
237
|
+
else
|
238
|
+
if results[0][:location] == 'Device Not Found'
|
239
|
+
raise NotFoundError
|
240
|
+
else
|
241
|
+
results[0]
|
242
|
+
end
|
243
|
+
end
|
235
244
|
end
|
236
245
|
|
237
246
|
# Parse the ToggleDevice response.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>
|
7
|
+
|
8
|
+
</title></head><body><form name="form1" method="post" action="tenHsServer.aspx?t=99&f=GetDevice&d=X12" id="form1">
|
9
|
+
<div>
|
10
|
+
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTkzNDcxNzcwM2RkkSlaVMiVj2zRiqjrfGv75W35YBM=" />
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<span id="Result">X12:Device Not Found: : : : : : : : : : : ;</span>
|
14
|
+
</form></body></html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ten_hs_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -144,6 +144,7 @@ files:
|
|
144
144
|
- lib/ten_hs_server/room.rb
|
145
145
|
- lib/ten_hs_server/version.rb
|
146
146
|
- ten_hs_server.gemspec
|
147
|
+
- test/fixtures/ten_hs_server/device_not_found_result.html
|
147
148
|
- test/fixtures/ten_hs_server/device_off_result.html
|
148
149
|
- test/fixtures/ten_hs_server/device_on_result.html
|
149
150
|
- test/fixtures/ten_hs_server/device_result.html
|
@@ -185,6 +186,7 @@ signing_key:
|
|
185
186
|
specification_version: 3
|
186
187
|
summary: tenHsServer Homeseer API wrapper.
|
187
188
|
test_files:
|
189
|
+
- test/fixtures/ten_hs_server/device_not_found_result.html
|
188
190
|
- test/fixtures/ten_hs_server/device_off_result.html
|
189
191
|
- test/fixtures/ten_hs_server/device_on_result.html
|
190
192
|
- test/fixtures/ten_hs_server/device_result.html
|