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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 566187043e7b30a0ed99717987cdaabfad6e4175
4
- data.tar.gz: 0be4b98b94e71ba8a3fe07ba0882ea7ec04c2d4a
3
+ metadata.gz: 23d26ab854e1a08dec090e0ff88ca0cf95327242
4
+ data.tar.gz: d3854f707aaefa2ca5c3e195e18e044135b2db9f
5
5
  SHA512:
6
- metadata.gz: f0f4b50d20a420e7e0188903a3ca28f9356434ab643136a04f3164acc8465a884e11b4777daccef6171241f00ddb83a241988c89fa6756335a3f337b1d62c6b2
7
- data.tar.gz: 60722e7bb97c1d6dd8dff4498cb23fc28300673a05ee06541d3b29cbb533065b09c00ce244448c2e83099b6415e53947221adca31c2bbd69f2d0470101e65d9b
6
+ metadata.gz: 7e6a66dd848b911e0529cadcbca7470676ce528b752109918f7408ea2d337d84b501d4758185acb040f0d5c34bf99a7a0585e2d5d66558eb15f3eef837146342
7
+ data.tar.gz: 5332b7bf0a0660a6e93ca4c3df204ef5bd1c8797cf600418bbffc2815f40e207c01e69e8dc573a1925a192864dfa53b6121251e86deee82cce6099ae611cf89b
@@ -20,7 +20,7 @@ module Scrapable
20
20
  define_method(method_name) do
21
21
  get_webpage
22
22
  eval("scrape_#{method_name}")
23
- "#{method_name.capitalize}\t#{eval("@#{method_name}")}"
23
+ eval("@#{method_name}")
24
24
  end
25
25
  end
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module Liebert
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -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 "Temperature\t65.0"
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 "Humidity\t43.0"
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\t43.0\n"
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=false;
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=43;
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&nbsp;</td><td class="leftAlignAreaStyle">
154
- 10 %
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>&nbsp;</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 16:15:19 GMT
174
+ recorded_at: Fri, 06 Dec 2013 20:39:51 GMT
175
175
  recorded_with: VCR 2.8.0
@@ -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>59.9</td><td class="unitColumnStyle">Hz</td></tr></table></center></td></tr></table></div><div id="Input" class="upsInputArea">
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.3 </td><td class="unitColumnStyle">A</td></tr><tr id="OutputFreq" class="outputFreq">
227
- <td>Freq:</td><td>59.9 </td><td class="unitColumnStyle">Hz</td></tr></table></center></td></tr></table></div><div id="Battery" class="upsBatteryArea">
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>548 </td><td class="unitColumnStyle">V</td></tr><tr id="BatteryAmps" class="batteryAmps">
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>&nbsp; </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 16:15:19 GMT
272
+ recorded_at: Fri, 06 Dec 2013 20:39:52 GMT
273
273
  recorded_with: VCR 2.8.0
@@ -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 = %x( liebert ac )
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 = %x( liebert ups --charge )
11
- expect(command_line).to include "Charge\t"
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 "Input_amps\t16.4"
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 "Output_amps\t33.3"
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 "Battery_voltage\t548.0"
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 "Charge\t100.0"
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.3\nBattery_voltage\t548.0\nCharge\t100.0\n"
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
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.1.3
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