to_xls 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,32 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ to_xls (1.5.1)
5
+ spreadsheet
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.1.2)
11
+ rake (0.9.2)
12
+ rspec (2.3.0)
13
+ rspec-core (~> 2.3.0)
14
+ rspec-expectations (~> 2.3.0)
15
+ rspec-mocks (~> 2.3.0)
16
+ rspec-core (2.3.1)
17
+ rspec-expectations (2.3.0)
18
+ diff-lcs (~> 1.1.2)
19
+ rspec-mocks (2.3.0)
20
+ ruby-ole (1.2.11.3)
21
+ spreadsheet (0.7.1)
22
+ ruby-ole (>= 1.0)
23
+
24
+ PLATFORMS
25
+ ruby
26
+
27
+ DEPENDENCIES
28
+ bundler (~> 1.1.0)
29
+ rake (~> 0.9.2)
30
+ rspec (~> 2.3.0)
31
+ spreadsheet
32
+ to_xls!
@@ -1,12 +1,14 @@
1
1
  = to_xls gem
2
2
 
3
- This gem transform an Array or Hash into a excel file using the spreadsheet gem.
3
+ This gem transform an Enumeration (i.e. an Array) into an excel file using the spreadsheet gem.
4
+
5
+ It is (very slightly) oriented towards exporting ActiveRecord sets, but it can be used outside of Rails as well.
4
6
 
5
7
  == Usage
6
8
 
7
9
  @users = User.all
8
10
 
9
- @users.to_xls
11
+ @users.to_xls # by default, it exports using the "attributes" field on the first item of the collection
10
12
  @users.to_xls(:name => "Users") # specifies the Sheet name (by default Sheet1)
11
13
  @users.to_xls(:headers => false) # don't include headers
12
14
  @users.to_xls(:columns => [:name, :role]) # include only these columns, on this order
@@ -1,3 +1,3 @@
1
1
  module ToXls
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  end
Binary file
Binary file
Binary file
@@ -13,34 +13,15 @@ Gem::Specification.new do |s|
13
13
 
14
14
  s.rubyforge_project = "to_xls"
15
15
 
16
- s.files = `git ls-files`.split("\n")
17
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.files = Dir['**/*'].select{|f| File.file?(f)}
17
+ s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
19
 
19
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- # specify any dependencies here; for example:
23
- # s.add_development_dependency "rspec"
24
- # s.add_runtime_dependency "rest-client"
25
-
26
- if s.respond_to? :specification_version then
27
- s.specification_version = 3
28
-
29
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
30
- s.add_runtime_dependency(%q<spreadsheet>, [">= 0"])
31
- s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
32
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
33
- s.add_development_dependency(%q<rake>, ["~> 0.9.2"])
34
- else
35
- s.add_dependency(%q<spreadsheet>, [">= 0"])
36
- s.add_dependency(%q<rspec>, ["~> 2.3.0"])
37
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
38
- s.add_development_dependency(%q<rake>, ["~> 0.9.2"])
39
- end
40
- else
41
- s.add_dependency(%q<spreadsheet>, [">= 0"])
42
- s.add_dependency(%q<rspec>, ["~> 2.3.0"])
43
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
44
- s.add_development_dependency(%q<rake>, ["~> 0.9.2"])
45
- end
22
+ s.add_runtime_dependency "spreadsheet"
23
+ s.add_development_dependency "spreadsheet"
24
+ s.add_development_dependency "rspec", "~> 2.3.0"
25
+ s.add_development_dependency "bundler", "~> 1.1.0"
26
+ s.add_development_dependency "rake", "~> 0.9.2"
46
27
  end
metadata CHANGED
@@ -1,114 +1,160 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: to_xls
3
- version: !ruby/object:Gem::Version
4
- version: 1.5.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 1
5
5
  prerelease:
6
+ segments:
7
+ - 1
8
+ - 5
9
+ - 1
10
+ version: 1.5.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Enrique Garcia Cota
9
14
  - Francisco de Juan
10
- - Sergio Díaz Álvarez
15
+ - "Sergio D\xC3\xADaz \xC3\x81lvarez"
11
16
  autorequire:
12
17
  bindir: bin
13
18
  cert_chain: []
14
- date: 2012-01-11 00:00:00.000000000Z
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
19
+
20
+ date: 2012-06-08 00:00:00 Z
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
17
23
  name: spreadsheet
18
- requirement: &19965000 !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
19
26
  none: false
20
- requirements:
21
- - - ! '>='
22
- - !ruby/object:Gem::Version
23
- version: '0'
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 3
31
+ segments:
32
+ - 0
33
+ version: "0"
24
34
  type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: spreadsheet
25
38
  prerelease: false
26
- version_requirements: *19965000
27
- - !ruby/object:Gem::Dependency
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 0
47
+ version: "0"
48
+ type: :development
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
28
51
  name: rspec
29
- requirement: &19934800 !ruby/object:Gem::Requirement
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
30
54
  none: false
31
- requirements:
55
+ requirements:
32
56
  - - ~>
33
- - !ruby/object:Gem::Version
57
+ - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 2
61
+ - 3
62
+ - 0
34
63
  version: 2.3.0
35
64
  type: :development
36
- prerelease: false
37
- version_requirements: *19934800
38
- - !ruby/object:Gem::Dependency
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
39
67
  name: bundler
40
- requirement: &19932020 !ruby/object:Gem::Requirement
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
41
70
  none: false
42
- requirements:
71
+ requirements:
43
72
  - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 1.0.0
73
+ - !ruby/object:Gem::Version
74
+ hash: 19
75
+ segments:
76
+ - 1
77
+ - 1
78
+ - 0
79
+ version: 1.1.0
46
80
  type: :development
47
- prerelease: false
48
- version_requirements: *19932020
49
- - !ruby/object:Gem::Dependency
81
+ version_requirements: *id004
82
+ - !ruby/object:Gem::Dependency
50
83
  name: rake
51
- requirement: &19892300 !ruby/object:Gem::Requirement
84
+ prerelease: false
85
+ requirement: &id005 !ruby/object:Gem::Requirement
52
86
  none: false
53
- requirements:
87
+ requirements:
54
88
  - - ~>
55
- - !ruby/object:Gem::Version
89
+ - !ruby/object:Gem::Version
90
+ hash: 63
91
+ segments:
92
+ - 0
93
+ - 9
94
+ - 2
56
95
  version: 0.9.2
57
96
  type: :development
58
- prerelease: false
59
- version_requirements: *19892300
60
- description: Adds a to_xls method to all enumerations, which can be used to generate
61
- excel files conveniently. Can rely on ActiveRecord sugar for obtaining attribute
62
- names.
97
+ version_requirements: *id005
98
+ description: Adds a to_xls method to all enumerations, which can be used to generate excel files conveniently. Can rely on ActiveRecord sugar for obtaining attribute names.
63
99
  email: egarcia@splendeo.es
64
100
  executables: []
101
+
65
102
  extensions: []
103
+
66
104
  extra_rdoc_files: []
67
- files:
68
- - .document
69
- - .gitignore
70
- - .rspec
71
- - Gemfile
72
- - MIT-LICENSE.txt
105
+
106
+ files:
107
+ - spec/writer_spec.rb
108
+ - spec/enumerable_spec.rb
109
+ - spec/spec_helper.rb
110
+ - to_xls-1.0.0.gem
73
111
  - README.rdoc
112
+ - MIT-LICENSE.txt
113
+ - Gemfile.lock
114
+ - to_xls.gemspec
74
115
  - Rakefile
75
- - init.rb
76
- - lib/to_xls.rb
116
+ - pkg/to_xls-1.0.0.gem
117
+ - pkg/to_xls-1.5.1.gem
77
118
  - lib/to_xls/enumerable_patch.rb
78
119
  - lib/to_xls/version.rb
79
120
  - lib/to_xls/writer.rb
80
- - spec/enumerable_spec.rb
81
- - spec/spec_helper.rb
82
- - spec/writer_spec.rb
83
- - to_xls.gemspec
121
+ - lib/to_xls.rb
122
+ - init.rb
123
+ - Gemfile
84
124
  homepage: https://github.com/splendeo/to_xls
85
125
  licenses: []
126
+
86
127
  post_install_message:
87
128
  rdoc_options: []
88
- require_paths:
129
+
130
+ require_paths:
89
131
  - lib
90
- required_ruby_version: !ruby/object:Gem::Requirement
132
+ required_ruby_version: !ruby/object:Gem::Requirement
91
133
  none: false
92
- requirements:
93
- - - ! '>='
94
- - !ruby/object:Gem::Version
95
- version: '0'
96
- segments:
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ hash: 3
138
+ segments:
97
139
  - 0
98
- hash: -4596769968473579780
99
- required_rubygems_version: !ruby/object:Gem::Requirement
140
+ version: "0"
141
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
142
  none: false
101
- requirements:
102
- - - ! '>='
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- segments:
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ hash: 3
147
+ segments:
106
148
  - 0
107
- hash: -4596769968473579780
149
+ version: "0"
108
150
  requirements: []
151
+
109
152
  rubyforge_project: to_xls
110
- rubygems_version: 1.8.6
153
+ rubygems_version: 1.8.17
111
154
  signing_key:
112
155
  specification_version: 3
113
156
  summary: to_xls for Enumerations
114
- test_files: []
157
+ test_files:
158
+ - spec/writer_spec.rb
159
+ - spec/enumerable_spec.rb
160
+ - spec/spec_helper.rb
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/.gitignore DELETED
@@ -1,5 +0,0 @@
1
- *.gem
2
- .bundle
3
- # bundler generated
4
- Gemfile.lock
5
- pkg/*
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color