dossier 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -208,3 +208,4 @@ Note: when you run the tests, Dossier will **make and/or truncate** some tables
208
208
  - To other reports
209
209
  - To other formats
210
210
  - Extending the formatter
211
+ - Show how to do "crosstab" reports (preliminary query to determine columns, then build SQL case statements?)
@@ -14,9 +14,13 @@ module Dossier
14
14
  yield record.to_csv
15
15
  end
16
16
  rescue => e
17
- yield e.message
18
- e.backtrace.each do |line|
19
- yield "#{line}\n"
17
+ if Rails.application.config.consider_all_requests_local
18
+ yield e.message
19
+ e.backtrace.each do |line|
20
+ yield "#{line}\n"
21
+ end
22
+ else
23
+ yield "We're sorry, but something went wrong."
20
24
  end
21
25
  end
22
26
 
@@ -1,3 +1,3 @@
1
1
  module Dossier
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
Binary file
@@ -26554,3 +26554,91 @@ Processing by Dossier::ReportsController#show as HTML
26554
26554
  Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 0.0ms)
26555
26555
  EmployeeReport (0.2ms) SELECT * FROM employees WHERE 1=1
26556
26556
  ORDER BY name ASC
26557
+ Connecting to database specified by database.yml
26558
+ FACTORY (0.2ms) CREATE DATABASE IF NOT EXISTS `dossier_test`
26559
+ FACTORY (1.6ms) DROP TABLE IF EXISTS `employees`
26560
+ FACTORY (63.0ms)  CREATE TABLE `employees` (
26561
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
26562
+ `name` varchar(255) NOT NULL,
26563
+ `division` varchar(255) NOT NULL,
26564
+ `salary` int(11) NOT NULL,
26565
+ `suspended` tinyint(1) NOT NULL DEFAULT 0,
26566
+ `hired_on` date NOT NULL,
26567
+ PRIMARY KEY (`id`)
26568
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
26569
+ 
26570
+ FACTORY (0.9ms) TRUNCATE `employees`
26571
+ FACTORY (0.4ms)  INSERT INTO
26572
+ `employees` (`name`, `hired_on`, `suspended`, `division`, `salary`)
26573
+ VALUES ('Moustafa McMann', '2010-10-02', false, 'Zany Inventions', 30000);
26574
+ 
26575
+ FACTORY (0.3ms) INSERT INTO
26576
+ `employees` (`name`, `hired_on`, `suspended`, `division`, `salary`)
26577
+ VALUES ('Jimmy Jackalope, Jr.', '2013-01-11', true, 'Tedious Toiling', 20000);
26578
+
26579
+ FACTORY (0.3ms)  INSERT INTO
26580
+ `employees` (`name`, `hired_on`, `suspended`, `division`, `salary`)
26581
+ VALUES ('Elise Elderberry', '2013-01-11', false, 'Corporate Malfeasance', 99000);
26582
+ 
26583
+ FACTORY (2.7ms) DROP TABLE IF EXISTS `employees`
26584
+ FACTORY (1.1ms)  CREATE TABLE `employees` (
26585
+ `id` INTEGER PRIMARY KEY AUTOINCREMENT,
26586
+ `name` TEXT NOT NULL,
26587
+ `division` TEXT NOT NULL,
26588
+ `salary` INTEGER NOT NULL,
26589
+ `suspended` TINYINT NOT NULL DEFAULT 0,
26590
+ `hired_on` DATE NOT NULL
26591
+ );
26592
+ 
26593
+ FACTORY (0.9ms) DELETE FROM `employees`
26594
+ FACTORY (0.9ms)  INSERT INTO
26595
+ `employees` (`name`, `hired_on`, `suspended`, `division`, `salary`)
26596
+ VALUES ('MOUSTAFA MCMANN', '2010-10-02', 0, 'Zany Inventions', 30000);
26597
+ 
26598
+ FACTORY (0.9ms) INSERT INTO
26599
+ `employees` (`name`, `hired_on`, `suspended`, `division`, `salary`)
26600
+ VALUES ('JIMMY JACKALOPE, JR.', '2013-01-11', 1, 'Tedious Toiling', 20000);
26601
+
26602
+ FACTORY (1.2ms)  INSERT INTO
26603
+ `employees` (`name`, `hired_on`, `suspended`, `division`, `salary`)
26604
+ VALUES ('ELISE ELDERBERRY', '2013-01-11', 0, 'Corporate Malfeasance', 99000);
26605
+ 
26606
+ EmployeeReport (0.3ms) SELECT * FROM employees WHERE 1=1
26607
+ ORDER BY name ASC
26608
+ Started GET "/reports/employee.csv" for 127.0.0.1 at 2013-01-23 17:01:04 -0500
26609
+ Processing by Dossier::ReportsController#show as CSV
26610
+ Parameters: {"report"=>"employee"}
26611
+ EmployeeReport (0.2ms) SELECT * FROM employees WHERE 1=1
26612
+ ORDER BY name ASC
26613
+ Completed 200 OK in 4ms (ActiveRecord: 0.2ms)
26614
+ Started GET "/reports/employee?options[footer]=1" for 127.0.0.1 at 2013-01-23 17:01:04 -0500
26615
+ Processing by Dossier::ReportsController#show as HTML
26616
+ Parameters: {"options"=>{"footer"=>"1"}, "report"=>"employee"}
26617
+ EmployeeReport (0.2ms) SELECT * FROM employees WHERE 1=1
26618
+ ORDER BY name ASC
26619
+ Completed 200 OK in 68ms (Views: 19.0ms | ActiveRecord: 0.0ms)
26620
+ Started GET "/reports/employee?options[salary]=true&options[order]=desc&options[names][]=Jimmy+Jackalope&options[names][]=Moustafa+McMann&options[divisions][]=Tedious+Toiling" for 127.0.0.1 at 2013-01-23 17:01:04 -0500
26621
+ Processing by Dossier::ReportsController#show as HTML
26622
+ Parameters: {"options"=>{"salary"=>"true", "order"=>"desc", "names"=>["Jimmy Jackalope", "Moustafa McMann"], "divisions"=>["Tedious Toiling"]}, "report"=>"employee"}
26623
+ EmployeeReport (0.3ms) SELECT * FROM employees WHERE 1=1
26624
+ AND division in (('Tedious Toiling'))
26625
+ AND salary > 10000
26626
+ AND (name like '%Moustafa McMann%' or name like '%Jimmy Jackalope%')
26627
+ ORDER BY name DESC
26628
+ Completed 200 OK in 7ms (Views: 2.7ms | ActiveRecord: 0.0ms)
26629
+ Started GET "/reports/employee" for 127.0.0.1 at 2013-01-23 17:01:04 -0500
26630
+ Processing by Dossier::ReportsController#show as HTML
26631
+ Parameters: {"report"=>"employee"}
26632
+ EmployeeReport (0.2ms) SELECT * FROM employees WHERE 1=1
26633
+ ORDER BY name ASC
26634
+ Completed 200 OK in 7ms (Views: 2.8ms | ActiveRecord: 0.0ms)
26635
+ Started GET "/reports/employee_with_custom_view" for 127.0.0.1 at 2013-01-23 17:01:04 -0500
26636
+ Processing by Dossier::ReportsController#show as HTML
26637
+ Parameters: {"report"=>"employee_with_custom_view"}
26638
+ EmployeeWithCustomViewReport (0.2ms) SELECT * FROM employees WHERE suspended = true
26639
+ Completed 200 OK in 6ms (Views: 2.6ms | ActiveRecord: 0.2ms)
26640
+ Started GET "/reports/employee_with_custom_client" for 127.0.0.1 at 2013-01-23 17:01:04 -0500
26641
+ Processing by Dossier::ReportsController#show as HTML
26642
+ Parameters: {"report"=>"employee_with_custom_client"}
26643
+ EmployeeWithCustomClientReport (0.3ms) SELECT * FROM `employees`
26644
+ Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 0.0ms)
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.1.0
4
+ version: 2.1.1
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-22 00:00:00.000000000 Z
14
+ date: 2013-01-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: arel
@@ -271,7 +271,7 @@ files:
271
271
  - spec/support/reports/employee_with_custom_client.rb
272
272
  - spec/support/reports/employee_with_custom_view.rb
273
273
  - spec/support/reports/test.rb
274
- homepage:
274
+ homepage: https://github.com/adamhunter/dossier
275
275
  licenses: []
276
276
  post_install_message:
277
277
  rdoc_options: []
@@ -285,7 +285,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
285
285
  version: '0'
286
286
  segments:
287
287
  - 0
288
- hash: -4193634730883303036
288
+ hash: -3523931774450190994
289
289
  required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  none: false
291
291
  requirements:
@@ -294,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
294
  version: '0'
295
295
  segments:
296
296
  - 0
297
- hash: -4193634730883303036
297
+ hash: -3523931774450190994
298
298
  requirements: []
299
299
  rubyforge_project:
300
300
  rubygems_version: 1.8.24