dossier 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +20 -4
- data/app/controllers/dossier/reports_controller.rb +5 -0
- data/config/initializers/mime_types.rb +1 -0
- data/lib/dossier/version.rb +1 -1
- data/lib/dossier/xls.rb +34 -0
- data/lib/dossier.rb +1 -0
- data/spec/dummy/config/database.yml +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -32
- data/spec/dummy/log/test.log +231 -26330
- data/spec/fixtures/db/mysql2.yml +2 -2
- data/spec/fixtures/reports/employee.xls +39 -0
- data/spec/requests/employee_spec.rb +9 -0
- metadata +8 -4
data/spec/fixtures/db/mysql2.yml
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40">
|
3
|
+
<Worksheet ss:Name="Sheet1">
|
4
|
+
<Table>
|
5
|
+
<Row>
|
6
|
+
<Cell><Data ss:Type="String">Id</Data></Cell>
|
7
|
+
<Cell><Data ss:Type="String">Name</Data></Cell>
|
8
|
+
<Cell><Data ss:Type="String">Division</Data></Cell>
|
9
|
+
<Cell><Data ss:Type="String">Salary</Data></Cell>
|
10
|
+
<Cell><Data ss:Type="String">Suspended</Data></Cell>
|
11
|
+
<Cell><Data ss:Type="String">Hired On</Data></Cell>
|
12
|
+
</Row>
|
13
|
+
<Row>
|
14
|
+
<Cell><Data ss:Type="String">3</Data></Cell>
|
15
|
+
<Cell><Data ss:Type="String">Elise Elderberry</Data></Cell>
|
16
|
+
<Cell><Data ss:Type="String">Corporate Malfeasance</Data></Cell>
|
17
|
+
<Cell><Data ss:Type="String">99000</Data></Cell>
|
18
|
+
<Cell><Data ss:Type="String">0</Data></Cell>
|
19
|
+
<Cell><Data ss:Type="String">2013-01-11</Data></Cell>
|
20
|
+
</Row>
|
21
|
+
<Row>
|
22
|
+
<Cell><Data ss:Type="String">2</Data></Cell>
|
23
|
+
<Cell><Data ss:Type="String">Jimmy Jackalope, Jr.</Data></Cell>
|
24
|
+
<Cell><Data ss:Type="String">Tedious Toiling</Data></Cell>
|
25
|
+
<Cell><Data ss:Type="String">20000</Data></Cell>
|
26
|
+
<Cell><Data ss:Type="String">1</Data></Cell>
|
27
|
+
<Cell><Data ss:Type="String">2013-01-11</Data></Cell>
|
28
|
+
</Row>
|
29
|
+
<Row>
|
30
|
+
<Cell><Data ss:Type="String">1</Data></Cell>
|
31
|
+
<Cell><Data ss:Type="String">Moustafa McMann</Data></Cell>
|
32
|
+
<Cell><Data ss:Type="String">Zany Inventions</Data></Cell>
|
33
|
+
<Cell><Data ss:Type="String">30000</Data></Cell>
|
34
|
+
<Cell><Data ss:Type="String">0</Data></Cell>
|
35
|
+
<Cell><Data ss:Type="String">2010-10-02</Data></Cell>
|
36
|
+
</Row>
|
37
|
+
</Table>
|
38
|
+
</Worksheet>
|
39
|
+
</Workbook>
|
@@ -49,4 +49,13 @@ describe "employee report" do
|
|
49
49
|
|
50
50
|
end
|
51
51
|
|
52
|
+
describe "rendering XLS" do
|
53
|
+
|
54
|
+
it "creates a standard XLS report" do
|
55
|
+
get '/reports/employee.xls'
|
56
|
+
expect(response.body).to eq(File.read('spec/fixtures/reports/employee.xls'))
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
52
61
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dossier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-01-
|
14
|
+
date: 2013-01-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: arel
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- app/controllers/dossier/reports_controller.rb
|
190
190
|
- app/helpers/dossier/application_helper.rb
|
191
191
|
- app/views/dossier/reports/show.html.haml
|
192
|
+
- config/initializers/mime_types.rb
|
192
193
|
- config/routes.rb
|
193
194
|
- lib/dossier/adapter/active_record/result.rb
|
194
195
|
- lib/dossier/adapter/active_record.rb
|
@@ -201,6 +202,7 @@ files:
|
|
201
202
|
- lib/dossier/result.rb
|
202
203
|
- lib/dossier/stream_csv.rb
|
203
204
|
- lib/dossier/version.rb
|
205
|
+
- lib/dossier/xls.rb
|
204
206
|
- lib/dossier.rb
|
205
207
|
- lib/tasks/dossier_tasks.rake
|
206
208
|
- MIT-LICENSE
|
@@ -258,6 +260,7 @@ files:
|
|
258
260
|
- spec/fixtures/db/sqlite3.yml.example
|
259
261
|
- spec/fixtures/reports/employee.csv
|
260
262
|
- spec/fixtures/reports/employee.html
|
263
|
+
- spec/fixtures/reports/employee.xls
|
261
264
|
- spec/fixtures/reports/employee_with_custom_client.html
|
262
265
|
- spec/fixtures/reports/employee_with_custom_view.html
|
263
266
|
- spec/fixtures/reports/employee_with_footer.html
|
@@ -285,7 +288,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
285
288
|
version: '0'
|
286
289
|
segments:
|
287
290
|
- 0
|
288
|
-
hash:
|
291
|
+
hash: 313908038312530546
|
289
292
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
290
293
|
none: false
|
291
294
|
requirements:
|
@@ -294,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
294
297
|
version: '0'
|
295
298
|
segments:
|
296
299
|
- 0
|
297
|
-
hash:
|
300
|
+
hash: 313908038312530546
|
298
301
|
requirements: []
|
299
302
|
rubyforge_project:
|
300
303
|
rubygems_version: 1.8.24
|
@@ -354,6 +357,7 @@ test_files:
|
|
354
357
|
- spec/fixtures/db/sqlite3.yml.example
|
355
358
|
- spec/fixtures/reports/employee.csv
|
356
359
|
- spec/fixtures/reports/employee.html
|
360
|
+
- spec/fixtures/reports/employee.xls
|
357
361
|
- spec/fixtures/reports/employee_with_custom_client.html
|
358
362
|
- spec/fixtures/reports/employee_with_custom_view.html
|
359
363
|
- spec/fixtures/reports/employee_with_footer.html
|