liebert 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/lib/liebert/scrapable.rb +1 -1
- data/lib/liebert/version.rb +1 -1
- data/spec/airconditioner_spec.rb +3 -3
- data/spec/cassettes/airconditioner.yml +4 -4
- data/spec/cassettes/ups.yml +5 -5
- data/spec/command_line_spec.rb +3 -3
- data/spec/ups_spec.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23d26ab854e1a08dec090e0ff88ca0cf95327242
|
4
|
+
data.tar.gz: d3854f707aaefa2ca5c3e195e18e044135b2db9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e6a66dd848b911e0529cadcbca7470676ce528b752109918f7408ea2d337d84b501d4758185acb040f0d5c34bf99a7a0585e2d5d66558eb15f3eef837146342
|
7
|
+
data.tar.gz: 5332b7bf0a0660a6e93ca4c3df204ef5bd1c8797cf600418bbffc2815f40e207c01e69e8dc573a1925a192864dfa53b6121251e86deee82cce6099ae611cf89b
|
data/lib/liebert/scrapable.rb
CHANGED
data/lib/liebert/version.rb
CHANGED
data/spec/airconditioner_spec.rb
CHANGED
@@ -8,14 +8,14 @@ describe AirConditioner, vcr: vcr_options do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'responds to temperature' do
|
11
|
-
expect(@ac.temperature).to eq
|
11
|
+
expect(@ac.temperature).to eq 65.0
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'responds to humidity' do
|
15
|
-
expect(@ac.humidity).to eq
|
15
|
+
expect(@ac.humidity).to eq 38.0
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'responds to all' do
|
19
|
-
expect(@ac.all).to eq "Temperature\t65.0\nHumidity\
|
19
|
+
expect(@ac.all).to eq "Temperature\t65.0\nHumidity\t38.0\n"
|
20
20
|
end
|
21
21
|
end
|
@@ -110,7 +110,7 @@ http_interactions:
|
|
110
110
|
deviceInfo.cooling=true;
|
111
111
|
deviceInfo.heating=false;
|
112
112
|
|
113
|
-
deviceInfo.humidify=
|
113
|
+
deviceInfo.humidify=true;
|
114
114
|
deviceInfo.dehumidify=false;
|
115
115
|
|
116
116
|
deviceInfo.econCycle=false;
|
@@ -121,7 +121,7 @@ http_interactions:
|
|
121
121
|
deviceInfo.tempSetpt=65;
|
122
122
|
deviceInfo.tempTol=2.0;
|
123
123
|
|
124
|
-
deviceInfo.humid=
|
124
|
+
deviceInfo.humid=38;
|
125
125
|
deviceInfo.humidSetpt=48;
|
126
126
|
deviceInfo.humidTol=5;
|
127
127
|
// -->
|
@@ -151,7 +151,7 @@ http_interactions:
|
|
151
151
|
<td class="leftAlignAreaStyle">Stage</td><td class="leftAlignAreaStyle">
|
152
152
|
0 </td></tr><tr>
|
153
153
|
<td class="leftAlignAreaStyle">Capacity </td><td class="leftAlignAreaStyle">
|
154
|
-
|
154
|
+
3 %
|
155
155
|
</td></tr></table></div><div id="HumidityFrame" class="humidityFrame">
|
156
156
|
<table border="1" width="485" height="110">
|
157
157
|
<tr><td> </td></tr></table></div><div id="HumidityArea" class="humidityArea">
|
@@ -171,5 +171,5 @@ http_interactions:
|
|
171
171
|
<td class="headerTextStyle" width="250">Active Alarms:</td></tr></table></div>
|
172
172
|
</body></html>
|
173
173
|
http_version:
|
174
|
-
recorded_at: Fri, 06 Dec 2013
|
174
|
+
recorded_at: Fri, 06 Dec 2013 20:39:51 GMT
|
175
175
|
recorded_with: VCR 2.8.0
|
data/spec/cassettes/ups.yml
CHANGED
@@ -208,7 +208,7 @@ http_interactions:
|
|
208
208
|
<td>Volts:</td><td></td><td><script language="JavaScript" type="text/javascript">if(deviceInfo.numBypassLines <= 1)document.write("V");</script>
|
209
209
|
</td><td></td><td class="unitColumnStyle"><script language="JavaScript" type="text/javascript">if(deviceInfo.numBypassLines >= 3)document.write("V");</script></td></tr><tr id="BypassAmps" class="bypassAmps">
|
210
210
|
<td>Amps:</td><td></td><td class="unitColumnStyle">A</td></tr><tr>
|
211
|
-
<td>Freq:</td><td>
|
211
|
+
<td>Freq:</td><td>60.0</td><td class="unitColumnStyle">Hz</td></tr></table></center></td></tr></table></div><div id="Input" class="upsInputArea">
|
212
212
|
<table border="1">
|
213
213
|
<tr><td><center>
|
214
214
|
<a href="../monitor/upsInput.htm"><b>INPUT</b></a><table border="0" width="135" align=center cellspacing="0" cellpadding="1">
|
@@ -223,13 +223,13 @@ http_interactions:
|
|
223
223
|
<tr>
|
224
224
|
<td>Volts:</td><td></td><td><script language="JavaScript" type="text/javascript">if(deviceInfo.numOutputLines <= 1)document.write("V");</script>
|
225
225
|
</td><td></td><td class="unitColumnStyle"><script language="JavaScript" type="text/javascript">if(deviceInfo.numOutputLines >= 3)document.write("V");</script></td></tr><tr id="OutputAmps" class="outputAmps">
|
226
|
-
<td>Amps:</td><td>33.
|
227
|
-
<td>Freq:</td><td>
|
226
|
+
<td>Amps:</td><td>33.6 </td><td class="unitColumnStyle">A</td></tr><tr id="OutputFreq" class="outputFreq">
|
227
|
+
<td>Freq:</td><td>60.0 </td><td class="unitColumnStyle">Hz</td></tr></table></center></td></tr></table></div><div id="Battery" class="upsBatteryArea">
|
228
228
|
<table border="1">
|
229
229
|
<tr><td><center>
|
230
230
|
<a href="../monitor/upsBattery.htm"><b>BATTERY</b></a><table border="0" width="110" align=center cellspacing="0" cellpadding="1">
|
231
231
|
<tr>
|
232
|
-
<td>Volts:</td><td>
|
232
|
+
<td>Volts:</td><td>547 </td><td class="unitColumnStyle">V</td></tr><tr id="BatteryAmps" class="batteryAmps">
|
233
233
|
<td>Amp:</td><td>0.0 </td><td class="unitColumnStyle">A</td></tr><tr>
|
234
234
|
<td>Charge:</td><td>100 </td><td class="unitColumnStyle">%</td></tr><tr>
|
235
235
|
<td><nobr>Time Remaining:</nobr></td><td> </td><td class="unitColumnStyle">min</td></tr></table></center></td></tr></table></div><div id="AlarmPanelArea" class="alarmPanelArea">
|
@@ -269,5 +269,5 @@ http_interactions:
|
|
269
269
|
|
270
270
|
</body></html>
|
271
271
|
http_version:
|
272
|
-
recorded_at: Fri, 06 Dec 2013
|
272
|
+
recorded_at: Fri, 06 Dec 2013 20:39:52 GMT
|
273
273
|
recorded_with: VCR 2.8.0
|
data/spec/command_line_spec.rb
CHANGED
@@ -2,12 +2,12 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'Command Line' do
|
4
4
|
it 'should respond when no parameters are passed' do
|
5
|
-
command_line =
|
5
|
+
command_line = `liebert ac`
|
6
6
|
expect(command_line).to include "Temperature\t"
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'should respond when parameters are passed' do
|
10
|
-
command_line =
|
11
|
-
expect(command_line).to
|
10
|
+
command_line = `liebert ups --charge`
|
11
|
+
expect(command_line).to match /(\d.*)/
|
12
12
|
end
|
13
13
|
end
|
data/spec/ups_spec.rb
CHANGED
@@ -8,22 +8,22 @@ describe UPS, vcr: vcr_options do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'responds to input_amps' do
|
11
|
-
expect(@ups.input_amps).to eq
|
11
|
+
expect(@ups.input_amps).to eq 16.4
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'responds to output_amps' do
|
15
|
-
expect(@ups.output_amps).to eq
|
15
|
+
expect(@ups.output_amps).to eq 33.6
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'responds to battery_voltage' do
|
19
|
-
expect(@ups.battery_voltage).to eq
|
19
|
+
expect(@ups.battery_voltage).to eq 547.0
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'responds to charge' do
|
23
|
-
expect(@ups.charge).to eq
|
23
|
+
expect(@ups.charge).to eq 100.0
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'responds to all' do
|
27
|
-
expect(@ups.all).to eq "Input_amps\t16.4\nOutput_amps\t33.
|
27
|
+
expect(@ups.all).to eq "Input_amps\t16.4\nOutput_amps\t33.6\nBattery_voltage\t547.0\nCharge\t100.0\n"
|
28
28
|
end
|
29
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liebert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooks Swinnerton
|
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
171
|
version: '0'
|
172
172
|
requirements: []
|
173
173
|
rubyforge_project:
|
174
|
-
rubygems_version: 2.
|
174
|
+
rubygems_version: 2.0.14
|
175
175
|
signing_key:
|
176
176
|
specification_version: 4
|
177
177
|
summary: A gem to gather metrics from Liebert products with a web interface
|