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 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
@@ -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 = 1/24.0
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 + 1/(24.0*60)
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
@@ -5,5 +5,5 @@ require 'smartermeter/transports/google_powermeter'
5
5
  require 'smartermeter/interfaces/cli'
6
6
 
7
7
  module SmarterMeter
8
- VERSION = "0.2.0"
8
+ VERSION = "0.2.1"
9
9
  end
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.0'
16
+ s.version = '0.2.1'
17
17
  s.date = '2011-01-25'
18
18
  s.rubyforge_project = 'smartermeter'
19
19
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matt Colyer