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.
- data/Gemfile.lock +32 -0
- data/README.rdoc +4 -2
- data/lib/to_xls/version.rb +1 -1
- data/pkg/to_xls-1.0.0.gem +0 -0
- data/pkg/to_xls-1.5.1.gem +0 -0
- data/to_xls-1.0.0.gem +0 -0
- data/to_xls.gemspec +8 -27
- metadata +111 -65
- data/.document +0 -5
- data/.gitignore +0 -5
- data/.rspec +0 -1
data/Gemfile.lock
ADDED
@@ -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!
|
data/README.rdoc
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
= to_xls gem
|
2
2
|
|
3
|
-
This gem transform an
|
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
|
data/lib/to_xls/version.rb
CHANGED
Binary file
|
Binary file
|
data/to_xls-1.0.0.gem
ADDED
Binary file
|
data/to_xls.gemspec
CHANGED
@@ -13,34 +13,15 @@ Gem::Specification.new do |s|
|
|
13
13
|
|
14
14
|
s.rubyforge_project = "to_xls"
|
15
15
|
|
16
|
-
s.files =
|
17
|
-
s.
|
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
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
-
|
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
|
15
|
+
- "Sergio D\xC3\xADaz \xC3\x81lvarez"
|
11
16
|
autorequire:
|
12
17
|
bindir: bin
|
13
18
|
cert_chain: []
|
14
|
-
|
15
|
-
|
16
|
-
|
19
|
+
|
20
|
+
date: 2012-06-08 00:00:00 Z
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
17
23
|
name: spreadsheet
|
18
|
-
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
26
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
|
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
|
-
|
27
|
-
|
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
|
-
|
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
|
-
|
37
|
-
|
38
|
-
- !ruby/object:Gem::Dependency
|
65
|
+
version_requirements: *id003
|
66
|
+
- !ruby/object:Gem::Dependency
|
39
67
|
name: bundler
|
40
|
-
|
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
|
-
|
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
|
-
|
48
|
-
|
49
|
-
- !ruby/object:Gem::Dependency
|
81
|
+
version_requirements: *id004
|
82
|
+
- !ruby/object:Gem::Dependency
|
50
83
|
name: rake
|
51
|
-
|
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
|
-
|
59
|
-
|
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
|
-
|
68
|
-
|
69
|
-
- .
|
70
|
-
- .
|
71
|
-
-
|
72
|
-
-
|
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
|
-
-
|
76
|
-
-
|
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
|
-
-
|
81
|
-
-
|
82
|
-
-
|
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
|
-
|
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
|
-
|
96
|
-
segments:
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
hash: 3
|
138
|
+
segments:
|
97
139
|
- 0
|
98
|
-
|
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
|
-
|
105
|
-
segments:
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
hash: 3
|
147
|
+
segments:
|
106
148
|
- 0
|
107
|
-
|
149
|
+
version: "0"
|
108
150
|
requirements: []
|
151
|
+
|
109
152
|
rubyforge_project: to_xls
|
110
|
-
rubygems_version: 1.8.
|
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
data/.gitignore
DELETED
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|