to_xls-rails 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +4 -1
  2. data/VERSION +1 -1
  3. data/lib/to_xls-rails.rb +3 -1
  4. metadata +27 -33
data/CHANGELOG CHANGED
@@ -12,4 +12,7 @@
12
12
 
13
13
  1.1.0
14
14
  Translation of a column-value
15
- Add options :header
15
+ Add options :header
16
+
17
+ 1.1.1
18
+ Add options :header_columns
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
data/lib/to_xls-rails.rb CHANGED
@@ -19,7 +19,9 @@ class Array
19
19
 
20
20
  return '' if columns.empty?
21
21
 
22
- sheet.row(0).concat(columns.map(&:to_s).map(&:humanize)) if options[:header]
22
+ if options[:header]
23
+ sheet.row(0).concat(options[:header_columns].blank? ? columns.map(&:to_s).map(&:humanize) : options[:header_columns])
24
+ end
23
25
 
24
26
  self.each_with_index do |obj, index|
25
27
  index = options[:header] ? (index + 1) : index
metadata CHANGED
@@ -1,37 +1,35 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: to_xls-rails
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.1
4
5
  prerelease:
5
- version: 1.1.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - LiangWenKe
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-27 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2011-11-16 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: spreadsheet
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2152315200 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
18
+ requirements:
21
19
  - - ~>
22
- - !ruby/object:Gem::Version
20
+ - !ruby/object:Gem::Version
23
21
  version: 0.6.5
24
22
  type: :runtime
25
- version_requirements: *id001
26
- description: This simple plugin gives you the ability to call to_xls to a collection of activerecords. The builder options are the same as to_json / to_xml, except for the :include.
23
+ prerelease: false
24
+ version_requirements: *2152315200
25
+ description: This simple plugin gives you the ability to call to_xls to a collection
26
+ of activerecords. The builder options are the same as to_json / to_xml, except for
27
+ the :include.
27
28
  email: liangwenke.com@gmail.com
28
29
  executables: []
29
-
30
30
  extensions: []
31
-
32
31
  extra_rdoc_files: []
33
-
34
- files:
32
+ files:
35
33
  - lib/to_xls-rails.rb
36
34
  - CHANGELOG
37
35
  - Gemfile
@@ -43,30 +41,26 @@ files:
43
41
  - VERSION
44
42
  homepage: http://github.com/liangwenke/to_xls-rails
45
43
  licenses: []
46
-
47
44
  post_install_message:
48
45
  rdoc_options: []
49
-
50
- require_paths:
46
+ require_paths:
51
47
  - lib
52
- required_ruby_version: !ruby/object:Gem::Requirement
48
+ required_ruby_version: !ruby/object:Gem::Requirement
53
49
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: "0"
58
- required_rubygems_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
55
  none: false
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
63
59
  version: 1.3.4
64
60
  requirements: []
65
-
66
61
  rubyforge_project:
67
- rubygems_version: 1.8.5
62
+ rubygems_version: 1.8.10
68
63
  signing_key:
69
64
  specification_version: 3
70
65
  summary: Export data to xls on Rails
71
66
  test_files: []
72
-