query_report 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,3 +26,151 @@ Connecting to database specified by database.yml
26
26
  Connecting to database specified by database.yml
27
27
  Connecting to database specified by database.yml
28
28
  Connecting to database specified by database.yml
29
+ Connecting to database specified by database.yml
30
+  (1.7ms) select sqlite_version(*)
31
+  (0.3ms) CREATE TABLE "gem_defined_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "age" integer)
32
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "age" integer, "dob" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
33
+  (0.2ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255))
34
+  (0.1ms) CREATE TABLE "readerships" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "book_id" integer) 
35
+  (0.1ms) CREATE TABLE "authorships" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "book_id" integer)
36
+  (0.1ms) CREATE TABLE "user_addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "user_id" integer) 
37
+ User Load (2.9ms) SELECT "users".* FROM "users"
38
+  (0.1ms) begin transaction
39
+ SQL (43.0ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 10], ["created_at", Sun, 08 Sep 2013 04:18:32 UTC +00:00], ["dob", Mon, 08 Sep 2003 04:18:32 UTC +00:00], ["name", "User#1"], ["updated_at", Sun, 08 Sep 2013 04:18:32 UTC +00:00]]
40
+  (0.1ms) commit transaction
41
+  (0.1ms) begin transaction
42
+ SQL (0.4ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 20], ["created_at", Sun, 08 Sep 2013 04:18:32 UTC +00:00], ["dob", Wed, 08 Sep 1993 04:18:32 UTC +00:00], ["name", "User#2"], ["updated_at", Sun, 08 Sep 2013 04:18:32 UTC +00:00]]
43
+  (0.1ms) commit transaction
44
+  (0.1ms) begin transaction
45
+ SQL (0.3ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 34], ["created_at", Sun, 08 Sep 2013 04:18:32 UTC +00:00], ["dob", Sat, 08 Sep 1979 04:18:32 UTC +00:00], ["name", "User#3"], ["updated_at", Sun, 08 Sep 2013 04:18:32 UTC +00:00]]
46
+  (0.1ms) commit transaction
47
+ User Load (0.2ms) SELECT "users".* FROM "users"
48
+ User Load (0.3ms) SELECT "users".* FROM "users" 
49
+  (0.1ms) begin transaction
50
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
51
+  (0.1ms) commit transaction
52
+  (0.1ms) begin transaction
53
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 2]]
54
+  (0.1ms) commit transaction
55
+  (0.1ms) begin transaction
56
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 3]]
57
+  (0.1ms) commit transaction
58
+  (0.1ms) begin transaction
59
+ SQL (0.5ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 10], ["created_at", Sun, 08 Sep 2013 04:18:33 UTC +00:00], ["dob", Mon, 08 Sep 2003 04:18:33 UTC +00:00], ["name", "User#1"], ["updated_at", Sun, 08 Sep 2013 04:18:33 UTC +00:00]]
60
+  (0.1ms) commit transaction
61
+  (0.1ms) begin transaction
62
+ SQL (0.3ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 20], ["created_at", Sun, 08 Sep 2013 04:18:33 UTC +00:00], ["dob", Wed, 08 Sep 1993 04:18:33 UTC +00:00], ["name", "User#2"], ["updated_at", Sun, 08 Sep 2013 04:18:33 UTC +00:00]]
63
+  (0.1ms) commit transaction
64
+  (0.1ms) begin transaction
65
+ SQL (0.3ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 34], ["created_at", Sun, 08 Sep 2013 04:18:33 UTC +00:00], ["dob", Sat, 08 Sep 1979 04:18:33 UTC +00:00], ["name", "User#3"], ["updated_at", Sun, 08 Sep 2013 04:18:33 UTC +00:00]]
66
+  (0.1ms) commit transaction
67
+  (0.3ms) SELECT AVG("users"."age") AS avg_id FROM "users"
68
+  (0.2ms) SELECT AVG("users"."age") AS avg_id FROM "users" 
69
+ User Load (0.2ms) SELECT "users".* FROM "users"
70
+ User Load (0.3ms) SELECT "users".* FROM "users" 
71
+  (0.1ms) begin transaction
72
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 4]]
73
+  (0.1ms) commit transaction
74
+  (0.1ms) begin transaction
75
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 5]]
76
+  (0.1ms) commit transaction
77
+  (0.1ms) begin transaction
78
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 6]]
79
+  (0.1ms) commit transaction
80
+  (0.1ms) begin transaction
81
+ SQL (0.4ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 10], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Mon, 08 Sep 2003 04:18:36 UTC +00:00], ["name", "User#1"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
82
+  (0.1ms) commit transaction
83
+  (0.1ms) begin transaction
84
+ SQL (0.5ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 20], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Wed, 08 Sep 1993 04:18:36 UTC +00:00], ["name", "User#2"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
85
+  (0.1ms) commit transaction
86
+  (0.1ms) begin transaction
87
+ SQL (0.4ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 34], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Sat, 08 Sep 1979 04:18:36 UTC +00:00], ["name", "User#3"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
88
+  (0.1ms) commit transaction
89
+ User Load (0.3ms) SELECT "users".* FROM "users"
90
+ User Load (0.2ms) SELECT "users".* FROM "users" 
91
+  (0.0ms) begin transaction
92
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 7]]
93
+  (0.0ms) commit transaction
94
+  (0.0ms) begin transaction
95
+ SQL (0.0ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 8]]
96
+  (0.0ms) commit transaction
97
+  (0.0ms) begin transaction
98
+ SQL (0.0ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 9]]
99
+  (0.0ms) commit transaction
100
+  (0.0ms) begin transaction
101
+ SQL (0.2ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 10], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Mon, 08 Sep 2003 04:18:36 UTC +00:00], ["name", "User#1"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
102
+  (0.1ms) commit transaction
103
+  (0.0ms) begin transaction
104
+ SQL (0.2ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 20], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Wed, 08 Sep 1993 04:18:36 UTC +00:00], ["name", "User#2"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
105
+  (0.1ms) commit transaction
106
+  (0.0ms) begin transaction
107
+ SQL (0.2ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 34], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", nil], ["name", "User#3"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
108
+  (0.0ms) commit transaction
109
+ User Load (0.2ms) SELECT "users".* FROM "users" LIMIT 25 OFFSET 0
110
+ User Load (0.1ms) SELECT "users".* FROM "users" 
111
+  (0.0ms) begin transaction
112
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 10]]
113
+  (0.0ms) commit transaction
114
+  (0.0ms) begin transaction
115
+ SQL (0.0ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 11]]
116
+  (0.0ms) commit transaction
117
+  (0.0ms) begin transaction
118
+ SQL (0.0ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 12]]
119
+  (0.0ms) commit transaction
120
+  (0.0ms) begin transaction
121
+ SQL (0.3ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 10], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Mon, 08 Sep 2003 04:18:36 UTC +00:00], ["name", "User#1"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
122
+  (0.0ms) commit transaction
123
+  (0.0ms) begin transaction
124
+ SQL (0.2ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 20], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Wed, 08 Sep 1993 04:18:36 UTC +00:00], ["name", "User#2"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
125
+  (0.0ms) commit transaction
126
+  (0.0ms) begin transaction
127
+ SQL (0.1ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 34], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", nil], ["name", "User#3"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
128
+  (0.0ms) commit transaction
129
+ User Load (0.1ms) SELECT "users".* FROM "users"
130
+ User Load (0.2ms) SELECT "users".* FROM "users" 
131
+  (0.1ms) begin transaction
132
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 13]]
133
+  (0.0ms) commit transaction
134
+  (0.0ms) begin transaction
135
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 14]]
136
+  (0.0ms) commit transaction
137
+  (0.0ms) begin transaction
138
+ SQL (0.0ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 15]]
139
+  (0.0ms) commit transaction
140
+  (0.0ms) begin transaction
141
+ SQL (0.2ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 10], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Mon, 08 Sep 2003 04:18:36 UTC +00:00], ["name", "User#1"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
142
+  (0.1ms) commit transaction
143
+  (0.0ms) begin transaction
144
+ SQL (0.2ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 20], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Wed, 08 Sep 1993 04:18:36 UTC +00:00], ["name", "User#2"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
145
+  (0.0ms) commit transaction
146
+  (0.0ms) begin transaction
147
+ SQL (0.2ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 34], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", nil], ["name", "User#3"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
148
+  (0.0ms) commit transaction
149
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE (("users"."dob" >= '1992-09-08 04:18:36.000000' AND "users"."dob" <= '2013-10-08 04:18:36.000000')) LIMIT 25 OFFSET 0
150
+ User Load (0.2ms) SELECT "users".* FROM "users" 
151
+  (0.1ms) begin transaction
152
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 16]]
153
+  (0.1ms) commit transaction
154
+  (0.1ms) begin transaction
155
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 17]]
156
+  (0.1ms) commit transaction
157
+  (0.1ms) begin transaction
158
+ SQL (0.1ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 18]]
159
+  (0.1ms) commit transaction
160
+  (0.1ms) begin transaction
161
+ SQL (0.6ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 10], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Mon, 08 Sep 2003 04:18:36 UTC +00:00], ["name", "User#1"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
162
+  (0.1ms) commit transaction
163
+  (0.1ms) begin transaction
164
+ SQL (0.4ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 20], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", Wed, 08 Sep 1993 04:18:36 UTC +00:00], ["name", "User#2"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
165
+  (0.1ms) commit transaction
166
+  (0.1ms) begin transaction
167
+ SQL (0.3ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 34], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", nil], ["name", "User#3"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
168
+  (0.1ms) commit transaction
169
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."age" = 34 LIMIT 25 OFFSET 0
170
+  (0.1ms) begin transaction
171
+ SQL (0.5ms) INSERT INTO "users" ("age", "created_at", "dob", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["age", 30], ["created_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00], ["dob", nil], ["name", "Jitu"], ["updated_at", Sun, 08 Sep 2013 04:18:36 UTC +00:00]]
172
+  (0.1ms) commit transaction
173
+  (0.1ms) begin transaction
174
+ SQL (0.2ms) INSERT INTO "readerships" ("book_id", "user_id") VALUES (?, ?) [["book_id", nil], ["user_id", 22]]
175
+  (0.1ms) commit transaction
176
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 22 LIMIT 1
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class ReportMailerTest < ActionMailer::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_report
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-07 00:00:00.000000000 Z
12
+ date: 2013-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -118,17 +118,17 @@ dependencies:
118
118
  requirement: !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
- - - ! '>='
121
+ - - ~>
122
122
  - !ruby/object:Gem::Version
123
- version: '0'
123
+ version: 1.0.0.rc2
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
- - - ! '>='
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 1.0.0.rc2
132
132
  - !ruby/object:Gem::Dependency
133
133
  name: awesome_print
134
134
  requirement: !ruby/object:Gem::Requirement
@@ -249,15 +249,21 @@ executables: []
249
249
  extensions: []
250
250
  extra_rdoc_files: []
251
251
  files:
252
+ - app/mailers/report_mailer.rb
252
253
  - app/helpers/query_report_helper.rb
253
254
  - app/helpers/query_report_filter_helper.rb
254
255
  - app/helpers/query_report_link_helper.rb
256
+ - app/views/report_mailer/send_report.html.erb
255
257
  - app/views/query_report/_charts.html.erb
256
258
  - app/views/query_report/_search.html.erb
259
+ - app/views/query_report/list.js.erb
260
+ - app/views/query_report/_list.html.erb
257
261
  - app/views/query_report/_links.html.erb
258
262
  - app/views/query_report/list.html.erb
259
263
  - app/views/query_report/_records.html.erb
264
+ - app/views/query_report/_record_footer.html.erb
260
265
  - app/views/query_report/_chart.html.erb
266
+ - app/views/query_report/_content.html.erb
261
267
  - config/routes.rb
262
268
  - config/locales/query_report.yml
263
269
  - db/schema.rb
@@ -283,6 +289,7 @@ files:
283
289
  - MIT-LICENSE
284
290
  - Rakefile
285
291
  - README.md
292
+ - test/functional/report_mailer_test.rb
286
293
  - test/test_helper.rb
287
294
  - test/dummy/config/environment.rb
288
295
  - test/dummy/config/database.yml
@@ -409,6 +416,7 @@ signing_key:
409
416
  specification_version: 3
410
417
  summary: Structure you reports
411
418
  test_files:
419
+ - test/functional/report_mailer_test.rb
412
420
  - test/test_helper.rb
413
421
  - test/dummy/config/environment.rb
414
422
  - test/dummy/config/database.yml