city-watch 0.6.7 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,7 @@ module Reader
27
27
  def sparkline_image_tags
28
28
  data_sets.map do |set|
29
29
  dat = get_data_set(set)
30
+ puts dat.inspect
30
31
  [set.to_sym, dat.length > 1 ? sparkline_img_tag(dat.map {|(tm,val)| val }, set) : nil]
31
32
  end.select {|(name,tag)| !tag.nil? }
32
33
  end
@@ -34,7 +35,7 @@ module Reader
34
35
  def get_data_set(data_set_name,s_time=(Time.now - (60*60*4)),e_time=Time.now)
35
36
  CityWatch.redis.zrevrangebyscore(data_set_key(data_set_name), e_time.to_i, s_time.to_i, :with_scores => true).map do |(val,score)|
36
37
  timestamp,value = val.split(",")
37
- [Time.at(timestamp.to_i), Float(value)]
38
+ [Time.at(timestamp.to_i), Float(value).to_i]
38
39
  end
39
40
  end
40
41
 
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CityWatch
2
- VERSION = "0.6.7"
2
+ VERSION = "0.6.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: city-watch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.6.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: