charted 0.0.7 → 0.0.8

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.
Files changed (2) hide show
  1. data/lib/charted.rb +2 -2
  2. metadata +1 -1
@@ -19,7 +19,7 @@ DataMapper::Model.raise_on_save_failure = true
19
19
  DataMapper::Property::String.length(255)
20
20
 
21
21
  module Charted
22
- VERSION = '0.0.7'
22
+ VERSION = '0.0.8'
23
23
  GEOIP = GeoIP.new("#{File.dirname(__FILE__)}/../geoip.dat")
24
24
  JS_FILE = "#{File.dirname(__FILE__)}/../public/charted/script.js"
25
25
 
@@ -492,7 +492,7 @@ module Charted
492
492
  end
493
493
 
494
494
  def add_truncated(table, rows)
495
- rows = rows.sort_by { |r| r[0].to_i }.reverse
495
+ rows = rows.sort_by { |r| r[0].gsub(/[^\d]/, '').to_i }.reverse
496
496
  if rows.length > 12
497
497
  rows = rows[0..11]
498
498
  rows << ['...', '...', '...']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: charted
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: