user_impersonate2 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1 -7
  3. data/app/controllers/user_impersonate/impersonate_controller.rb +1 -1
  4. data/lib/user_impersonate/version.rb +1 -1
  5. data/test/dummy-rails4/db/development.sqlite3 +0 -0
  6. data/test/dummy-rails4/db/test.sqlite3 +0 -0
  7. data/test/dummy-rails4/log/development.log +18 -0
  8. data/test/dummy-rails4/log/test.log +985 -0
  9. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/0cc1c92437f1c4975bb5abbbd424a275 +0 -0
  10. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  11. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/1c9faaf28d05409b88ad3113374d613c +0 -0
  12. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/2625847957ecb8614efc9b58b07cabdf +0 -0
  13. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  14. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  15. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/35f33ae400a6b0b5bf527436a68133b5 +0 -0
  16. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/40fc2f3d2a468a00e463f1d313cb1683 +0 -0
  17. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/5f1c168e97e274509aa4673eab0d86f6 +0 -0
  18. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/681d1010f98d5ed273e67645c7cb454d +0 -0
  19. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/70f1b4a1d50faffb0516da04ecf73bd0 +0 -0
  20. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/7411b44628aea038332f13f5ed73e073 +0 -0
  21. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/7f14251885cab31b58c878119cbdc199 +0 -0
  22. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/8483b329d12e7e986bc5a2204bbcb4f8 +0 -0
  23. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/8ff157af159f38d424ce1367e29760a2 +0 -0
  24. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/b6f020b01a84691088a0c459a18f9c7e +0 -0
  25. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/b878faf942403e313a5b103e5d80488e +0 -0
  26. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/bbbc0acfefa636c66069f61f74e4f175 +0 -0
  27. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/c87b21c4aa04f8dcc3ae32da29c99d97 +0 -0
  28. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  29. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/d0cde4ef34755468270bb49c4a3689f1 +0 -0
  30. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  31. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/edbef6e0d0a4742346cf479f2c522eb0 +0 -0
  32. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  33. data/test/functional/impersonate_controller_test.rb +9 -0
  34. metadata +238 -198
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6160d184c57eb10f8ab4162e7a1d3642eb7b98d4
4
+ data.tar.gz: 15923aab3c1cdaacb2a1c2a02c174dc8b95668db
5
+ SHA512:
6
+ metadata.gz: 18780646cf172a7966c9c46ee1d1aa9ca2f48b0f92cad18fb5900649efe4e0b33a14bf149ea0d14e529d7d062b656d9e8a15adf55a3626af63064e48aa9c80fb
7
+ data.tar.gz: 3b55707f28017308256d1e4a1e0b7a264f53c88af817d197553be84a94a705da26837894520b4ff9f0971fb4f4aff71baba5001fc75b56ada98cc330bfd34635
data/README.md CHANGED
@@ -30,9 +30,7 @@ etc.)
30
30
  ## Example usage
31
31
 
32
32
  When you are impersonating a user you see what they see with a header section
33
- above:
34
-
35
- ![](https://img.skitch.com/20120919-c8382rgdcub7gsh2p82k8reng3.png)
33
+ above. By default, this will be red.
36
34
 
37
35
  ## Installation
38
36
 
@@ -125,10 +123,6 @@ rake db:migrate db:test:prepare
125
123
  You can override the bright red header by creating a `app/views/user_impersonate/_header.html.erb`
126
124
  file (or whatever template system you like).
127
125
 
128
- For example, the Engine Yard Cloud uses a header that looks like:
129
-
130
- ![](https://img.skitch.com/20120915-mk8mnpdsu5nuym3bxs678qf1a8.png)
131
-
132
126
  The `app/views/user_impersonate/_header.html.haml` HAML partial for this header
133
127
  would be:
134
128
 
@@ -115,7 +115,7 @@ module UserImpersonate
115
115
  end
116
116
 
117
117
  def user_table
118
- user_class_name.tableize.tr('/', '_')
118
+ user_class.table_name
119
119
  end
120
120
 
121
121
  def user_id_column
@@ -1,4 +1,4 @@
1
1
  module UserImpersonate
2
- VERSION = '0.10.1'
2
+ VERSION = "0.10.2"
3
3
  end
4
4
 
Binary file
@@ -0,0 +1,18 @@
1
+  (522.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
2
+  (389.7ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
3
+  (545.2ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
4
+  (400.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
5
+  (266.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6
+  (0.3ms) SELECT version FROM "schema_migrations"
7
+  (277.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
8
+  (445.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
9
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
10
+  (404.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
11
+  (384.0ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
12
+  (467.9ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
13
+  (287.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
14
+  (355.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
15
+  (0.2ms) SELECT version FROM "schema_migrations"
16
+  (277.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
17
+  (469.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
18
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -0,0 +1,985 @@
1
+  (0.6ms) begin transaction
2
+ ---------------------------------------------------------
3
+ UserImpersonate::DeviseHelpersTest: test_user_class_other
4
+ ---------------------------------------------------------
5
+  (0.2ms) rollback transaction
6
+  (0.3ms) begin transaction
7
+ --------------------------------------------------------
8
+ UserImpersonate::DeviseHelpersTest: test_user_finder_nil
9
+ --------------------------------------------------------
10
+  (0.1ms) rollback transaction
11
+  (0.1ms) begin transaction
12
+ ------------------------------------------------------------------
13
+ UserImpersonate::DeviseHelpersTest: test_user_finder_not_specified
14
+ ------------------------------------------------------------------
15
+  (0.1ms) rollback transaction
16
+  (0.1ms) begin transaction
17
+ ----------------------------------------------------------
18
+ UserImpersonate::DeviseHelpersTest: test_user_finder_other
19
+ ----------------------------------------------------------
20
+  (0.2ms) rollback transaction
21
+  (0.3ms) begin transaction
22
+ -------------------------------------------------------------------------------------------------
23
+ UserImpersonate::ImpersonateControllerTest: test_configuration_to_use_a_different_model_than_User
24
+ -------------------------------------------------------------------------------------------------
25
+ Processing by UserImpersonate::ImpersonateController#index as HTML
26
+ Redirected to
27
+ Redirected to http://test.host/
28
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
29
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
30
+  (0.2ms) rollback transaction
31
+  (0.1ms) begin transaction
32
+ --------------------------------------------------------------------------------------
33
+ UserImpersonate::ImpersonateControllerTest: test_configuration_uses_default_model_User
34
+ --------------------------------------------------------------------------------------
35
+ Processing by UserImpersonate::ImpersonateController#index as HTML
36
+ Redirected to
37
+ Redirected to http://test.host/
38
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
39
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
40
+  (0.2ms) rollback transaction
41
+  (0.1ms) begin transaction
42
+ -------------------------------------------------------------------------------------
43
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
44
+ -------------------------------------------------------------------------------------
45
+ Processing by UserImpersonate::ImpersonateController#create as HTML
46
+ Completed 401 Unauthorized in 26ms
47
+  (0.2ms) rollback transaction
48
+  (0.1ms) begin transaction
49
+ ------------------------------------------------------------------------------------------
50
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
51
+ ------------------------------------------------------------------------------------------
52
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
53
+ Redirected to http://test.host/
54
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
55
+  (0.1ms) rollback transaction
56
+  (0.1ms) begin transaction
57
+ ------------------------------------------------------------------------------------
58
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
59
+ ------------------------------------------------------------------------------------
60
+ Processing by UserImpersonate::ImpersonateController#index as HTML
61
+ Completed 401 Unauthorized in 3ms
62
+  (0.1ms) rollback transaction
63
+  (0.1ms) begin transaction
64
+ ------------------------------------------------------------------
65
+ UserImpersonate::ImpersonateControllerTest: test_staff_class_other
66
+ ------------------------------------------------------------------
67
+  (0.1ms) rollback transaction
68
+  (0.1ms) begin transaction
69
+ -----------------------------------------------------------------
70
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_nil
71
+ -----------------------------------------------------------------
72
+  (0.1ms) rollback transaction
73
+  (0.1ms) begin transaction
74
+ ---------------------------------------------------------------------------
75
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_not_specified
76
+ ---------------------------------------------------------------------------
77
+  (0.1ms) rollback transaction
78
+  (0.1ms) begin transaction
79
+ -------------------------------------------------------------------
80
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_other
81
+ -------------------------------------------------------------------
82
+  (0.1ms) rollback transaction
83
+  (0.2ms) begin transaction
84
+ -------------------------------
85
+ UserImpersonateTest: test_truth
86
+ -------------------------------
87
+  (0.2ms) rollback transaction
88
+  (0.7ms) begin transaction
89
+ ---------------------------------------------------------
90
+ UserImpersonate::DeviseHelpersTest: test_user_class_other
91
+ ---------------------------------------------------------
92
+  (0.2ms) rollback transaction
93
+  (0.3ms) begin transaction
94
+ --------------------------------------------------------
95
+ UserImpersonate::DeviseHelpersTest: test_user_finder_nil
96
+ --------------------------------------------------------
97
+  (0.1ms) rollback transaction
98
+  (0.1ms) begin transaction
99
+ ------------------------------------------------------------------
100
+ UserImpersonate::DeviseHelpersTest: test_user_finder_not_specified
101
+ ------------------------------------------------------------------
102
+  (0.1ms) rollback transaction
103
+  (0.1ms) begin transaction
104
+ ----------------------------------------------------------
105
+ UserImpersonate::DeviseHelpersTest: test_user_finder_other
106
+ ----------------------------------------------------------
107
+  (0.1ms) rollback transaction
108
+  (0.2ms) begin transaction
109
+ -------------------------------------------------------------------------------------------------
110
+ UserImpersonate::ImpersonateControllerTest: test_configuration_to_use_a_different_model_than_User
111
+ -------------------------------------------------------------------------------------------------
112
+ Processing by UserImpersonate::ImpersonateController#index as HTML
113
+ Redirected to
114
+ Redirected to http://test.host/
115
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
116
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
117
+  (0.2ms) rollback transaction
118
+  (0.1ms) begin transaction
119
+ --------------------------------------------------------------------------------------
120
+ UserImpersonate::ImpersonateControllerTest: test_configuration_uses_default_model_User
121
+ --------------------------------------------------------------------------------------
122
+ Processing by UserImpersonate::ImpersonateController#index as HTML
123
+ Redirected to
124
+ Redirected to http://test.host/
125
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
126
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
127
+  (0.2ms) rollback transaction
128
+  (0.1ms) begin transaction
129
+ -------------------------------------------------------------------------------------
130
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
131
+ -------------------------------------------------------------------------------------
132
+ Processing by UserImpersonate::ImpersonateController#create as HTML
133
+ Completed 401 Unauthorized in 14ms
134
+  (0.2ms) rollback transaction
135
+  (0.1ms) begin transaction
136
+ ------------------------------------------------------------------------------------------
137
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
138
+ ------------------------------------------------------------------------------------------
139
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
140
+ Redirected to http://test.host/
141
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
142
+  (0.1ms) rollback transaction
143
+  (0.1ms) begin transaction
144
+ ------------------------------------------------------------------------------------
145
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
146
+ ------------------------------------------------------------------------------------
147
+ Processing by UserImpersonate::ImpersonateController#index as HTML
148
+ Completed 401 Unauthorized in 1ms
149
+  (0.1ms) rollback transaction
150
+  (0.1ms) begin transaction
151
+ ------------------------------------------------------------------
152
+ UserImpersonate::ImpersonateControllerTest: test_staff_class_other
153
+ ------------------------------------------------------------------
154
+  (0.1ms) rollback transaction
155
+  (0.1ms) begin transaction
156
+ -----------------------------------------------------------------
157
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_nil
158
+ -----------------------------------------------------------------
159
+  (0.1ms) rollback transaction
160
+  (0.1ms) begin transaction
161
+ ---------------------------------------------------------------------------
162
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_not_specified
163
+ ---------------------------------------------------------------------------
164
+  (0.1ms) rollback transaction
165
+  (0.1ms) begin transaction
166
+ -------------------------------------------------------------------
167
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_other
168
+ -------------------------------------------------------------------
169
+  (0.1ms) rollback transaction
170
+  (0.2ms) begin transaction
171
+ -------------------------------
172
+ UserImpersonateTest: test_truth
173
+ -------------------------------
174
+  (0.2ms) rollback transaction
175
+  (357.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
176
+  (433.3ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
177
+  (404.5ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
178
+  (598.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
179
+  (356.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
180
+  (0.3ms) SELECT version FROM "schema_migrations"
181
+  (655.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
182
+  (4483.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
183
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
184
+  (1.2ms) begin transaction
185
+ ---------------------------------------------------------
186
+ UserImpersonate::DeviseHelpersTest: test_user_class_other
187
+ ---------------------------------------------------------
188
+  (0.2ms) SAVEPOINT active_record_1
189
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
190
+ Binary data inserted for `string` type on column `encrypted_password`
191
+ SQL (23.8ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:43:53 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$OQcDkl7FblDNkJWdRX2xiedgcMxkCCJGWR.EsdAeLPD0sjB71EjDy"], ["updated_at", Wed, 29 Jul 2015 05:43:53 UTC +00:00]]
192
+  (0.2ms) RELEASE SAVEPOINT active_record_1
193
+  (0.4ms) rollback transaction
194
+  (0.2ms) begin transaction
195
+ --------------------------------------------------------
196
+ UserImpersonate::DeviseHelpersTest: test_user_finder_nil
197
+ --------------------------------------------------------
198
+  (0.2ms) SAVEPOINT active_record_1
199
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
200
+ Binary data inserted for `string` type on column `encrypted_password`
201
+ SQL (4.0ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:43:53 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$H5lNAQN.x0Ig4HCNoPGqS.d0ZWzrCN6US16ropp/A1FKgBezWW73C"], ["updated_at", Wed, 29 Jul 2015 05:43:53 UTC +00:00]]
202
+  (0.1ms) RELEASE SAVEPOINT active_record_1
203
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
204
+  (0.3ms) rollback transaction
205
+  (0.1ms) begin transaction
206
+ ------------------------------------------------------------------
207
+ UserImpersonate::DeviseHelpersTest: test_user_finder_not_specified
208
+ ------------------------------------------------------------------
209
+  (0.2ms) SAVEPOINT active_record_1
210
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
211
+ Binary data inserted for `string` type on column `encrypted_password`
212
+ SQL (8.1ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:43:53 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$EKYcJg2aojTd7UfukyKq1uDC7uVNWo.GQ67.xEGKG8pmAM/OedHwa"], ["updated_at", Wed, 29 Jul 2015 05:43:53 UTC +00:00]]
213
+  (0.1ms) RELEASE SAVEPOINT active_record_1
214
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
215
+  (0.3ms) rollback transaction
216
+  (0.1ms) begin transaction
217
+ ----------------------------------------------------------
218
+ UserImpersonate::DeviseHelpersTest: test_user_finder_other
219
+ ----------------------------------------------------------
220
+  (0.2ms) SAVEPOINT active_record_1
221
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
222
+ Binary data inserted for `string` type on column `encrypted_password`
223
+ SQL (1.1ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:43:53 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$PYs2rfVhmJVHpxWA3eSK1.D3RlvrL6KT/Njw603JB.j/U23jZoCgq"], ["updated_at", Wed, 29 Jul 2015 05:43:53 UTC +00:00]]
224
+  (0.1ms) RELEASE SAVEPOINT active_record_1
225
+  (0.2ms) rollback transaction
226
+  (0.1ms) begin transaction
227
+ -------------------------------------------------------------------------------------------------
228
+ UserImpersonate::ImpersonateControllerTest: test_configuration_to_use_a_different_model_than_User
229
+ -------------------------------------------------------------------------------------------------
230
+ Processing by UserImpersonate::ImpersonateController#index as HTML
231
+ Redirected to
232
+ Redirected to http://test.host/
233
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
234
+ Completed 302 Found in 11ms (ActiveRecord: 0.0ms)
235
+  (0.2ms) rollback transaction
236
+  (0.1ms) begin transaction
237
+ --------------------------------------------------------------------------------------
238
+ UserImpersonate::ImpersonateControllerTest: test_configuration_uses_default_model_User
239
+ --------------------------------------------------------------------------------------
240
+ Processing by UserImpersonate::ImpersonateController#index as HTML
241
+ Redirected to
242
+ Redirected to http://test.host/
243
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
244
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
245
+  (0.2ms) rollback transaction
246
+  (0.1ms) begin transaction
247
+ -------------------------------------------------------------------------------------
248
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
249
+ -------------------------------------------------------------------------------------
250
+ Processing by UserImpersonate::ImpersonateController#create as HTML
251
+ Completed 401 Unauthorized in 14ms
252
+  (0.2ms) rollback transaction
253
+  (0.1ms) begin transaction
254
+ ------------------------------------------------------------------------------------------
255
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
256
+ ------------------------------------------------------------------------------------------
257
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
258
+ Redirected to http://test.host/
259
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
260
+  (0.2ms) rollback transaction
261
+  (0.1ms) begin transaction
262
+ ------------------------------------------------------------------------------------
263
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
264
+ ------------------------------------------------------------------------------------
265
+ Processing by UserImpersonate::ImpersonateController#index as HTML
266
+ Completed 401 Unauthorized in 1ms
267
+  (0.2ms) rollback transaction
268
+  (0.1ms) begin transaction
269
+ ------------------------------------------------------------------
270
+ UserImpersonate::ImpersonateControllerTest: test_staff_class_other
271
+ ------------------------------------------------------------------
272
+  (0.1ms) SAVEPOINT active_record_1
273
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
274
+ Binary data inserted for `string` type on column `encrypted_password`
275
+ SQL (1.1ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:43:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$i638UdmeKWdpVRkfN8frT.Ah08ZHfgVEt2fdene/ByRh0PSfl59dS"], ["updated_at", Wed, 29 Jul 2015 05:43:54 UTC +00:00]]
276
+  (0.1ms) RELEASE SAVEPOINT active_record_1
277
+  (0.3ms) rollback transaction
278
+  (0.1ms) begin transaction
279
+ -----------------------------------------------------------------
280
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_nil
281
+ -----------------------------------------------------------------
282
+  (0.1ms) SAVEPOINT active_record_1
283
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
284
+ Binary data inserted for `string` type on column `encrypted_password`
285
+ SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:43:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$LU5egrgxS8w5OoYxG3mwu.fgN6l1BdMrIUBjQoVc5aa6USh.UYoEO"], ["updated_at", Wed, 29 Jul 2015 05:43:54 UTC +00:00]]
286
+  (0.1ms) RELEASE SAVEPOINT active_record_1
287
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
288
+  (0.4ms) rollback transaction
289
+  (0.2ms) begin transaction
290
+ ---------------------------------------------------------------------------
291
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_not_specified
292
+ ---------------------------------------------------------------------------
293
+  (0.1ms) SAVEPOINT active_record_1
294
+ User Exists (0.4ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
295
+ Binary data inserted for `string` type on column `encrypted_password`
296
+ SQL (5.3ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:43:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$inWCTdafRqRfbLChEWq0yerjWXBn1Y/4U1JTnxsmtiigjM7qoZw9y"], ["updated_at", Wed, 29 Jul 2015 05:43:54 UTC +00:00]]
297
+  (0.1ms) RELEASE SAVEPOINT active_record_1
298
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
299
+  (0.3ms) rollback transaction
300
+  (0.1ms) begin transaction
301
+ -------------------------------------------------------------------
302
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_other
303
+ -------------------------------------------------------------------
304
+  (0.1ms) SAVEPOINT active_record_1
305
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
306
+ Binary data inserted for `string` type on column `encrypted_password`
307
+ SQL (5.2ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:43:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$J6GMCcEqzCmJ0i7mVdcxleJ5OVZlVsHIW1IUKYJKtx9S5TstwdxM2"], ["updated_at", Wed, 29 Jul 2015 05:43:54 UTC +00:00]]
308
+  (0.1ms) RELEASE SAVEPOINT active_record_1
309
+  (0.3ms) rollback transaction
310
+  (0.2ms) begin transaction
311
+ -------------------------------
312
+ UserImpersonateTest: test_truth
313
+ -------------------------------
314
+  (0.2ms) rollback transaction
315
+  (894.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
316
+  (705.9ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
317
+  (833.2ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
318
+  (645.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
319
+  (743.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
320
+  (0.2ms) SELECT version FROM "schema_migrations"
321
+  (844.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
322
+  (369.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
323
+  (0.8ms) begin transaction
324
+  (0.1ms) commit transaction
325
+  (0.1ms) begin transaction
326
+  (0.2ms) SAVEPOINT active_record_1
327
+ Fixture Delete (0.6ms) DELETE FROM "users"
328
+ Fixture Insert (0.6ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 05:44:22', '2015-07-29 05:44:22')
329
+ Fixture Insert (0.2ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 05:44:22', '2015-07-29 05:44:22')
330
+  (0.1ms) RELEASE SAVEPOINT active_record_1
331
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
332
+ Started GET "/users/sign_in" for 127.0.0.1 at 2015-07-28 22:44:22 -0700
333
+ Processing by Devise::SessionsController#new as HTML
334
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (2.8ms)
335
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (1063.0ms)
336
+ Completed 200 OK in 2443ms (Views: 2317.4ms | ActiveRecord: 0.0ms)
337
+ Started POST "/users/sign_in" for 127.0.0.1 at 2015-07-28 22:44:25 -0700
338
+ Processing by Devise::SessionsController#create as HTML
339
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
340
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
341
+ SQL (2.8ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 29 Jul 2015 05:44:25 UTC +00:00], ["current_sign_in_at", Wed, 29 Jul 2015 05:44:25 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 29 Jul 2015 05:44:25 UTC +00:00]]
342
+ Redirected to http://www.example.com/
343
+ Completed 302 Found in 497ms (ActiveRecord: 3.2ms)
344
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:44:25 -0700
345
+ Processing by HomeController#index as HTML
346
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
347
+ Rendered home/index.html.erb within layouts/application (8.6ms)
348
+ Completed 200 OK in 23ms (Views: 21.5ms | ActiveRecord: 0.4ms)
349
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:44:25 -0700
350
+ Processing by HomeController#index as HTML
351
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
352
+ Rendered home/index.html.erb within layouts/application (2.5ms)
353
+ Completed 200 OK in 9ms (Views: 8.6ms | ActiveRecord: 0.3ms)
354
+ Started GET "/impersonate" for 127.0.0.1 at 2015-07-28 22:44:25 -0700
355
+ Processing by UserImpersonate::ImpersonateController#index as HTML
356
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
357
+ Redirected to
358
+ Redirected to http://www.example.com/
359
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
360
+ Completed 302 Found in 15ms (ActiveRecord: 0.4ms)
361
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:44:25 -0700
362
+ Processing by HomeController#index as HTML
363
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
364
+ Rendered home/index.html.erb within layouts/application (12.6ms)
365
+ Completed 200 OK in 17ms (Views: 14.1ms | ActiveRecord: 0.3ms)
366
+  (0.4ms) rollback transaction
367
+  (0.2ms) begin transaction
368
+  (0.1ms) commit transaction
369
+  (0.1ms) begin transaction
370
+  (0.2ms) SAVEPOINT active_record_1
371
+ Fixture Delete (5.2ms) DELETE FROM "users"
372
+ Fixture Insert (0.5ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 05:44:25', '2015-07-29 05:44:25')
373
+ Fixture Insert (0.3ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 05:44:25', '2015-07-29 05:44:25')
374
+  (0.1ms) RELEASE SAVEPOINT active_record_1
375
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
376
+ Started GET "/users/sign_in" for 127.0.0.1 at 2015-07-28 22:44:25 -0700
377
+ Processing by Devise::SessionsController#new as HTML
378
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.8ms)
379
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (7.7ms)
380
+ Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.0ms)
381
+ Started POST "/users/sign_in" for 127.0.0.1 at 2015-07-28 22:44:25 -0700
382
+ Processing by Devise::SessionsController#create as HTML
383
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
384
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
385
+ SQL (0.7ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 29 Jul 2015 05:44:26 UTC +00:00], ["current_sign_in_at", Wed, 29 Jul 2015 05:44:26 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 29 Jul 2015 05:44:26 UTC +00:00]]
386
+ Redirected to http://www.example.com/
387
+ Completed 302 Found in 163ms (ActiveRecord: 1.1ms)
388
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:44:26 -0700
389
+ Processing by HomeController#index as HTML
390
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
391
+ Rendered home/index.html.erb within layouts/application (3.7ms)
392
+ Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.3ms)
393
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:44:26 -0700
394
+ Processing by HomeController#index as HTML
395
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
396
+ Rendered home/index.html.erb within layouts/application (4.4ms)
397
+ Completed 200 OK in 15ms (Views: 14.0ms | ActiveRecord: 0.6ms)
398
+ Started GET "/impersonate" for 127.0.0.1 at 2015-07-28 22:44:26 -0700
399
+ Processing by UserImpersonate::ImpersonateController#index as HTML
400
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
401
+  (0.3ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
402
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
403
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (9.5ms)
404
+ Completed 200 OK in 60ms (Views: 54.9ms | ActiveRecord: 1.0ms)
405
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2015-07-28 22:44:26 -0700
406
+ Processing by UserImpersonate::ImpersonateController#index as HTML
407
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
408
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
409
+  (0.3ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
410
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
411
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (4.1ms)
412
+ Completed 200 OK in 10ms (Views: 5.4ms | ActiveRecord: 0.9ms)
413
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2015-07-28 22:44:26 -0700
414
+ Processing by UserImpersonate::ImpersonateController#create as HTML
415
+ Parameters: {"user_id"=>"2"}
416
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
417
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
418
+ SQL (0.5ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 29 Jul 2015 05:44:26 UTC +00:00], ["current_sign_in_at", Wed, 29 Jul 2015 05:44:26 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 29 Jul 2015 05:44:26 UTC +00:00]]
419
+ Redirected to http://www.example.com/
420
+ Completed 302 Found in 10ms (ActiveRecord: 1.3ms)
421
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:44:26 -0700
422
+ Processing by HomeController#index as HTML
423
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
424
+ Rendered home/index.html.erb within layouts/application (2.8ms)
425
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
426
+ Rendered user_impersonate/_header.html.erb (3.2ms)
427
+ Completed 200 OK in 15ms (Views: 14.1ms | ActiveRecord: 0.5ms)
428
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2015-07-28 22:44:26 -0700
429
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
430
+ Parameters: {"utf8"=>"✓"}
431
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
432
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
433
+ SQL (0.5ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 29 Jul 2015 05:44:26 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 29 Jul 2015 05:44:26 UTC +00:00]]
434
+ Redirected to http://www.example.com/
435
+ Completed 302 Found in 48ms (ActiveRecord: 1.0ms)
436
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:44:26 -0700
437
+ Processing by HomeController#index as HTML
438
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
439
+ Rendered home/index.html.erb within layouts/application (3.6ms)
440
+ Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.4ms)
441
+  (83.3ms) rollback transaction
442
+  (705.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
443
+  (545.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
444
+  (357.3ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
445
+  (888.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
446
+  (510.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
447
+  (0.4ms) SELECT version FROM "schema_migrations"
448
+  (1156.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
449
+  (768.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
450
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
451
+  (0.8ms) begin transaction
452
+ ---------------------------------------------------------
453
+ UserImpersonate::DeviseHelpersTest: test_user_class_other
454
+ ---------------------------------------------------------
455
+  (0.2ms) SAVEPOINT active_record_1
456
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
457
+ Binary data inserted for `string` type on column `encrypted_password`
458
+ SQL (6.2ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:46:51 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$YMmLTSztXc5lq3KUJao06uLmB5s6TTCaY5oQGyeECnqSPiOT2c2vK"], ["updated_at", Wed, 29 Jul 2015 05:46:51 UTC +00:00]]
459
+  (0.1ms) RELEASE SAVEPOINT active_record_1
460
+  (0.3ms) rollback transaction
461
+  (0.1ms) begin transaction
462
+ --------------------------------------------------------
463
+ UserImpersonate::DeviseHelpersTest: test_user_finder_nil
464
+ --------------------------------------------------------
465
+  (0.2ms) SAVEPOINT active_record_1
466
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
467
+ Binary data inserted for `string` type on column `encrypted_password`
468
+ SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:46:51 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$.XSLaY6wQA5UHYcmqL5IxeIZRIwKtnbUkIB87pbbQFR8t1bZG0MWm"], ["updated_at", Wed, 29 Jul 2015 05:46:51 UTC +00:00]]
469
+  (0.1ms) RELEASE SAVEPOINT active_record_1
470
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
471
+  (0.3ms) rollback transaction
472
+  (0.1ms) begin transaction
473
+ ------------------------------------------------------------------
474
+ UserImpersonate::DeviseHelpersTest: test_user_finder_not_specified
475
+ ------------------------------------------------------------------
476
+  (0.1ms) SAVEPOINT active_record_1
477
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
478
+ Binary data inserted for `string` type on column `encrypted_password`
479
+ SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$2AfQITILPfr4GUfYsAG2oOGA/8t4.10Ap59solMRtQ49/fvqVuIN6"], ["updated_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00]]
480
+  (0.1ms) RELEASE SAVEPOINT active_record_1
481
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
482
+  (0.3ms) rollback transaction
483
+  (0.1ms) begin transaction
484
+ ----------------------------------------------------------
485
+ UserImpersonate::DeviseHelpersTest: test_user_finder_other
486
+ ----------------------------------------------------------
487
+  (0.2ms) SAVEPOINT active_record_1
488
+ User Exists (0.4ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
489
+ Binary data inserted for `string` type on column `encrypted_password`
490
+ SQL (1.3ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$gfcNwjh57Lxb34odSUTV5.9UptGETAsY3H3EoCtTHtg5FA2WHNHtW"], ["updated_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00]]
491
+  (0.1ms) RELEASE SAVEPOINT active_record_1
492
+  (0.4ms) rollback transaction
493
+  (0.2ms) begin transaction
494
+ -------------------------------------------------------------------------------------------------
495
+ UserImpersonate::ImpersonateControllerTest: test_configuration_to_use_a_different_model_than_User
496
+ -------------------------------------------------------------------------------------------------
497
+ Processing by UserImpersonate::ImpersonateController#index as HTML
498
+ Redirected to
499
+ Redirected to http://test.host/
500
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
501
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
502
+  (0.2ms) rollback transaction
503
+  (0.1ms) begin transaction
504
+ --------------------------------------------------------------------------------------
505
+ UserImpersonate::ImpersonateControllerTest: test_configuration_uses_default_model_User
506
+ --------------------------------------------------------------------------------------
507
+ Processing by UserImpersonate::ImpersonateController#index as HTML
508
+ Redirected to
509
+ Redirected to http://test.host/
510
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
511
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
512
+  (0.2ms) rollback transaction
513
+  (0.1ms) begin transaction
514
+ -------------------------------------------------------------------------------------
515
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
516
+ -------------------------------------------------------------------------------------
517
+ Processing by UserImpersonate::ImpersonateController#create as HTML
518
+ Completed 401 Unauthorized in 12ms
519
+  (0.3ms) rollback transaction
520
+  (0.1ms) begin transaction
521
+ ------------------------------------------------------------------------------------------
522
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
523
+ ------------------------------------------------------------------------------------------
524
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
525
+ Redirected to http://test.host/
526
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
527
+  (0.1ms) rollback transaction
528
+  (0.1ms) begin transaction
529
+ ------------------------------------------------------------------------------------
530
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
531
+ ------------------------------------------------------------------------------------
532
+ Processing by UserImpersonate::ImpersonateController#index as HTML
533
+ Completed 401 Unauthorized in 1ms
534
+  (0.2ms) rollback transaction
535
+  (0.1ms) begin transaction
536
+ ------------------------------------------------------------------
537
+ UserImpersonate::ImpersonateControllerTest: test_staff_class_other
538
+ ------------------------------------------------------------------
539
+  (0.1ms) SAVEPOINT active_record_1
540
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
541
+ Binary data inserted for `string` type on column `encrypted_password`
542
+ SQL (1.1ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$oqqcFBtckgshauhJTJU9JesdcseL8WjxsrZtF1GTK4TinFS968LTO"], ["updated_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00]]
543
+  (0.1ms) RELEASE SAVEPOINT active_record_1
544
+  (0.3ms) rollback transaction
545
+  (0.1ms) begin transaction
546
+ -----------------------------------------------------------------
547
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_nil
548
+ -----------------------------------------------------------------
549
+  (0.1ms) SAVEPOINT active_record_1
550
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
551
+ Binary data inserted for `string` type on column `encrypted_password`
552
+ SQL (1.2ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$pjbCo91AURscuGcQLRLIxOcgfc4Hj0pg6WM4xwBn.o8lSvBOynhUe"], ["updated_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00]]
553
+  (0.1ms) RELEASE SAVEPOINT active_record_1
554
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
555
+  (0.3ms) rollback transaction
556
+  (0.1ms) begin transaction
557
+ ---------------------------------------------------------------------------
558
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_not_specified
559
+ ---------------------------------------------------------------------------
560
+  (0.1ms) SAVEPOINT active_record_1
561
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
562
+ Binary data inserted for `string` type on column `encrypted_password`
563
+ SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$iaebCdZ7qfa6nxTfP1a.1OC0Oi0EJgB.sqDY7.J59VZfI3IFkkDHy"], ["updated_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00]]
564
+  (0.1ms) RELEASE SAVEPOINT active_record_1
565
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
566
+  (0.2ms) rollback transaction
567
+  (0.1ms) begin transaction
568
+ -------------------------------------------------------------------
569
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_other
570
+ -------------------------------------------------------------------
571
+  (0.1ms) SAVEPOINT active_record_1
572
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
573
+ Binary data inserted for `string` type on column `encrypted_password`
574
+ SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$GA3ufouMfUtXcvpgOcZ7oOy/POjjaCoJw/rVPUW8egR8hjOShMLk6"], ["updated_at", Wed, 29 Jul 2015 05:46:52 UTC +00:00]]
575
+  (0.1ms) RELEASE SAVEPOINT active_record_1
576
+  (0.2ms) rollback transaction
577
+  (0.1ms) begin transaction
578
+ --------------------------------------------------------------------------------------------
579
+ UserImpersonate::ImpersonateControllerTest: test_user_table_should_return_correct_table_name
580
+ --------------------------------------------------------------------------------------------
581
+  (0.2ms) rollback transaction
582
+  (0.2ms) begin transaction
583
+ -------------------------------
584
+ UserImpersonateTest: test_truth
585
+ -------------------------------
586
+  (0.2ms) rollback transaction
587
+  (634.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
588
+  (777.6ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
589
+  (556.7ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
590
+  (922.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
591
+  (625.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
592
+  (0.3ms) SELECT version FROM "schema_migrations"
593
+  (889.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
594
+  (690.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
595
+  (0.8ms) begin transaction
596
+  (0.1ms) commit transaction
597
+  (0.2ms) begin transaction
598
+  (0.2ms) SAVEPOINT active_record_1
599
+ Fixture Delete (0.7ms) DELETE FROM "users"
600
+ Fixture Insert (0.4ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 05:47:04', '2015-07-29 05:47:04')
601
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 05:47:04', '2015-07-29 05:47:04')
602
+  (0.1ms) RELEASE SAVEPOINT active_record_1
603
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
604
+ Started GET "/users/sign_in" for 127.0.0.1 at 2015-07-28 22:47:04 -0700
605
+ Processing by Devise::SessionsController#new as HTML
606
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (2.5ms)
607
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (115.8ms)
608
+ Completed 200 OK in 461ms (Views: 438.2ms | ActiveRecord: 0.0ms)
609
+ Started POST "/users/sign_in" for 127.0.0.1 at 2015-07-28 22:47:04 -0700
610
+ Processing by Devise::SessionsController#create as HTML
611
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
612
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
613
+ SQL (2.6ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00], ["current_sign_in_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00]]
614
+ Redirected to http://www.example.com/
615
+ Completed 302 Found in 142ms (ActiveRecord: 3.0ms)
616
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
617
+ Processing by HomeController#index as HTML
618
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
619
+ Rendered home/index.html.erb within layouts/application (5.0ms)
620
+ Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.4ms)
621
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
622
+ Processing by HomeController#index as HTML
623
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
624
+ Rendered home/index.html.erb within layouts/application (2.6ms)
625
+ Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.4ms)
626
+ Started GET "/impersonate" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
627
+ Processing by UserImpersonate::ImpersonateController#index as HTML
628
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
629
+ Redirected to
630
+ Redirected to http://www.example.com/
631
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
632
+ Completed 302 Found in 6ms (ActiveRecord: 0.4ms)
633
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
634
+ Processing by HomeController#index as HTML
635
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
636
+ Rendered home/index.html.erb within layouts/application (2.5ms)
637
+ Completed 200 OK in 5ms (Views: 4.2ms | ActiveRecord: 0.3ms)
638
+  (0.3ms) rollback transaction
639
+  (0.1ms) begin transaction
640
+  (0.1ms) commit transaction
641
+  (0.1ms) begin transaction
642
+  (0.1ms) SAVEPOINT active_record_1
643
+ Fixture Delete (0.6ms) DELETE FROM "users"
644
+ Fixture Insert (0.3ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 05:47:05', '2015-07-29 05:47:05')
645
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 05:47:05', '2015-07-29 05:47:05')
646
+  (0.1ms) RELEASE SAVEPOINT active_record_1
647
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
648
+ Started GET "/users/sign_in" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
649
+ Processing by Devise::SessionsController#new as HTML
650
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.5ms)
651
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (4.4ms)
652
+ Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.0ms)
653
+ Started POST "/users/sign_in" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
654
+ Processing by Devise::SessionsController#create as HTML
655
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
656
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
657
+ SQL (60.2ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00], ["current_sign_in_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00]]
658
+ Redirected to http://www.example.com/
659
+ Completed 302 Found in 185ms (ActiveRecord: 60.5ms)
660
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
661
+ Processing by HomeController#index as HTML
662
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
663
+ Rendered home/index.html.erb within layouts/application (8.9ms)
664
+ Completed 200 OK in 15ms (Views: 14.8ms | ActiveRecord: 0.3ms)
665
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
666
+ Processing by HomeController#index as HTML
667
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
668
+ Rendered home/index.html.erb within layouts/application (6.8ms)
669
+ Completed 200 OK in 9ms (Views: 8.1ms | ActiveRecord: 0.3ms)
670
+ Started GET "/impersonate" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
671
+ Processing by UserImpersonate::ImpersonateController#index as HTML
672
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
673
+  (0.3ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
674
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
675
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (6.8ms)
676
+ Completed 200 OK in 31ms (Views: 26.1ms | ActiveRecord: 0.8ms)
677
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
678
+ Processing by UserImpersonate::ImpersonateController#index as HTML
679
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
680
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
681
+  (0.3ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
682
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
683
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (3.4ms)
684
+ Completed 200 OK in 9ms (Views: 4.6ms | ActiveRecord: 0.9ms)
685
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
686
+ Processing by UserImpersonate::ImpersonateController#create as HTML
687
+ Parameters: {"user_id"=>"2"}
688
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
689
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
690
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00], ["current_sign_in_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00]]
691
+ Redirected to http://www.example.com/
692
+ Completed 302 Found in 7ms (ActiveRecord: 1.1ms)
693
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
694
+ Processing by HomeController#index as HTML
695
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
696
+ Rendered home/index.html.erb within layouts/application (2.3ms)
697
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
698
+ Rendered user_impersonate/_header.html.erb (2.8ms)
699
+ Completed 200 OK in 9ms (Views: 8.7ms | ActiveRecord: 0.4ms)
700
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
701
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
702
+ Parameters: {"utf8"=>"✓"}
703
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
704
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
705
+ SQL (0.4ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 29 Jul 2015 05:47:05 UTC +00:00]]
706
+ Redirected to http://www.example.com/
707
+ Completed 302 Found in 8ms (ActiveRecord: 0.9ms)
708
+ Started GET "/" for 127.0.0.1 at 2015-07-28 22:47:05 -0700
709
+ Processing by HomeController#index as HTML
710
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
711
+ Rendered home/index.html.erb within layouts/application (2.6ms)
712
+ Completed 200 OK in 4ms (Views: 3.9ms | ActiveRecord: 0.3ms)
713
+  (0.5ms) rollback transaction
714
+  (574.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
715
+  (277.7ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
716
+  (433.3ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
717
+  (717.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
718
+  (561.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
719
+  (0.3ms) SELECT version FROM "schema_migrations"
720
+  (683.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
721
+  (731.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
722
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
723
+  (0.9ms) begin transaction
724
+ ---------------------------------------------------------
725
+ UserImpersonate::DeviseHelpersTest: test_user_class_other
726
+ ---------------------------------------------------------
727
+  (0.2ms) SAVEPOINT active_record_1
728
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
729
+ Binary data inserted for `string` type on column `encrypted_password`
730
+ SQL (7.2ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$uGfzYL4G7nQsXitdAxyG4.BCJobADZ.FIB5EXg2WupinnkNuiRw1."], ["updated_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00]]
731
+  (0.1ms) RELEASE SAVEPOINT active_record_1
732
+  (0.3ms) rollback transaction
733
+  (0.2ms) begin transaction
734
+ --------------------------------------------------------
735
+ UserImpersonate::DeviseHelpersTest: test_user_finder_nil
736
+ --------------------------------------------------------
737
+  (0.2ms) SAVEPOINT active_record_1
738
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
739
+ Binary data inserted for `string` type on column `encrypted_password`
740
+ SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$b6ZuttLL9KTi8hJhtbay5eIMPlVU/FksA9Gv9d6sWfuSlo9ujYI5O"], ["updated_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00]]
741
+  (0.1ms) RELEASE SAVEPOINT active_record_1
742
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
743
+  (0.4ms) rollback transaction
744
+  (0.1ms) begin transaction
745
+ ------------------------------------------------------------------
746
+ UserImpersonate::DeviseHelpersTest: test_user_finder_not_specified
747
+ ------------------------------------------------------------------
748
+  (0.2ms) SAVEPOINT active_record_1
749
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
750
+ Binary data inserted for `string` type on column `encrypted_password`
751
+ SQL (1.1ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$20.8DlEcbm2XGXKB6ZifJOVKoE8Gxa6OWhBnBqPr80kSdlc9rVmcm"], ["updated_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00]]
752
+  (0.1ms) RELEASE SAVEPOINT active_record_1
753
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
754
+  (0.3ms) rollback transaction
755
+  (0.1ms) begin transaction
756
+ ----------------------------------------------------------
757
+ UserImpersonate::DeviseHelpersTest: test_user_finder_other
758
+ ----------------------------------------------------------
759
+  (0.2ms) SAVEPOINT active_record_1
760
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
761
+ Binary data inserted for `string` type on column `encrypted_password`
762
+ SQL (1.2ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$N.uJK3FWCc6Hrg7IoOp8KeWsp2Y0OqiA0jMlXg1GwBxsMiCo5jjVy"], ["updated_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00]]
763
+  (0.1ms) RELEASE SAVEPOINT active_record_1
764
+  (0.3ms) rollback transaction
765
+  (0.2ms) begin transaction
766
+ -------------------------------------------------------------------------------------------------
767
+ UserImpersonate::ImpersonateControllerTest: test_configuration_to_use_a_different_model_than_User
768
+ -------------------------------------------------------------------------------------------------
769
+ Processing by UserImpersonate::ImpersonateController#index as HTML
770
+ Redirected to
771
+ Redirected to http://test.host/
772
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
773
+ Completed 302 Found in 6ms (ActiveRecord: 0.0ms)
774
+  (0.2ms) rollback transaction
775
+  (0.1ms) begin transaction
776
+ --------------------------------------------------------------------------------------
777
+ UserImpersonate::ImpersonateControllerTest: test_configuration_uses_default_model_User
778
+ --------------------------------------------------------------------------------------
779
+ Processing by UserImpersonate::ImpersonateController#index as HTML
780
+ Redirected to
781
+ Redirected to http://test.host/
782
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
783
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
784
+  (0.2ms) rollback transaction
785
+  (0.1ms) begin transaction
786
+ -------------------------------------------------------------------------------------
787
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
788
+ -------------------------------------------------------------------------------------
789
+ Processing by UserImpersonate::ImpersonateController#create as HTML
790
+ Completed 401 Unauthorized in 18ms
791
+  (0.2ms) rollback transaction
792
+  (0.1ms) begin transaction
793
+ ------------------------------------------------------------------------------------------
794
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
795
+ ------------------------------------------------------------------------------------------
796
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
797
+ Redirected to http://test.host/
798
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
799
+  (0.1ms) rollback transaction
800
+  (0.1ms) begin transaction
801
+ ------------------------------------------------------------------------------------
802
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
803
+ ------------------------------------------------------------------------------------
804
+ Processing by UserImpersonate::ImpersonateController#index as HTML
805
+ Completed 401 Unauthorized in 1ms
806
+  (0.1ms) rollback transaction
807
+  (0.1ms) begin transaction
808
+ ------------------------------------------------------------------
809
+ UserImpersonate::ImpersonateControllerTest: test_staff_class_other
810
+ ------------------------------------------------------------------
811
+  (0.1ms) SAVEPOINT active_record_1
812
+ User Exists (3.6ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
813
+ Binary data inserted for `string` type on column `encrypted_password`
814
+ SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$3tGun4Y4RBikjb7mEHh1nOOS8.nYSoB8Zb8kYSpS.z9DuawWIefGu"], ["updated_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00]]
815
+  (0.1ms) RELEASE SAVEPOINT active_record_1
816
+  (0.3ms) rollback transaction
817
+  (0.1ms) begin transaction
818
+ -----------------------------------------------------------------
819
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_nil
820
+ -----------------------------------------------------------------
821
+  (0.1ms) SAVEPOINT active_record_1
822
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
823
+ Binary data inserted for `string` type on column `encrypted_password`
824
+ SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$NK4udUAE4iF1l.mxONti3uMJB19UZxNo7DwDo5p8KUBhaGhooSeJW"], ["updated_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00]]
825
+  (0.1ms) RELEASE SAVEPOINT active_record_1
826
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
827
+  (0.3ms) rollback transaction
828
+  (0.1ms) begin transaction
829
+ ---------------------------------------------------------------------------
830
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_not_specified
831
+ ---------------------------------------------------------------------------
832
+  (0.1ms) SAVEPOINT active_record_1
833
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
834
+ Binary data inserted for `string` type on column `encrypted_password`
835
+ SQL (4.8ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$Gg/IHmd1KBkQNelOPAGG.eLkvgsOHqZYHXlGFDnHXGor9Exm2NyIq"], ["updated_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00]]
836
+  (0.1ms) RELEASE SAVEPOINT active_record_1
837
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
838
+  (0.3ms) rollback transaction
839
+  (0.1ms) begin transaction
840
+ -------------------------------------------------------------------
841
+ UserImpersonate::ImpersonateControllerTest: test_staff_finder_other
842
+ -------------------------------------------------------------------
843
+  (0.1ms) SAVEPOINT active_record_1
844
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test@example.com' LIMIT 1
845
+ Binary data inserted for `string` type on column `encrypted_password`
846
+ SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00], ["email", "test@example.com"], ["encrypted_password", "$2a$04$Y/dfu6zDcQyH95DXqogSX.lwEyPbzN9cRQ0ifww9YsRzDpyMNcJFa"], ["updated_at", Wed, 29 Jul 2015 06:05:54 UTC +00:00]]
847
+  (0.1ms) RELEASE SAVEPOINT active_record_1
848
+  (0.3ms) rollback transaction
849
+  (0.1ms) begin transaction
850
+ --------------------------------------------------------------------------------------------
851
+ UserImpersonate::ImpersonateControllerTest: test_user_table_should_return_correct_table_name
852
+ --------------------------------------------------------------------------------------------
853
+  (0.2ms) rollback transaction
854
+  (0.1ms) begin transaction
855
+ -------------------------------
856
+ UserImpersonateTest: test_truth
857
+ -------------------------------
858
+  (0.1ms) rollback transaction
859
+  (386.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
860
+  (311.7ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
861
+  (489.0ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
862
+  (540.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
863
+  (237.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
864
+  (0.3ms) SELECT version FROM "schema_migrations"
865
+  (355.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
866
+  (312.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
867
+  (3.5ms) begin transaction
868
+  (0.1ms) commit transaction
869
+  (0.1ms) begin transaction
870
+  (0.2ms) SAVEPOINT active_record_1
871
+ Fixture Delete (0.7ms) DELETE FROM "users"
872
+ Fixture Insert (0.4ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 06:06:06', '2015-07-29 06:06:06')
873
+ Fixture Insert (0.2ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 06:06:06', '2015-07-29 06:06:06')
874
+  (0.1ms) RELEASE SAVEPOINT active_record_1
875
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
876
+ Started GET "/users/sign_in" for 127.0.0.1 at 2015-07-28 23:06:06 -0700
877
+ Processing by Devise::SessionsController#new as HTML
878
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (3.3ms)
879
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (133.4ms)
880
+ Completed 200 OK in 251ms (Views: 204.6ms | ActiveRecord: 0.0ms)
881
+ Started POST "/users/sign_in" for 127.0.0.1 at 2015-07-28 23:06:06 -0700
882
+ Processing by Devise::SessionsController#create as HTML
883
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
884
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
885
+ SQL (2.7ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 29 Jul 2015 06:06:06 UTC +00:00], ["current_sign_in_at", Wed, 29 Jul 2015 06:06:06 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 29 Jul 2015 06:06:06 UTC +00:00]]
886
+ Redirected to http://www.example.com/
887
+ Completed 302 Found in 161ms (ActiveRecord: 3.1ms)
888
+ Started GET "/" for 127.0.0.1 at 2015-07-28 23:06:06 -0700
889
+ Processing by HomeController#index as HTML
890
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
891
+ Rendered home/index.html.erb within layouts/application (6.1ms)
892
+ Completed 200 OK in 23ms (Views: 22.2ms | ActiveRecord: 0.4ms)
893
+ Started GET "/" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
894
+ Processing by HomeController#index as HTML
895
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
896
+ Rendered home/index.html.erb within layouts/application (3.5ms)
897
+ Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.4ms)
898
+ Started GET "/impersonate" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
899
+ Processing by UserImpersonate::ImpersonateController#index as HTML
900
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
901
+ Redirected to
902
+ Redirected to http://www.example.com/
903
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
904
+ Completed 302 Found in 6ms (ActiveRecord: 0.5ms)
905
+ Started GET "/" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
906
+ Processing by HomeController#index as HTML
907
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
908
+ Rendered home/index.html.erb within layouts/application (2.8ms)
909
+ Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.4ms)
910
+  (0.4ms) rollback transaction
911
+  (0.2ms) begin transaction
912
+  (0.1ms) commit transaction
913
+  (0.1ms) begin transaction
914
+  (0.2ms) SAVEPOINT active_record_1
915
+ Fixture Delete (0.6ms) DELETE FROM "users"
916
+ Fixture Insert (0.4ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 06:06:07', '2015-07-29 06:06:07')
917
+ Fixture Insert (0.2ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2015-07-29 06:06:07', '2015-07-29 06:06:07')
918
+  (0.1ms) RELEASE SAVEPOINT active_record_1
919
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
920
+ Started GET "/users/sign_in" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
921
+ Processing by Devise::SessionsController#new as HTML
922
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.7ms)
923
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (6.2ms)
924
+ Completed 200 OK in 11ms (Views: 8.7ms | ActiveRecord: 0.0ms)
925
+ Started POST "/users/sign_in" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
926
+ Processing by Devise::SessionsController#create as HTML
927
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
928
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
929
+ SQL (0.8ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 29 Jul 2015 06:06:07 UTC +00:00], ["current_sign_in_at", Wed, 29 Jul 2015 06:06:07 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 29 Jul 2015 06:06:07 UTC +00:00]]
930
+ Redirected to http://www.example.com/
931
+ Completed 302 Found in 147ms (ActiveRecord: 1.2ms)
932
+ Started GET "/" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
933
+ Processing by HomeController#index as HTML
934
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
935
+ Rendered home/index.html.erb within layouts/application (3.3ms)
936
+ Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.3ms)
937
+ Started GET "/" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
938
+ Processing by HomeController#index as HTML
939
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
940
+ Rendered home/index.html.erb within layouts/application (4.8ms)
941
+ Completed 200 OK in 12ms (Views: 11.5ms | ActiveRecord: 0.3ms)
942
+ Started GET "/impersonate" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
943
+ Processing by UserImpersonate::ImpersonateController#index as HTML
944
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
945
+  (0.3ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
946
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
947
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (19.6ms)
948
+ Completed 200 OK in 45ms (Views: 40.6ms | ActiveRecord: 1.1ms)
949
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
950
+ Processing by UserImpersonate::ImpersonateController#index as HTML
951
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
952
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
953
+  (0.3ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
954
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
955
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (5.0ms)
956
+ Completed 200 OK in 15ms (Views: 10.5ms | ActiveRecord: 1.3ms)
957
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
958
+ Processing by UserImpersonate::ImpersonateController#create as HTML
959
+ Parameters: {"user_id"=>"2"}
960
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
961
+ User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
962
+ SQL (0.5ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 29 Jul 2015 06:06:07 UTC +00:00], ["current_sign_in_at", Wed, 29 Jul 2015 06:06:07 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 29 Jul 2015 06:06:07 UTC +00:00]]
963
+ Redirected to http://www.example.com/
964
+ Completed 302 Found in 21ms (ActiveRecord: 1.5ms)
965
+ Started GET "/" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
966
+ Processing by HomeController#index as HTML
967
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
968
+ Rendered home/index.html.erb within layouts/application (4.9ms)
969
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
970
+ Rendered user_impersonate/_header.html.erb (6.1ms)
971
+ Completed 200 OK in 22ms (Views: 17.1ms | ActiveRecord: 0.5ms)
972
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
973
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
974
+ Parameters: {"utf8"=>"✓"}
975
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
976
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
977
+ SQL (0.7ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 29 Jul 2015 06:06:07 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 29 Jul 2015 06:06:07 UTC +00:00]]
978
+ Redirected to http://www.example.com/
979
+ Completed 302 Found in 23ms (ActiveRecord: 1.3ms)
980
+ Started GET "/" for 127.0.0.1 at 2015-07-28 23:06:07 -0700
981
+ Processing by HomeController#index as HTML
982
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
983
+ Rendered home/index.html.erb within layouts/application (3.1ms)
984
+ Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms)
985
+  (0.4ms) rollback transaction