smartermeter 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +9 -0
- data/lib/smartermeter/sample.rb +4 -2
- data/lib/smartermeter.rb +1 -1
- data/smartermeter.gemspec +1 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.2.1 (January 25th, 2011)
|
4
|
+
* Fixed bugs in the sample parser
|
5
|
+
|
6
|
+
## 0.2.0 (January 25th, 2011)
|
7
|
+
* Abstracted the UI so that a GUI based client could be built.
|
8
|
+
* Made the fetcher more robust to allow for network errors while transferring
|
9
|
+
data.
|
10
|
+
* Added compatibility with JRuby
|
11
|
+
|
3
12
|
## 0.1.0 (January 8th, 2011)
|
4
13
|
* First public release
|
data/lib/smartermeter/sample.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'date'
|
1
2
|
require 'time'
|
2
3
|
|
3
4
|
module SmarterMeter
|
@@ -16,7 +17,7 @@ module SmarterMeter
|
|
16
17
|
# Apparently they felt the need to put a = outside of the correct place
|
17
18
|
data = data.gsub('=','')
|
18
19
|
|
19
|
-
hour_increment =
|
20
|
+
hour_increment = 60*60
|
20
21
|
CSV.parse(data) do |row|
|
21
22
|
next unless row.length > 0 and date_re.match row[0]
|
22
23
|
|
@@ -25,7 +26,8 @@ module SmarterMeter
|
|
25
26
|
day = day.to_i
|
26
27
|
year = year.to_i
|
27
28
|
|
28
|
-
timestamp = Time.local(year, month, day, 0) - hour_increment
|
29
|
+
timestamp = Time.local(year, month, day, 0) - hour_increment
|
30
|
+
next if row[1].include? "$"
|
29
31
|
hourly_samples = row[1..24].map do |v|
|
30
32
|
if v == "-"
|
31
33
|
kwh = nil
|
data/lib/smartermeter.rb
CHANGED
data/smartermeter.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'smartermeter'
|
16
|
-
s.version = '0.2.
|
16
|
+
s.version = '0.2.1'
|
17
17
|
s.date = '2011-01-25'
|
18
18
|
s.rubyforge_project = 'smartermeter'
|
19
19
|
|