clark_kent 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e6b35e00bd670e361ca050f25742b0b3a66ac8b
4
- data.tar.gz: 1a180065525fe14dd534cbdf7ef327021049fd56
3
+ metadata.gz: 4de57766aecd490acb4b984021138075f84a8628
4
+ data.tar.gz: 42f55e194b368c09d5c0789ec4de17f8d6d67c12
5
5
  SHA512:
6
- metadata.gz: 190cc984b4e95e9dda83d46b9b6b418f0150dbf50bac219835552757297a65bcae1e296c74a990a0474307e0b408f24184612e3524f75b13af7bfa3b3280c02d
7
- data.tar.gz: e00255abff5d692f3a22ebe58d391db092dd910bd65fc7eff24595a1547f934b2d1795e34f53ff98d02316be70aa15475d919901ab9170d7aff11acd2fc4ee3e
6
+ metadata.gz: df66b58c6e04a380b67c7addf610509526032bfb280dcfed30620e4b85297be1ba06019ab00797a2b60967ee1f2aff92eb3fb56aa0840cf98e215f554708d59f
7
+ data.tar.gz: 091995c346ca849f168ccbade8565bdc399034b5927f707e8679f6c41bcbdc4f0a9f92d4b40050796a78f6a11026a590400cf44636f8f689b755e0feaf29b087
@@ -275,7 +275,7 @@ require 'aws-sdk-v1'
275
275
  end
276
276
 
277
277
  def headers
278
- the_headers = viable_report_columns.sort_by(&:column_order).map(&:column_name)
278
+ the_headers = viable_report_columns.sort_by{|c| c.column_order || 100}.map(&:column_name)
279
279
 
280
280
  unless name =~ /net\s?promoter/i
281
281
  the_headers.map(&:humanize)
@@ -1,3 +1,3 @@
1
1
  module ClarkKent
2
- VERSION = "0.8.8"
2
+ VERSION = "0.8.9"
3
3
  end
Binary file
@@ -63331,3 +63331,695 @@ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
63331
63331
  ClarkKentTest: test_truth
63332
63332
  -------------------------
63333
63333
   (0.0ms) rollback transaction
63334
+ ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
63335
+  (1.2ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
63336
+  (0.1ms) select sqlite_version(*)
63337
+  (1.0ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
63338
+  (1.0ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
63339
+  (1.0ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
63340
+  (2.1ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
63341
+  (0.5ms)  SELECT sql
63342
+ FROM sqlite_master
63343
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
63344
+ UNION ALL
63345
+ SELECT sql
63346
+ FROM sqlite_temp_master
63347
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
63348
+ 
63349
+  (2.5ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
63350
+  (1.0ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
63351
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
63352
+  (0.1ms)  SELECT sql
63353
+ FROM sqlite_master
63354
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
63355
+ UNION ALL
63356
+ SELECT sql
63357
+ FROM sqlite_temp_master
63358
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
63359
+ 
63360
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
63361
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
63362
+  (0.9ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
63363
+  (0.9ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
63364
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
63365
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
63366
+  (0.1ms) SELECT version FROM "schema_migrations"
63367
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
63368
+  (0.8ms) INSERT INTO schema_migrations (version) VALUES
63369
+ ('20131226170042'),
63370
+ ('20131226170112'),
63371
+ ('20140114010048'),
63372
+ ('20140129051754'),
63373
+ ('20150304233739');
63374
+
63375
+ 
63376
+  (1.2ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
63377
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
63378
+  (0.1ms) begin transaction
63379
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-04-03 16:05:55 UTC], ["updated_at", 2017-04-03 16:05:55 UTC]]
63380
+  (0.7ms) commit transaction
63381
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
63382
+  (0.1ms) begin transaction
63383
+  (0.0ms) commit transaction
63384
+  (0.1ms) begin transaction
63385
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-04-03 16:05:55 UTC], ["updated_at", 2017-04-03 16:05:55 UTC]]
63386
+  (1.2ms) commit transaction
63387
+  (0.1ms) begin transaction
63388
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "user_name"], ["column_order", 1]]
63389
+  (1.0ms) commit transaction
63390
+  (0.1ms) begin transaction
63391
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
63392
+  (0.7ms) commit transaction
63393
+  (0.0ms) begin transaction
63394
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
63395
+  (0.8ms) commit transaction
63396
+  (0.0ms) begin transaction
63397
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "description"], ["column_order", 4]]
63398
+  (0.7ms) commit transaction
63399
+  (0.1ms) begin transaction
63400
+ SQL (0.4ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
63401
+  (0.7ms) commit transaction
63402
+  (0.1ms) begin transaction
63403
+ SQL (0.5ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
63404
+  (1.0ms) commit transaction
63405
+  (0.1ms) begin transaction
63406
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-04-03 16:05:55 UTC], ["updated_at", 2017-04-03 16:05:55 UTC]]
63407
+  (0.9ms) commit transaction
63408
+  (0.1ms) begin transaction
63409
+ -------------------------
63410
+ ClarkKentTest: test_truth
63411
+ -------------------------
63412
+  (0.1ms) rollback transaction
63413
+  (0.1ms) begin transaction
63414
+ ---------------------------------------------------
63415
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
63416
+ ---------------------------------------------------
63417
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
63418
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63419
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
63420
+  (0.0ms) SAVEPOINT active_record_1
63421
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
63422
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63423
+  (0.0ms) SAVEPOINT active_record_1
63424
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["created_at", 2017-04-03 16:05:55 UTC], ["updated_at", 2017-04-03 16:05:55 UTC]]
63425
+  (0.2ms) RELEASE SAVEPOINT active_record_1
63426
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63427
+ ClarkKent::ReportFilter Load (0.3ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
63428
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63429
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63430
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63431
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
63432
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
63433
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
63434
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
63435
+  (1.2ms) rollback transaction
63436
+  (0.1ms) begin transaction
63437
+ -----------------------------------------------------------------------------------------
63438
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
63439
+ -----------------------------------------------------------------------------------------
63440
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
63441
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63442
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
63443
+  (0.1ms) SAVEPOINT active_record_1
63444
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
63445
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63446
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63447
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
63448
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63449
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63450
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63451
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
63452
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
63453
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
63454
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63455
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63456
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb
63457
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb (1.6ms)
63458
+ ClarkKent::ReportMailer#report_error: processed outbound mail in 201.7ms
63459
+ Sent mail to taproot@gmail.com (7.5ms)
63460
+ Date: Mon, 03 Apr 2017 10:05:56 -0600
63461
+ From: reservations@invitedhome.com
63462
+ To: taproot@gmail.com
63463
+ Message-ID: <58e272e418e18_b0033ff9ea03fa2426250@Erics-MacBook-Pro.local.mail>
63464
+ Subject: Your report has a problem
63465
+ Mime-Version: 1.0
63466
+ Content-Type: text/html;
63467
+ charset=UTF-8
63468
+ Content-Transfer-Encoding: 7bit
63469
+
63470
+ Your report could not be created due to the following problem:
63471
+ <strong>At least one date range is required.</strong>
63472
+  (0.4ms) rollback transaction
63473
+  (0.1ms) begin transaction
63474
+ -------------------------------------------------------------------------------
63475
+ ClarkKent::ReportColumnsControllerTest: test_0001_should create a report column
63476
+ -------------------------------------------------------------------------------
63477
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63478
+ Processing by ClarkKent::ReportColumnsController#create as JS
63479
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1"}}
63480
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63481
+  (0.1ms) SAVEPOINT active_record_1
63482
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name") VALUES (?, ?) [["report_id", 1], ["column_name", "user_name"]]
63483
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63484
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (8.3ms)
63485
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (38.5ms)
63486
+ Completed 200 OK in 69ms (Views: 65.9ms | ActiveRecord: 0.5ms)
63487
+  (0.6ms) rollback transaction
63488
+  (0.1ms) begin transaction
63489
+ --------------------------------------------------------------------------------------------------
63490
+ ClarkKent::ReportColumnsControllerTest: test_0003_should reject a report column with unusable sort
63491
+ --------------------------------------------------------------------------------------------------
63492
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63493
+ Processing by ClarkKent::ReportColumnsController#create as JS
63494
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1", "report_sort"=>"ascending"}}
63495
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63496
+  (0.1ms) SAVEPOINT active_record_1
63497
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63498
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
63499
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
63500
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
63501
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (66.2ms)
63502
+ Completed 409 Conflict in 100ms (Views: 95.6ms | ActiveRecord: 0.5ms)
63503
+  (0.1ms) rollback transaction
63504
+  (0.1ms) begin transaction
63505
+ ---------------------------------------------------------------------------------------------------
63506
+ ClarkKent::ReportColumnsControllerTest: test_0002_should reject a report column with no column_name
63507
+ ---------------------------------------------------------------------------------------------------
63508
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63509
+ Processing by ClarkKent::ReportColumnsController#create as JS
63510
+ Parameters: {"report_column"=>{"report_id"=>"1"}}
63511
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63512
+  (0.0ms) SAVEPOINT active_record_1
63513
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
63514
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
63515
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63516
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
63517
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (7.5ms)
63518
+ Completed 409 Conflict in 10ms (Views: 7.6ms | ActiveRecord: 0.4ms)
63519
+  (0.1ms) rollback transaction
63520
+  (0.0ms) begin transaction
63521
+ ------------------------------------------------------------------------------------------------
63522
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
63523
+ ------------------------------------------------------------------------------------------------
63524
+  (0.0ms) SAVEPOINT active_record_1
63525
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
63526
+  (0.0ms) rollback transaction
63527
+  (0.0ms) begin transaction
63528
+ ------------------------------------------------------------------------
63529
+ ClarkKent::ReportableTest: test_0001_it adds required filters if present
63530
+ ------------------------------------------------------------------------
63531
+  (0.0ms) SAVEPOINT active_record_1
63532
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63533
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63534
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
63535
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
63536
+  (0.4ms) rollback transaction
63537
+  (0.1ms) begin transaction
63538
+ --------------------------------------------------------------------------
63539
+ ClarkKent::ReportableTest: test_0002_it works without any required filters
63540
+ --------------------------------------------------------------------------
63541
+  (0.0ms) SAVEPOINT active_record_1
63542
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63543
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63544
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
63545
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
63546
+  (0.5ms) rollback transaction
63547
+  (0.1ms) begin transaction
63548
+ --------------------------------------------------------------------------
63549
+ ClarkKent::ReportableTest: test_0003_doesn't blow up if order_sql is blank
63550
+ --------------------------------------------------------------------------
63551
+  (0.0ms) SAVEPOINT active_record_1
63552
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63553
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63554
+  (0.0ms) SAVEPOINT active_record_1
63555
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
63556
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63557
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
63558
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
63559
+  (0.5ms) rollback transaction
63560
+  (0.1ms) begin transaction
63561
+ -----------------------------------------------------
63562
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
63563
+ -----------------------------------------------------
63564
+  (0.1ms) rollback transaction
63565
+  (0.1ms) begin transaction
63566
+ --------------------------------------------------------------------------
63567
+ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
63568
+ --------------------------------------------------------------------------
63569
+ ClarkKent::Report Load (0.3ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63570
+  (0.1ms) SAVEPOINT active_record_1
63571
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63572
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63573
+  (0.1ms) rollback transaction
63574
+  (0.1ms) begin transaction
63575
+ ------------------------------------------------------------------------------------------
63576
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_an_object_filter
63577
+ ------------------------------------------------------------------------------------------
63578
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63579
+  (0.1ms) SAVEPOINT active_record_1
63580
+ SQL (1.0ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63581
+  (0.3ms) RELEASE SAVEPOINT active_record_1
63582
+ User Load (0.4ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63583
+  (0.1ms) SAVEPOINT active_record_1
63584
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63585
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63586
+ Processing by ClarkKent::ReportFiltersController#show as HTML
63587
+ Parameters: {"id"=>"1"}
63588
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63589
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63590
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63591
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63592
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (1.1ms)
63593
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (9.0ms)
63594
+ Completed 200 OK in 18ms (Views: 12.8ms | ActiveRecord: 0.4ms)
63595
+  (0.5ms) rollback transaction
63596
+  (0.1ms) begin transaction
63597
+ -----------------------------------------------------------------------------------------
63598
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_string_filter
63599
+ -----------------------------------------------------------------------------------------
63600
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63601
+  (0.1ms) SAVEPOINT active_record_1
63602
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63603
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63604
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63605
+  (0.1ms) SAVEPOINT active_record_1
63606
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63607
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63608
+ Processing by ClarkKent::ReportFiltersController#show as HTML
63609
+ Parameters: {"id"=>"1"}
63610
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63611
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63612
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63613
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.9ms)
63614
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (8.3ms)
63615
+ Completed 200 OK in 12ms (Views: 9.0ms | ActiveRecord: 0.2ms)
63616
+  (1.1ms) rollback transaction
63617
+  (0.1ms) begin transaction
63618
+ ---------------------------------------------------------------------------------------
63619
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_date_filter
63620
+ ---------------------------------------------------------------------------------------
63621
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63622
+  (0.0ms) SAVEPOINT active_record_1
63623
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63624
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63625
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63626
+  (0.0ms) SAVEPOINT active_record_1
63627
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63628
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63629
+ Processing by ClarkKent::ReportFiltersController#show as HTML
63630
+ Parameters: {"id"=>"1"}
63631
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63632
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63633
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63634
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.6ms)
63635
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (5.6ms)
63636
+ Completed 200 OK in 9ms (Views: 6.1ms | ActiveRecord: 0.1ms)
63637
+  (0.5ms) rollback transaction
63638
+  (0.1ms) begin transaction
63639
+ ---------------------------------------------------------------------------------------
63640
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_date_filter
63641
+ ---------------------------------------------------------------------------------------
63642
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63643
+  (0.0ms) SAVEPOINT active_record_1
63644
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63645
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63646
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63647
+  (0.1ms) SAVEPOINT active_record_1
63648
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63649
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63650
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
63651
+ Parameters: {"id"=>"1"}
63652
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63653
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63654
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63655
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_edit.html.erb (6.1ms)
63656
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (18.2ms)
63657
+ Completed 200 OK in 25ms (Views: 21.3ms | ActiveRecord: 0.2ms)
63658
+  (0.8ms) rollback transaction
63659
+  (0.1ms) begin transaction
63660
+ ----------------------------------------------------------------------------------
63661
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_date_report_filter
63662
+ ----------------------------------------------------------------------------------
63663
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63664
+  (0.1ms) SAVEPOINT active_record_1
63665
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63666
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63667
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63668
+ Processing by ClarkKent::ReportFiltersController#create as HTML
63669
+ Parameters: {"report_filter"=>{"duration"=>"week", "filter_name"=>"created_at", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report", "kind_of_day"=>"Monday", "offset"=>"last_week"}}
63670
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63671
+  (0.1ms) SAVEPOINT active_record_1
63672
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63673
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63674
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63675
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.1ms)
63676
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (4.8ms)
63677
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (5.7ms)
63678
+ Completed 200 OK in 13ms (Views: 8.8ms | ActiveRecord: 0.4ms)
63679
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
63680
+  (0.5ms) rollback transaction
63681
+  (0.1ms) begin transaction
63682
+ -----------------------------------------------------------------------------
63683
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_report_filter
63684
+ -----------------------------------------------------------------------------
63685
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63686
+  (0.0ms) SAVEPOINT active_record_1
63687
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63688
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63689
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63690
+ Processing by ClarkKent::ReportFiltersController#create as HTML
63691
+ Parameters: {"report_filter"=>{"filter_name"=>"user_email", "filter_value"=>"taproot@gmail.com", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
63692
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63693
+  (0.1ms) SAVEPOINT active_record_1
63694
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63695
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63696
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63697
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.1ms)
63698
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.5ms)
63699
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (2.7ms)
63700
+ Completed 200 OK in 7ms (Views: 3.1ms | ActiveRecord: 0.4ms)
63701
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
63702
+  (0.4ms) rollback transaction
63703
+  (0.1ms) begin transaction
63704
+ ------------------------------------------------------------------------------------------
63705
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_an_object_filter
63706
+ ------------------------------------------------------------------------------------------
63707
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63708
+  (0.1ms) SAVEPOINT active_record_1
63709
+ SQL (0.6ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63710
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63711
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63712
+  (0.1ms) SAVEPOINT active_record_1
63713
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63714
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63715
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
63716
+ Parameters: {"id"=>"1"}
63717
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63718
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63719
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63720
+ User Load (0.1ms) SELECT "users".* FROM "users"
63721
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_edit.html.erb (5.0ms)
63722
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (12.9ms)
63723
+ Completed 200 OK in 16ms (Views: 13.1ms | ActiveRecord: 0.3ms)
63724
+  (0.5ms) rollback transaction
63725
+  (0.1ms) begin transaction
63726
+ -------------------------------------------------------------------------------------
63727
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_an_object_report_filter
63728
+ -------------------------------------------------------------------------------------
63729
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63730
+  (0.1ms) SAVEPOINT active_record_1
63731
+ SQL (0.6ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63732
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63733
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63734
+ Processing by ClarkKent::ReportFiltersController#create as HTML
63735
+ Parameters: {"report_filter"=>{"filter_name"=>"user_id", "filter_value"=>"1", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
63736
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63737
+  (0.1ms) SAVEPOINT active_record_1
63738
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63739
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63740
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63741
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63742
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.4ms)
63743
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.2ms)
63744
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (2.4ms)
63745
+ Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 0.6ms)
63746
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
63747
+  (0.5ms) rollback transaction
63748
+  (0.1ms) begin transaction
63749
+ -----------------------------------------------------------------------------------------
63750
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_string_filter
63751
+ -----------------------------------------------------------------------------------------
63752
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63753
+  (0.0ms) SAVEPOINT active_record_1
63754
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63755
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63756
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63757
+  (0.1ms) SAVEPOINT active_record_1
63758
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63759
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63760
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
63761
+ Parameters: {"id"=>"1"}
63762
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63763
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63764
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63765
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_edit.html.erb (0.4ms)
63766
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (11.9ms)
63767
+ Completed 200 OK in 15ms (Views: 12.4ms | ActiveRecord: 0.2ms)
63768
+  (0.5ms) rollback transaction
63769
+  (0.1ms) begin transaction
63770
+ -----------------------------------------------------------------
63771
+ ClarkKent::ReportsControllerTest: test_0010_should destroy report
63772
+ -----------------------------------------------------------------
63773
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63774
+  (0.1ms) SAVEPOINT active_record_1
63775
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63776
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63777
+  (0.0ms) SAVEPOINT active_record_1
63778
+ SQL (0.1ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", 2017-04-03 16:05:56 UTC], ["updated_at", 2017-04-03 16:05:56 UTC]]
63779
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63780
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
63781
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63782
+ Processing by ClarkKent::ReportsController#destroy as HTML
63783
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
63784
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
63785
+  (0.1ms) SAVEPOINT active_record_1
63786
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
63787
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
63788
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
63789
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
63790
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63791
+ Redirected to http://test.host/reports/reports
63792
+ Completed 302 Found in 12ms (ActiveRecord: 0.7ms)
63793
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
63794
+  (0.5ms) rollback transaction
63795
+  (0.1ms) begin transaction
63796
+ --------------------------------------------------------------------------------
63797
+ ClarkKent::ReportsControllerTest: test_0004_should render errors during creation
63798
+ --------------------------------------------------------------------------------
63799
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63800
+  (0.1ms) SAVEPOINT active_record_1
63801
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63802
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63803
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63804
+ Processing by ClarkKent::ReportsController#create as HTML
63805
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
63806
+  (0.1ms) SAVEPOINT active_record_1
63807
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
63808
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
63809
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
63810
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63811
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (8.6ms)
63812
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (12.6ms)
63813
+ Completed 409 Conflict in 230ms (Views: 227.3ms | ActiveRecord: 0.4ms)
63814
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
63815
+  (0.5ms) rollback transaction
63816
+  (0.1ms) begin transaction
63817
+ ----------------------------------------------------------------------
63818
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
63819
+ ----------------------------------------------------------------------
63820
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63821
+  (0.1ms) SAVEPOINT active_record_1
63822
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63823
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63824
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63825
+ Processing by ClarkKent::ReportsController#show as HTML
63826
+ Parameters: {"created_at_from"=>"2017-04-02", "created_at_until"=>"2017-04-03", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
63827
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
63828
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
63829
+ ClarkKent::ReportFilter Load (0.4ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
63830
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
63831
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.3ms)
63832
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63833
+ User Load (0.0ms) SELECT "users".* FROM "users"
63834
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.3ms)
63835
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.6ms)
63836
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
63837
+  (0.1ms) SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ?) subquery_for_count [["LIMIT", 10], ["OFFSET", 0]]
63838
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (6.8ms)
63839
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
63840
+ Order Load (0.1ms) SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
63841
+ (SELECT u.name
63842
+ FROM users u
63843
+ WHERE u.id = orders.user_id)
63844
+ as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
63845
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63846
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63847
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63848
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63849
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.2ms)
63850
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (53.1ms)
63851
+ Completed 200 OK in 70ms (Views: 54.8ms | ActiveRecord: 1.8ms)
63852
+  (0.5ms) rollback transaction
63853
+  (0.1ms) begin transaction
63854
+ --------------------------------------------------------------
63855
+ ClarkKent::ReportsControllerTest: test_0005_should show report
63856
+ --------------------------------------------------------------
63857
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63858
+  (0.0ms) SAVEPOINT active_record_1
63859
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63860
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63861
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63862
+ Processing by ClarkKent::ReportsController#show as HTML
63863
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
63864
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
63865
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
63866
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
63867
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
63868
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
63869
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63870
+ User Load (0.0ms) SELECT "users".* FROM "users"
63871
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.2ms)
63872
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
63873
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
63874
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (5.3ms)
63875
+ Completed 200 OK in 11ms (Views: 8.0ms | ActiveRecord: 0.4ms)
63876
+  (0.7ms) rollback transaction
63877
+  (0.1ms) begin transaction
63878
+ -------------------------------------------------------------------------
63879
+ ClarkKent::ReportsControllerTest: test_0007_should show report run errors
63880
+ -------------------------------------------------------------------------
63881
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63882
+  (0.0ms) SAVEPOINT active_record_1
63883
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63884
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63885
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63886
+ Processing by ClarkKent::ReportsController#show as HTML
63887
+ Parameters: {"current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
63888
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
63889
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
63890
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
63891
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
63892
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.9ms)
63893
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63894
+ User Load (0.1ms) SELECT "users".* FROM "users"
63895
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.8ms)
63896
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
63897
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.1ms)
63898
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (4.9ms)
63899
+ Completed 200 OK in 15ms (Views: 9.3ms | ActiveRecord: 0.4ms)
63900
+  (0.5ms) rollback transaction
63901
+  (0.1ms) begin transaction
63902
+ -----------------------------------------------------------
63903
+ ClarkKent::ReportsControllerTest: test_0008_should get edit
63904
+ -----------------------------------------------------------
63905
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63906
+  (0.1ms) SAVEPOINT active_record_1
63907
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63908
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63909
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63910
+ Processing by ClarkKent::ReportsController#edit as HTML
63911
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
63912
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63913
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
63914
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.5ms)
63915
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
63916
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (9.5ms)
63917
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
63918
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.0ms)
63919
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (4.3ms)
63920
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
63921
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
63922
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.2ms)
63923
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
63924
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.2ms)
63925
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
63926
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (11.4ms)
63927
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
63928
+ ClarkKent::ReportDateFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
63929
+ User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
63930
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (36.8ms)
63931
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (40.6ms)
63932
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (50.2ms)
63933
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (91.7ms)
63934
+ Completed 200 OK in 102ms (Views: 94.5ms | ActiveRecord: 0.8ms)
63935
+  (0.5ms) rollback transaction
63936
+  (0.1ms) begin transaction
63937
+ ----------------------------------------------------------------
63938
+ ClarkKent::ReportsControllerTest: test_0003_should create report
63939
+ ----------------------------------------------------------------
63940
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63941
+  (0.0ms) SAVEPOINT active_record_1
63942
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63943
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63944
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63945
+ Processing by ClarkKent::ReportsController#create as HTML
63946
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
63947
+  (0.1ms) SAVEPOINT active_record_1
63948
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "sharing_scope_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_type", ""], ["created_at", 2017-04-03 16:05:57 UTC], ["updated_at", 2017-04-03 16:05:57 UTC]]
63949
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63950
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
63951
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.3ms)
63952
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
63953
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.6ms)
63954
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
63955
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (8.7ms)
63956
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
63957
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.5ms)
63958
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (15.1ms)
63959
+ Completed 200 OK in 20ms (Views: 17.3ms | ActiveRecord: 0.5ms)
63960
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
63961
+  (0.0ms) SAVEPOINT active_record_1
63962
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
63963
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
63964
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
63965
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
63966
+  (0.4ms) RELEASE SAVEPOINT active_record_1
63967
+  (0.4ms) rollback transaction
63968
+  (0.1ms) begin transaction
63969
+ ----------------------------------------------------------------
63970
+ ClarkKent::ReportsControllerTest: test_0009_should update report
63971
+ ----------------------------------------------------------------
63972
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63973
+  (0.1ms) SAVEPOINT active_record_1
63974
+ SQL (0.5ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63975
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63976
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63977
+ Processing by ClarkKent::ReportsController#update as HTML
63978
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}, "id"=>"1"}
63979
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
63980
+ ClarkKent::ReportColumn Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? LIMIT ? [["report_id", 1], ["LIMIT", 1]]
63981
+  (0.1ms) SAVEPOINT active_record_1
63982
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "name" = ?, "sharing_scope_type" = ?, "updated_at" = ? WHERE "clark_kent_reports"."id" = ? [["name", ""], ["sharing_scope_type", ""], ["updated_at", 2017-04-03 16:05:57 UTC], ["id", 1]]
63983
+  (0.1ms) RELEASE SAVEPOINT active_record_1
63984
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.3ms)
63985
+ Completed 200 OK in 15ms (Views: 1.7ms | ActiveRecord: 0.6ms)
63986
+  (0.4ms) rollback transaction
63987
+  (0.1ms) begin transaction
63988
+ ------------------------------------------------------------
63989
+ ClarkKent::ReportsControllerTest: test_0001_should get index
63990
+ ------------------------------------------------------------
63991
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
63992
+  (0.0ms) SAVEPOINT active_record_1
63993
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
63994
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63995
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
63996
+ Processing by ClarkKent::ReportsController#index as HTML
63997
+ Parameters: {"current_user_id"=>"1"}
63998
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application
63999
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
64000
+ ClarkKent::Report Exists (0.4ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "User"], ["LIMIT", 1]]
64001
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64002
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["LIMIT", 1]]
64003
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
64004
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
64005
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (11.6ms)
64006
+ Completed 200 OK in 19ms (Views: 13.8ms | ActiveRecord: 1.1ms)
64007
+  (0.5ms) rollback transaction
64008
+  (0.1ms) begin transaction
64009
+ ----------------------------------------------------------
64010
+ ClarkKent::ReportsControllerTest: test_0002_should get new
64011
+ ----------------------------------------------------------
64012
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64013
+  (0.0ms) SAVEPOINT active_record_1
64014
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64015
+  (0.2ms) RELEASE SAVEPOINT active_record_1
64016
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64017
+ Processing by ClarkKent::ReportsController#new as HTML
64018
+ Parameters: {"current_user_id"=>"1"}
64019
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
64020
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
64021
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64022
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (9.6ms)
64023
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (10.3ms)
64024
+ Completed 200 OK in 15ms (Views: 14.2ms | ActiveRecord: 0.2ms)
64025
+  (0.3ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clark_kent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-22 00:00:00.000000000 Z
11
+ date: 2017-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails