clark_kent 0.4.0 → 0.4.1

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: fe22bd3faedb9def5b87a6d211ad636b4a19d205
4
- data.tar.gz: d29d05f7cd1eef5d5d51ea3571a97ab214f1235e
3
+ metadata.gz: bf0da90652407b6328652a10fc298b45de321ab5
4
+ data.tar.gz: 4032cef17661277e0d77d922a54cee4849ed82c7
5
5
  SHA512:
6
- metadata.gz: 0a3af043dddd9aa010e65f75b9c2d4ced95a4fe36d0b7cf8df68a9568f058c2e054968872a47d65cead3fb8f30d3e507cf439c5e14d007cb257e36336bcf35e8
7
- data.tar.gz: 7a9fb1a4648833e2e73e99692806a5b16966a786931df1c7660d8e2cc31c01b48f6c6d3b624126a85dec59a358a76e9636402be747cddf58ccf7e44dc2e9da4f
6
+ metadata.gz: 03cd7d300c3b9617a12c230e775a6cfb9408cfc36cec6df88066899b5c68de330d52e08c823e613c74ebafdb9c397bc831c52a2b31cb4b8939cdf25df0dcd6ef
7
+ data.tar.gz: 6b85396de8f9567b1d00aebeb01004425dd3cbf20b39518f0f9eae16509233e1ed2d6d58c34be3ebf2b0a3589ce3f110d54704a8ce8b6b71d776e66d2b5f931e
@@ -33,7 +33,7 @@ module ClarkKent
33
33
  (value =~ /\d/) && (value =~ /\./) && !(value =~ /[a-zA-Z]/)
34
34
  end
35
35
 
36
- def display_for_value(value, column, row)
36
+ def display_for_value(value, column = nil, row = {})
37
37
  ##TODO, genericize this link display. link info must come from model config.
38
38
  return link_to(value, main_app.send(column.link, id: value)) if column.try(:link) && value.present?
39
39
  return value.join(', ') if value.is_a? Array
@@ -2,8 +2,8 @@
2
2
  input_html: {data: {revealer: "true", sub_type: "FormFieldRevealer", revealer_children_id: "period_options_#{name}_#{f.object.object_id}"}} %>
3
3
  <div data-revealer-target="period_options_<%= name %>_<%= f.object.object_id %>">
4
4
  <%= f.input :offset, collection: ClarkKent::ReportDateFilter::WeekPeriodOptions, include_blank: false, label: 'Report start: when?',
5
- wrapper_html: {'data-revealer_id' => "period_options_#{name}_#{f.object.object_id}", 'data-revealer-triggers' => "['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']"} %>
5
+ wrapper_html: {'data-revealer-id' => "period_options_#{name}_#{f.object.object_id}", 'data-revealer-triggers' => "['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']"} %>
6
6
  <%= f.input :offset, collection: ClarkKent::ReportDateFilter::MonthPeriodOptions, include_blank: false, label: 'Report start: when?',
7
- wrapper_html: {'data-revealer_id' => "period_options_#{name}_#{f.object.object_id}", 'data-revealer-triggers' => "['beginning of month','beginning of week']"} %>
7
+ wrapper_html: {'data-revealer-id' => "period_options_#{name}_#{f.object.object_id}", 'data-revealer-triggers' => "['beginning of month','beginning of week']"} %>
8
8
  </div>
9
9
  <%= f.input :duration, collection: ClarkKent::ReportDateFilter::Durations %>
@@ -1,3 +1,3 @@
1
1
  module ClarkKent
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
Binary file
@@ -36904,5 +36904,367 @@ ClarkKent::ReportsHelperTest: test_it_displays_a_date
36904
36904
   (0.1ms) begin transaction
36905
36905
  -----------------------------------------------------
36906
36906
  ClarkKent::ReportsHelperTest: test_it_displays_a_date
36907
+ -----------------------------------------------------
36908
+  (0.1ms) rollback transaction
36909
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
36910
+  (1.1ms) 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)
36911
+  (0.4ms) select sqlite_version(*)
36912
+  (0.8ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
36913
+  (0.7ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar) 
36914
+  (0.8ms) 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)
36915
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
36916
+  (0.1ms) SELECT sql
36917
+ FROM sqlite_master
36918
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36919
+ UNION ALL
36920
+ SELECT sql
36921
+ FROM sqlite_temp_master
36922
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36923
+
36924
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
36925
+  (0.9ms) 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)
36926
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
36927
+  (0.1ms) SELECT sql
36928
+ FROM sqlite_master
36929
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36930
+ UNION ALL
36931
+ SELECT sql
36932
+ FROM sqlite_temp_master
36933
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36934
+
36935
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
36936
+  (0.9ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
36937
+  (0.8ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar) 
36938
+  (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)
36939
+  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer) 
36940
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
36941
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36942
+  (0.1ms) SELECT version FROM "schema_migrations"
36943
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
36944
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170042')
36945
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
36946
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140114010048')
36947
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
36948
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150304233739')
36949
+  (0.1ms) begin transaction
36950
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", "2016-08-12 21:09:24.343486"], ["updated_at", "2016-08-12 21:09:24.343486"]]
36951
+  (0.7ms) commit transaction
36952
+  (0.0ms) begin transaction
36953
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
36954
+  (0.7ms) commit transaction
36955
+  (0.1ms) begin transaction
36956
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
36957
+  (0.8ms) commit transaction
36958
+  (0.0ms) begin transaction
36959
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
36960
+  (0.6ms) commit transaction
36961
+  (0.1ms) begin transaction
36962
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
36963
+  (0.8ms) commit transaction
36964
+  (0.1ms) begin transaction
36965
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
36966
+  (0.7ms) commit transaction
36967
+  (0.1ms) begin transaction
36968
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
36969
+  (0.6ms) commit transaction
36970
+  (0.1ms) begin transaction
36971
+ SQL (0.4ms) INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2016-08-12 21:09:24.398284"], ["updated_at", "2016-08-12 21:09:24.398284"]]
36972
+  (0.8ms) commit transaction
36973
+  (0.1ms) begin transaction
36974
+ ------------------------------------------------------------------------------------------------
36975
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
36976
+ ------------------------------------------------------------------------------------------------
36977
+  (0.1ms) SAVEPOINT active_record_1
36978
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
36979
+  (0.1ms) rollback transaction
36980
+  (0.1ms) begin transaction
36981
+ ---------------------------------------------------
36982
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
36983
+ ---------------------------------------------------
36984
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "taproot@gmail.com"]]
36985
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36986
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
36987
+  (0.0ms) SAVEPOINT active_record_1
36988
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
36989
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36990
+  (0.1ms) SAVEPOINT active_record_1
36991
+ SQL (0.5ms) INSERT INTO "clark_kent_report_filters" ("type", "filter_name", "duration", "kind_of_day", "offset", "filterable_id", "filterable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["type", "ClarkKent::ReportDateFilter"], ["filter_name", "created_at"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["created_at", "2016-08-12 21:09:24.499273"], ["updated_at", "2016-08-12 21:09:24.499273"]]
36992
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36993
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
36994
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36995
+ 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"]]
36996
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
36997
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 1]]
36998
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36999
+ 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]]
37000
+ 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"]]
37001
+ 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::ReportEmail"]]
37002
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37003
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37004
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37005
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37006
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
37007
+  (0.7ms) rollback transaction
37008
+  (0.1ms) begin transaction
37009
+ -----------------------------------------------------------------------------------------
37010
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
37011
+ -----------------------------------------------------------------------------------------
37012
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "taproot@gmail.com"]]
37013
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
37014
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
37015
+  (0.0ms) SAVEPOINT active_record_1
37016
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
37017
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37018
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
37019
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
37020
+ 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"]]
37021
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
37022
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 1]]
37023
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
37024
+ 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]]
37025
+ 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"]]
37026
+ 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"]]
37027
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37028
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37029
+  (0.5ms) rollback transaction
37030
+  (0.1ms) begin transaction
37031
+ -------------------------------------------------------
37032
+ ClarkKent::ReportsController: test_should_create_report
37033
+ -------------------------------------------------------
37034
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
37035
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37036
+ Processing by ClarkKent::ReportsController#create as HTML
37037
+ Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
37038
+  (0.1ms) SAVEPOINT active_record_1
37039
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", "2016-08-12 21:09:24.695692"], ["updated_at", "2016-08-12 21:09:24.695692"]]
37040
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37041
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (7.2ms)
37042
+ 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"]]
37043
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (4.3ms)
37044
+ 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]]
37045
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (4.6ms)
37046
+ 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]]
37047
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (4.0ms)
37048
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (35.3ms)
37049
+ Completed 200 OK in 257ms (Views: 253.1ms | ActiveRecord: 0.7ms)
37050
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT 1 [["name", "delete me"]]
37051
+  (0.0ms) SAVEPOINT active_record_1
37052
+ 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", 2], ["filterable_type", "ClarkKent::Report"]]
37053
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
37054
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
37055
+ SQL (0.3ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
37056
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37057
+  (0.6ms) rollback transaction
37058
+  (0.1ms) begin transaction
37059
+ --------------------------------------------------------
37060
+ ClarkKent::ReportsController: test_should_destroy_report
37061
+ --------------------------------------------------------
37062
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
37063
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37064
+  (0.1ms) SAVEPOINT active_record_1
37065
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", "2016-08-12 21:09:24.957848"], ["updated_at", "2016-08-12 21:09:24.957848"]]
37066
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37067
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
37068
+ Processing by ClarkKent::ReportsController#destroy as HTML
37069
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
37070
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 2]]
37071
+  (0.1ms) SAVEPOINT active_record_1
37072
+ 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", 2], ["filterable_type", "ClarkKent::Report"]]
37073
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
37074
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
37075
+ SQL (0.3ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
37076
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37077
+ Redirected to http://test.host/reports/reports
37078
+ Completed 302 Found in 7ms (ActiveRecord: 0.6ms)
37079
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
37080
+  (0.7ms) rollback transaction
37081
+  (0.1ms) begin transaction
37082
+ --------------------------------------------------
37083
+ ClarkKent::ReportsController: test_should_get_edit
37084
+ --------------------------------------------------
37085
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
37086
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37087
+ Processing by ClarkKent::ReportsController#edit as HTML
37088
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
37089
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
37090
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (5.0ms)
37091
+ 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"]]
37092
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (4.2ms)
37093
+ 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]]
37094
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (3.6ms)
37095
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (6.2ms)
37096
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (3.3ms)
37097
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.7ms)
37098
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.7ms)
37099
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.1ms)
37100
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.9ms)
37101
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.1ms)
37102
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (22.7ms)
37103
+ 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]]
37104
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (3.1ms)
37105
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (38.1ms)
37106
+ Completed 200 OK in 42ms (Views: 40.6ms | ActiveRecord: 0.3ms)
37107
+  (0.1ms) rollback transaction
37108
+  (0.1ms) begin transaction
37109
+ ---------------------------------------------------
37110
+ ClarkKent::ReportsController: test_should_get_index
37111
+ ---------------------------------------------------
37112
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
37113
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37114
+ Processing by ClarkKent::ReportsController#index as HTML
37115
+ Parameters: {"current_user_id"=>"1"}
37116
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
37117
+ ClarkKent::Report Exists (0.2ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
37118
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
37119
+ ClarkKent::Report Exists (0.0ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
37120
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
37121
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
37122
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (30.2ms)
37123
+ Completed 200 OK in 35ms (Views: 34.2ms | ActiveRecord: 0.7ms)
37124
+  (0.1ms) rollback transaction
37125
+  (0.0ms) begin transaction
37126
+ -------------------------------------------------
37127
+ ClarkKent::ReportsController: test_should_get_new
37128
+ -------------------------------------------------
37129
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
37130
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37131
+ Processing by ClarkKent::ReportsController#new as HTML
37132
+ Parameters: {"current_user_id"=>"1"}
37133
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
37134
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
37135
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (76.4ms)
37136
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (82.5ms)
37137
+ Completed 200 OK in 87ms (Views: 86.6ms | ActiveRecord: 0.1ms)
37138
+  (0.1ms) rollback transaction
37139
+  (0.0ms) begin transaction
37140
+ -----------------------------------------------------
37141
+ ClarkKent::ReportsController: test_should_show_report
37142
+ -----------------------------------------------------
37143
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
37144
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37145
+ Processing by ClarkKent::ReportsController#show as HTML
37146
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
37147
+ 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 1 [["id", 1]]
37148
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
37149
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" 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"]]
37150
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" 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"]]
37151
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" 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"]]
37152
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.0ms)
37153
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37154
+ User Load (0.1ms) SELECT "users".* FROM "users"
37155
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.6ms)
37156
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.6ms)
37157
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.9ms)
37158
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (22.2ms)
37159
+ Completed 200 OK in 33ms (Views: 26.3ms | ActiveRecord: 0.7ms)
37160
+  (0.1ms) rollback transaction
37161
+  (0.0ms) begin transaction
37162
+ -------------------------------------------------------------
37163
+ ClarkKent::ReportsController: test_should_show_report_results
37164
+ -------------------------------------------------------------
37165
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
37166
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37167
+ Processing by ClarkKent::ReportsController#show as HTML
37168
+ Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2016-08-12", "created_at_from"=>"2016-08-11", "id"=>"1"}
37169
+ 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 1 [["id", 1]]
37170
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
37171
+ 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"]]
37172
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37173
+ ClarkKent::ReportColumn Load (0.3ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37174
+  (0.2ms) SELECT "clark_kent_report_filters"."filter_name" 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"]]
37175
+  (0.2ms) SELECT "clark_kent_report_filters"."filter_name" 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"]]
37176
+  (0.2ms) SELECT "clark_kent_report_filters"."filter_name" 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"]]
37177
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
37178
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37179
+ User Load (0.1ms) SELECT "users".* FROM "users"
37180
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.6ms)
37181
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
37182
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
37183
+  (0.1ms) SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0) subquery_for_count
37184
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (7.1ms)
37185
+ 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]]
37186
+ Order Load (0.1ms) SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
37187
+ (SELECT u.name
37188
+ FROM users u
37189
+ WHERE u.id = orders.user_id)
37190
+ as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0
37191
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
37192
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
37193
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
37194
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
37195
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (3.1ms)
37196
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (51.0ms)
37197
+ Completed 200 OK in 65ms (Views: 53.5ms | ActiveRecord: 2.3ms)
37198
+  (0.1ms) rollback transaction
37199
+  (0.1ms) begin transaction
37200
+ ----------------------------------------------------------------
37201
+ ClarkKent::ReportsController: test_should_show_report_run_errors
37202
+ ----------------------------------------------------------------
37203
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
37204
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37205
+ Processing by ClarkKent::ReportsController#show as HTML
37206
+ Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
37207
+ 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 1 [["id", 1]]
37208
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
37209
+ 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"]]
37210
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37211
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37212
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" 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"]]
37213
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" 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"]]
37214
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" 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"]]
37215
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
37216
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37217
+ User Load (0.1ms) SELECT "users".* FROM "users"
37218
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (0.9ms)
37219
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
37220
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
37221
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (7.4ms)
37222
+ Completed 200 OK in 14ms (Views: 9.0ms | ActiveRecord: 0.8ms)
37223
+  (0.1ms) rollback transaction
37224
+  (0.1ms) begin transaction
37225
+ -------------------------------------------------------
37226
+ ClarkKent::ReportsController: test_should_update_report
37227
+ -------------------------------------------------------
37228
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
37229
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
37230
+ Processing by ClarkKent::ReportsController#update as HTML
37231
+ Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
37232
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
37233
+  (0.1ms) SAVEPOINT active_record_1
37234
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37235
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (4.8ms)
37236
+ Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.1ms)
37237
+  (0.1ms) rollback transaction
37238
+  (0.1ms) begin transaction
37239
+ -------------------------------------------------------------------
37240
+ ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
37241
+ -------------------------------------------------------------------
37242
+  (0.1ms) SAVEPOINT active_record_1
37243
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", "2016-08-12 21:09:25.302210"], ["updated_at", "2016-08-12 21:09:25.302210"]]
37244
+  (0.0ms) RELEASE SAVEPOINT active_record_1
37245
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
37246
+ 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", 2], ["filterable_type", "ClarkKent::Report"]]
37247
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37248
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
37249
+  (0.5ms) rollback transaction
37250
+  (0.1ms) begin transaction
37251
+ ---------------------------------------------------------------------
37252
+ ClarkKent::ReportableTest: test_it_works_without_any_required_filters
37253
+ ---------------------------------------------------------------------
37254
+  (0.0ms) SAVEPOINT active_record_1
37255
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", "2016-08-12 21:09:25.308259"], ["updated_at", "2016-08-12 21:09:25.308259"]]
37256
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37257
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
37258
+ 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"]]
37259
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 2]]
37260
+  (0.4ms) rollback transaction
37261
+  (0.1ms) begin transaction
37262
+ -------------------------
37263
+ ClarkKentTest: test_truth
37264
+ -------------------------
37265
+  (0.0ms) rollback transaction
37266
+  (0.1ms) begin transaction
37267
+ -----------------------------------------------------
37268
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
36907
37269
  -----------------------------------------------------
36908
37270
   (0.1ms) 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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-31 00:00:00.000000000 Z
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails