to_spreadsheet 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -50,10 +50,12 @@ In your index.html.haml:
50
50
 
51
51
  You can use class names on td/th for typed values. Here is the list of class to type mapping:
52
52
 
53
- | /num|int/ | Number format |
54
- | /datetime/ | DateTime format |
55
- | /date/ | Date format |
56
- | /time/ | Time format |
53
+ |_ Class |_ Format |
54
+ | /decimal|float/ | Decimal |
55
+ | /num|int/ | Integer |
56
+ | /datetime/ | DateTime |
57
+ | /date/ | Date |
58
+ | /time/ | Time |
57
59
 
58
60
  == Worksheets
59
61
 
@@ -1,6 +1,7 @@
1
1
  require 'nokogiri'
2
2
  require 'to_spreadsheet/action_pack_renderers'
3
3
  require 'to_spreadsheet/mime_types'
4
+ require 'to_spreadsheet/version'
4
5
 
5
6
  module ToSpreadsheet
6
7
 
@@ -1,3 +1,3 @@
1
1
  module ToSpreadsheet
2
- VERSION = '0.9.2'
2
+ VERSION = '0.9.3'
3
3
  end
@@ -24,6 +24,8 @@ module ToSpreadsheet
24
24
  def typed_node_val(node)
25
25
  val = node.inner_text
26
26
  case node[:class]
27
+ when /decimal|float/
28
+ val.to_f
27
29
  when /num|int/
28
30
  val.to_i
29
31
  when /datetime/
@@ -37,4 +39,4 @@ module ToSpreadsheet
37
39
  end
38
40
  end
39
41
  end
40
- end
42
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_spreadsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-18 00:00:00.000000000Z
12
+ date: 2012-03-13 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &14495960 !ruby/object:Gem::Requirement
16
+ requirement: &16683240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *14495960
24
+ version_requirements: *16683240
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: nokogiri
27
- requirement: &14495200 !ruby/object:Gem::Requirement
27
+ requirement: &16682820 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *14495200
35
+ version_requirements: *16682820
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: spreadsheet
38
- requirement: &14494480 !ruby/object:Gem::Requirement
38
+ requirement: &16682400 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *14494480
46
+ version_requirements: *16682400
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: mocha
49
- requirement: &14493480 !ruby/object:Gem::Requirement
49
+ requirement: &16681980 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *14493480
57
+ version_requirements: *16681980
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sqlite3-ruby
60
- requirement: &14489720 !ruby/object:Gem::Requirement
60
+ requirement: &16681560 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *14489720
68
+ version_requirements: *16681560
69
69
  description: Rendering spreadsheets from Rails made easy
70
70
  email: glex.spb@gmail.com
71
71
  executables: []
@@ -76,10 +76,10 @@ files:
76
76
  - README.rdoc
77
77
  - LICENSE
78
78
  - Rakefile
79
- - lib/to_spreadsheet/action_pack_renderers.rb
80
- - lib/to_spreadsheet/xls.rb
81
79
  - lib/to_spreadsheet/mime_types.rb
82
80
  - lib/to_spreadsheet/version.rb
81
+ - lib/to_spreadsheet/xls.rb
82
+ - lib/to_spreadsheet/action_pack_renderers.rb
83
83
  - lib/to_spreadsheet.rb
84
84
  homepage: https://github.com/glebm/to_spreadsheet
85
85
  licenses: []
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 1.8.11
104
+ rubygems_version: 1.8.17
105
105
  signing_key:
106
106
  specification_version: 3
107
107
  summary: Adds various html -> spreadsheet (xls, odt, etc) renderers to Rails.