user_impersonate2 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +77 -19
- data/app/controllers/user_impersonate/impersonate_controller.rb +15 -8
- data/app/helpers/user_impersonate/application_helper.rb +4 -4
- data/lib/generators/user_impersonate/templates/config/initializers/user_impersonate.rb +38 -9
- data/lib/user_impersonate/devise_helpers.rb +2 -2
- data/lib/user_impersonate/version.rb +1 -1
- data/test/dummy-rails3/config/initializers/user_impersonate.rb +38 -11
- data/test/dummy-rails3/log/development.log +170 -0
- data/test/dummy-rails3/log/test.log +2090 -0
- data/test/dummy-rails4/config/initializers/user_impersonate.rb +38 -11
- data/test/dummy-rails4/log/development.log +18 -0
- data/test/dummy-rails4/log/test.log +1588 -0
- data/test/dummy-rails4/tmp/cache/assets/test/sprockets/291faed72d20664326ce265eb8e1ed2f +0 -0
- data/test/dummy-rails4/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy-rails4/tmp/cache/assets/test/sprockets/79203f7770f5d8956dee4606e93f3d65 +0 -0
- data/test/dummy-rails4/tmp/cache/assets/test/sprockets/8473d4c341d1accbf02a0c2d8270c68e +0 -0
- data/test/dummy-rails4/tmp/cache/assets/test/sprockets/a51c3d05425a76a50181d8144764ac8f +0 -0
- data/test/functional/impersonate_controller_test.rb +46 -0
- data/test/test_helper.rb +1 -0
- metadata +10 -6
- data/test/dummy-rails3/config/initializers/inflections.rb +0 -15
- data/test/dummy-rails4/config/initializers/inflections.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41f59533772641d18710a8590c923455b2ba8fd7
|
4
|
+
data.tar.gz: e9f1bf130006f276fd3f63ea05ecdde95831c227
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4be419909db112d9b44936d852e65ba7f5a9a84ed79b4840b0ddfb393fa156c2f9bdd4bdd86cb920c3d4264bb0bba786ab76b47855e7e03b7c1468e101090547
|
7
|
+
data.tar.gz: 52570611f69ad24203fa3cce786ec1712efebea4c797a41913c92385ba718a1af12303361c3774be949c5270f7d1ff3f9266bda30a212158a2d1c3f96173e419
|
data/README.md
CHANGED
@@ -7,8 +7,8 @@
|
|
7
7
|
## Note
|
8
8
|
|
9
9
|
This is a fork of Engine Yard's no-longer-maintained [`user_impersonate`](https://github.com/engineyard/user_impersonate)
|
10
|
-
gem. It supports Rails 3.2.x and Rails 4 and has
|
11
|
-
2.0.0 and 2.1.0.
|
10
|
+
gem and is its official successor. It supports Rails 3.2.x and Rails 4 and has
|
11
|
+
been tested against Ruby 1.9.3, 2.0.0 and 2.1.0.
|
12
12
|
|
13
13
|
## Overview
|
14
14
|
|
@@ -24,7 +24,8 @@ This Rails engine currently supports the following Rails authentication systems:
|
|
24
24
|
|
25
25
|
## Links
|
26
26
|
|
27
|
-
* [Wiki](https://github.com/rcook/user_impersonate2/wiki) (includes tutorials
|
27
|
+
* [Wiki](https://github.com/rcook/user_impersonate2/wiki) (includes tutorials
|
28
|
+
etc.)
|
28
29
|
|
29
30
|
## Example usage
|
30
31
|
|
@@ -60,6 +61,8 @@ This adds the following line to your `config/routes.rb` file:
|
|
60
61
|
mount UserImpersonate::Engine => "/impersonate", as: "impersonate_engine"
|
61
62
|
```
|
62
63
|
|
64
|
+
It also generates a default initializer under `config/initializers/user_impersonate2.rb`.
|
65
|
+
|
63
66
|
Make sure that your layout files include the standard flashes since these are
|
64
67
|
used to communicate information and error messages to the user:
|
65
68
|
|
@@ -170,8 +173,8 @@ created by the `user_impersonate` generator described above.
|
|
170
173
|
# config/initializers/user_impersonate.rb
|
171
174
|
module UserImpersonate
|
172
175
|
class Engine < Rails::Engine
|
173
|
-
config.redirect_on_impersonate =
|
174
|
-
config.redirect_on_revert =
|
176
|
+
config.redirect_on_impersonate = '/'
|
177
|
+
config.redirect_on_revert = '/impersonate'
|
175
178
|
end
|
176
179
|
end
|
177
180
|
```
|
@@ -179,8 +182,9 @@ end
|
|
179
182
|
### User model and lookup
|
180
183
|
|
181
184
|
By default, `user_impersonate2` assumes the user model is named `User`, that you
|
182
|
-
use `User.find(id)` to find a user given its ID,
|
183
|
-
related ID value
|
185
|
+
use `User.find(id)` to find a user given its ID, use `some_user.id` to get the
|
186
|
+
related ID value and that your user model has a `staff?` attribute that returns
|
187
|
+
`true` if the corresponding user is staff and `false` otherwise.
|
184
188
|
|
185
189
|
You can change this default behaviour in the initializer `config/initializers/user_impersonate.rb`.
|
186
190
|
|
@@ -188,10 +192,35 @@ You can change this default behaviour in the initializer `config/initializers/us
|
|
188
192
|
# config/initializers/user_impersonate.rb
|
189
193
|
module UserImpersonate
|
190
194
|
class Engine < Rails::Engine
|
191
|
-
config.user_class
|
192
|
-
config.user_finder
|
193
|
-
config.user_id_column
|
194
|
-
config.user_is_staff_method =
|
195
|
+
config.user_class = 'User'
|
196
|
+
config.user_finder = 'find'
|
197
|
+
config.user_id_column = 'id'
|
198
|
+
config.user_is_staff_method = 'staff?'
|
199
|
+
end
|
200
|
+
end
|
201
|
+
```
|
202
|
+
|
203
|
+
By default, `user_impersonate2` will use the same model for staff/admin users
|
204
|
+
as that described above for regular users. Some configurations, using
|
205
|
+
frameworks such as [Active Admin](http://activeadmin.info/), for example, use a
|
206
|
+
different model for staff/admin users. `user_impersonate2`'s default behaviour
|
207
|
+
can be overridden using the following initializer settings:
|
208
|
+
|
209
|
+
```ruby
|
210
|
+
# config/initializers/user_impersonate.rb
|
211
|
+
module UserImpersonate
|
212
|
+
class Engine < Rails::Engine
|
213
|
+
# For Active Admin "AdminUser" model, use 'authenticate_admin_user!'
|
214
|
+
config.authenticate_user_method = 'authenticate_admin_user!'
|
215
|
+
|
216
|
+
# For Active Admin "AdminUser" model, use 'AdminUser'
|
217
|
+
config.staff_class = 'AdminUser'
|
218
|
+
|
219
|
+
# Staff user model lookup method
|
220
|
+
config.staff_finder = 'find'
|
221
|
+
|
222
|
+
# For Active Admin "AdminUser" model, use 'current_admin_user'
|
223
|
+
config.current_staff = 'current_admin_user'
|
195
224
|
end
|
196
225
|
end
|
197
226
|
```
|
@@ -225,14 +254,14 @@ Use the following initializer:
|
|
225
254
|
# config/initializers/user_impersonate.rb
|
226
255
|
module UserImpersonate
|
227
256
|
class Engine < Rails::Engine
|
228
|
-
config.user_class
|
229
|
-
config.user_finder
|
230
|
-
config.user_id_column
|
231
|
-
config.user_is_staff_method =
|
232
|
-
config.authenticate_user_method =
|
233
|
-
config.redirect_on_impersonate =
|
234
|
-
config.redirect_on_revert =
|
235
|
-
config.user_name_column =
|
257
|
+
config.user_class = 'Spree::User'
|
258
|
+
config.user_finder = 'find'
|
259
|
+
config.user_id_column = 'id'
|
260
|
+
config.user_is_staff_method = 'staff?'
|
261
|
+
config.authenticate_user_method = 'authenticate_spree_user!'
|
262
|
+
config.redirect_on_impersonate = '/'
|
263
|
+
config.redirect_on_revert = '/'
|
264
|
+
config.user_name_column = 'users'
|
236
265
|
end
|
237
266
|
end
|
238
267
|
```
|
@@ -254,6 +283,31 @@ project. The minimum bar for all push requests is that the Travis-CI build must
|
|
254
283
|
pass. Contributors are also strongly encouraged to add new tests to cover any
|
255
284
|
new functionality introduced into the gem.
|
256
285
|
|
286
|
+
### Installing gem dependencies via Bundler
|
287
|
+
|
288
|
+
To install all gem dependencies for the active version of Ruby and for a given
|
289
|
+
gemfile, you'll need to run the `bundle` command, e.g.
|
290
|
+
|
291
|
+
```bash
|
292
|
+
BUNDLE_GEMFILE=Gemfile.rails3 bundle
|
293
|
+
```
|
294
|
+
|
295
|
+
### Running tests against all configurations (requires [rbenv](https://github.com/sstephenson/rbenv))
|
296
|
+
|
297
|
+
To run tests against all configurations specified in the Travis-CI configuration
|
298
|
+
file, run `script/test-all`:
|
299
|
+
|
300
|
+
```bash
|
301
|
+
script/test-all
|
302
|
+
```
|
303
|
+
|
304
|
+
This scripts requires that you have rbenv installed along with all required
|
305
|
+
versions of Ruby. Furthermore, you'll need to make sure that each version of
|
306
|
+
Ruby installed via rbenv has all the required gems available to it installed
|
307
|
+
using the `bundle` command.
|
308
|
+
|
309
|
+
### Running tests against a single configuration
|
310
|
+
|
257
311
|
To manually run the Travis-CI verification steps on your local machine, you can
|
258
312
|
use the following sequence of commands for Rails 3.2.x:
|
259
313
|
|
@@ -267,6 +321,10 @@ To test against Rails 4.0.x, use:
|
|
267
321
|
script/test -g Gemfile.rails4
|
268
322
|
```
|
269
323
|
|
324
|
+
`script/test` takes care of running Bundler to update any gem dependencies,
|
325
|
+
setting up the database, running all tests and then performing a test build of
|
326
|
+
the gem in order to catch any syntax errors.
|
327
|
+
|
270
328
|
## Licence
|
271
329
|
|
272
330
|
`user_impersonate2` is released under the MIT licence.
|
@@ -15,7 +15,7 @@ module UserImpersonate
|
|
15
15
|
@users = user_class.order("updated_at DESC").
|
16
16
|
where(
|
17
17
|
id_column.not_in [
|
18
|
-
|
18
|
+
current_staff.send(user_id_column.to_sym) # e.g. current_user.id
|
19
19
|
])
|
20
20
|
if params[:search]
|
21
21
|
@users = @users.where("#{user_name_column} like ?", "%#{params[:search]}%")
|
@@ -37,7 +37,7 @@ module UserImpersonate
|
|
37
37
|
flash[:notice] = "You weren't impersonating anyone"
|
38
38
|
redirect_on_revert and return
|
39
39
|
end
|
40
|
-
user =
|
40
|
+
user = current_staff
|
41
41
|
revert_impersonate
|
42
42
|
if user
|
43
43
|
flash[:notice] = "No longer impersonating #{user}"
|
@@ -49,8 +49,15 @@ module UserImpersonate
|
|
49
49
|
end
|
50
50
|
|
51
51
|
private
|
52
|
+
def current_staff
|
53
|
+
@current_staff ||= begin
|
54
|
+
current_staff_method = config_or_default(:current_staff, "current_user").to_sym
|
55
|
+
send(current_staff_method) if respond_to? current_staff_method
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
52
59
|
def current_user_must_be_staff!
|
53
|
-
unless user_is_staff?(
|
60
|
+
unless user_is_staff?(current_staff)
|
54
61
|
flash[:error] = "You don't have access to this section."
|
55
62
|
redirect_to :back
|
56
63
|
end
|
@@ -58,14 +65,14 @@ module UserImpersonate
|
|
58
65
|
redirect_to '/'
|
59
66
|
end
|
60
67
|
|
61
|
-
#
|
68
|
+
# current_staff changes from a staff user to
|
62
69
|
# +new_user+; current user stored in +session[:staff_user_id]+
|
63
70
|
def impersonate(new_user)
|
64
|
-
session[:staff_user_id] =
|
71
|
+
session[:staff_user_id] = current_staff.id #
|
65
72
|
sign_in_user new_user
|
66
73
|
end
|
67
74
|
|
68
|
-
# revert the +
|
75
|
+
# revert the +current_staff+ back to the staff user
|
69
76
|
# stored in +session[:staff_user_id]+
|
70
77
|
def revert_impersonate
|
71
78
|
return unless current_staff_user
|
@@ -91,8 +98,8 @@ module UserImpersonate
|
|
91
98
|
# Similar to user.staff?
|
92
99
|
# Using all the UserImpersonate config options
|
93
100
|
def user_is_staff?(user)
|
94
|
-
|
95
|
-
|
101
|
+
current_staff.respond_to?(user_is_staff_method.to_sym) &&
|
102
|
+
current_staff.send(user_is_staff_method.to_sym)
|
96
103
|
end
|
97
104
|
|
98
105
|
def user_finder_method
|
@@ -2,10 +2,10 @@ module UserImpersonate
|
|
2
2
|
module ApplicationHelper
|
3
3
|
def current_staff_user
|
4
4
|
return unless session[:staff_user_id]
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
@staff_user ||=
|
5
|
+
staff_finder_method = (UserImpersonate::Engine.config.staff_finder || "find").to_sym
|
6
|
+
staff_class_name = UserImpersonate::Engine.config.staff_class || "User"
|
7
|
+
staff_class = staff_class_name.constantize
|
8
|
+
@staff_user ||= staff_class.send(staff_finder_method, session[:staff_user_id])
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -1,15 +1,44 @@
|
|
1
1
|
module UserImpersonate
|
2
2
|
class Engine < Rails::Engine
|
3
|
-
|
4
|
-
config.
|
5
|
-
config.user_id_column = "id" # Such that User.find(aUser.id) works
|
6
|
-
config.user_name_column = "name" # Such that User.where("#{user_name_column} like ?", "%#{params[:search]}%") works
|
7
|
-
config.user_is_staff_method = "staff?" # current_user.staff?
|
3
|
+
# Devise user model
|
4
|
+
config.user_class = 'User'
|
8
5
|
|
9
|
-
|
10
|
-
config.
|
6
|
+
# User model lookup method
|
7
|
+
config.user_finder = 'find'
|
11
8
|
|
12
|
-
|
13
|
-
config.
|
9
|
+
# User model primary key attribute
|
10
|
+
config.user_id_column = 'id'
|
11
|
+
|
12
|
+
# User model name attribute used for search
|
13
|
+
# Usage: User.where('#{user_name_column} like ?', '%#{params[:search]}%')
|
14
|
+
config.user_name_column = 'name'
|
15
|
+
|
16
|
+
# User model staff attribute
|
17
|
+
config.user_is_staff_method = 'staff?'
|
18
|
+
|
19
|
+
# Redirect to this path when entering impersonate mode
|
20
|
+
config.redirect_on_impersonate = '/'
|
21
|
+
|
22
|
+
# Redirect to this path when leaving impersonate mode
|
23
|
+
config.redirect_on_revert = '/impersonate'
|
24
|
+
|
25
|
+
# Devise filter method used to protect impersonation controller
|
26
|
+
# For Active Admin "AdminUser" model, change to 'authenticate_admin_user!'
|
27
|
+
config.authenticate_user_method = 'authenticate_user!'
|
28
|
+
|
29
|
+
# Devise method used to sign user in
|
30
|
+
config.sign_in_user_method = 'sign_in'
|
31
|
+
|
32
|
+
# Devise staff user class
|
33
|
+
# For Active Admin "AdminUser" model, change to 'AdminUser'
|
34
|
+
config.staff_class = 'User'
|
35
|
+
|
36
|
+
# Staff user model lookup method
|
37
|
+
config.staff_finder = 'find'
|
38
|
+
|
39
|
+
# Devise method storing current user
|
40
|
+
# For Active Admin "AdminUser" model, change to 'current_admin_user'
|
41
|
+
config.current_staff = 'current_user'
|
14
42
|
end
|
15
43
|
end
|
44
|
+
|
@@ -5,7 +5,7 @@ module UserImpersonate
|
|
5
5
|
# current_user changes from a staff user to
|
6
6
|
# +new_user+; current user stored in +session[:staff_user_id]+
|
7
7
|
def impersonate(new_user)
|
8
|
-
session[:staff_user_id] =
|
8
|
+
session[:staff_user_id] = current_staff.id #
|
9
9
|
sign_in new_user, bypass: true
|
10
10
|
end
|
11
11
|
|
@@ -28,4 +28,4 @@ module UserImpersonate
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
31
|
-
end
|
31
|
+
end
|
@@ -1,18 +1,45 @@
|
|
1
1
|
module UserImpersonate
|
2
2
|
class Engine < Rails::Engine
|
3
|
-
|
4
|
-
config.
|
5
|
-
config.user_id_column = "id" # Such that User.find(aUser.id) works
|
6
|
-
config.user_name_column = "name" # Such that User.where("#{user_name_column} like ?", "%#{params[:search]}%") works
|
7
|
-
config.user_is_staff_method = "staff?" # current_user.staff?
|
3
|
+
# Devise user model
|
4
|
+
config.user_class = 'User'
|
8
5
|
|
9
|
-
|
6
|
+
# User model lookup method
|
7
|
+
config.user_finder = 'find'
|
10
8
|
|
11
|
-
#
|
12
|
-
|
13
|
-
config.redirect_on_revert = "/"
|
9
|
+
# User model primary key attribute
|
10
|
+
config.user_id_column = 'id'
|
14
11
|
|
15
|
-
|
16
|
-
|
12
|
+
# User model name attribute used for search
|
13
|
+
# Usage: User.where('#{user_name_column} like ?', '%#{params[:search]}%')
|
14
|
+
config.user_name_column = 'name'
|
15
|
+
|
16
|
+
# User model staff attribute
|
17
|
+
config.user_is_staff_method = 'staff?'
|
18
|
+
|
19
|
+
# Redirect to this path when entering impersonate mode
|
20
|
+
config.redirect_on_impersonate = '/'
|
21
|
+
|
22
|
+
# Redirect to this path when leaving impersonate mode
|
23
|
+
# In test mode, we use '/' since this includes an impersonation header
|
24
|
+
config.redirect_on_revert = '/'
|
25
|
+
|
26
|
+
# Devise filter method used to protect impersonation controller
|
27
|
+
# For Active Admin "AdminUser" model, change to 'authenticate_admin_user!'
|
28
|
+
config.authenticate_user_method = 'authenticate_user!'
|
29
|
+
|
30
|
+
# Devise method used to sign user in
|
31
|
+
config.sign_in_user_method = 'sign_in'
|
32
|
+
|
33
|
+
# Devise staff user class
|
34
|
+
# For Active Admin "AdminUser" model, change to 'AdminUser'
|
35
|
+
config.staff_class = 'User'
|
36
|
+
|
37
|
+
# Staff user model lookup method
|
38
|
+
config.staff_finder = 'find'
|
39
|
+
|
40
|
+
# Devise method storing current user
|
41
|
+
# For Active Admin "AdminUser" model, change to 'current_admin_user'
|
42
|
+
config.current_staff = 'current_user'
|
17
43
|
end
|
18
44
|
end
|
45
|
+
|
@@ -260,3 +260,173 @@ Connecting to database specified by database.yml
|
|
260
260
|
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
261
261
|
[1m[36m (19.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20120914184123')[0m
|
262
262
|
[1m[35m (18.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
|
263
|
+
Connecting to database specified by database.yml
|
264
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
265
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
266
|
+
[1m[36m (22.4ms)[0m [1mDROP TABLE "users"[0m
|
267
|
+
[1m[35m (27.3ms)[0m 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')
|
268
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
269
|
+
[1m[35m (29.7ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
270
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
271
|
+
[1m[35m (0.1ms)[0m PRAGMA index_info('index_users_on_email')
|
272
|
+
[1m[36m (15.6ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
273
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
274
|
+
Connecting to database specified by database.yml
|
275
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
276
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
277
|
+
[1m[36m (20.6ms)[0m [1mDROP TABLE "users"[0m
|
278
|
+
[1m[35m (15.1ms)[0m 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')
|
279
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
280
|
+
[1m[35m (20.2ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
281
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
282
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
283
|
+
[1m[36m (14.9ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
284
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
285
|
+
Connecting to database specified by database.yml
|
286
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
287
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
288
|
+
[1m[36m (32.9ms)[0m [1mDROP TABLE "users"[0m
|
289
|
+
[1m[35m (23.1ms)[0m 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')
|
290
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
291
|
+
[1m[35m (21.5ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
292
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
293
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
294
|
+
[1m[36m (25.9ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
295
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
296
|
+
Connecting to database specified by database.yml
|
297
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
298
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
299
|
+
[1m[36m (33.3ms)[0m [1mDROP TABLE "users"[0m
|
300
|
+
[1m[35m (32.9ms)[0m 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')
|
301
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
302
|
+
[1m[35m (24.5ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
303
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
304
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
305
|
+
[1m[36m (25.0ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
306
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
307
|
+
Connecting to database specified by database.yml
|
308
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
309
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
310
|
+
[1m[36m (15.7ms)[0m [1mDROP TABLE "users"[0m
|
311
|
+
[1m[35m (25.0ms)[0m 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')
|
312
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
313
|
+
[1m[35m (20.6ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
314
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("users")[0m
|
315
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
316
|
+
[1m[36m (24.7ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
317
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
318
|
+
Connecting to database specified by database.yml
|
319
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
320
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
321
|
+
[1m[36m (36.5ms)[0m [1mDROP TABLE "users"[0m
|
322
|
+
[1m[35m (31.6ms)[0m 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')
|
323
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
324
|
+
[1m[35m (15.9ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
325
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("users")[0m
|
326
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
327
|
+
[1m[36m (31.8ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
328
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
329
|
+
Connecting to database specified by database.yml
|
330
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
331
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
332
|
+
[1m[36m (21.7ms)[0m [1mDROP TABLE "users"[0m
|
333
|
+
[1m[35m (15.6ms)[0m 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')
|
334
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
335
|
+
[1m[35m (15.0ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
336
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("users")[0m
|
337
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
338
|
+
[1m[36m (15.0ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
339
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
340
|
+
Connecting to database specified by database.yml
|
341
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
342
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
343
|
+
[1m[36m (26.5ms)[0m [1mDROP TABLE "users"[0m
|
344
|
+
[1m[35m (20.4ms)[0m 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')
|
345
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
346
|
+
[1m[35m (30.9ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
347
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
348
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
349
|
+
[1m[36m (24.5ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
350
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
351
|
+
Connecting to database specified by database.yml
|
352
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
353
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
354
|
+
[1m[36m (34.3ms)[0m [1mDROP TABLE "users"[0m
|
355
|
+
[1m[35m (21.3ms)[0m 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')
|
356
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
357
|
+
[1m[35m (15.3ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
358
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
359
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
360
|
+
[1m[36m (22.5ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
361
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
362
|
+
Connecting to database specified by database.yml
|
363
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
364
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
365
|
+
[1m[36m (17.4ms)[0m [1mDROP TABLE "users"[0m
|
366
|
+
[1m[35m (15.5ms)[0m 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')
|
367
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
368
|
+
[1m[35m (35.1ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
369
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
370
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
371
|
+
[1m[36m (32.1ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
372
|
+
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
373
|
+
Connecting to database specified by database.yml
|
374
|
+
[1m[36m (1.1ms)[0m [1mselect sqlite_version(*)[0m
|
375
|
+
[1m[35m (36.8ms)[0m 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')
|
376
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
377
|
+
[1m[35m (26.6ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
378
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("users")[0m
|
379
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
380
|
+
[1m[36m (32.8ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
381
|
+
[1m[35m (34.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
382
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
383
|
+
[1m[35m (30.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
384
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
385
|
+
[1m[35m (32.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
|
386
|
+
[1m[36m (32.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20120914174453')[0m
|
387
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
388
|
+
Connecting to database specified by database.yml
|
389
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
390
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
391
|
+
[1m[36m (31.3ms)[0m [1mCREATE 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') [0m
|
392
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("users")
|
393
|
+
[1m[36m (28.6ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")[0m
|
394
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("users")
|
395
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_users_on_email')[0m
|
396
|
+
[1m[35m (24.8ms)[0m CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
|
397
|
+
[1m[36m (20.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
398
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
399
|
+
[1m[36m (40.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
400
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
401
|
+
[1m[36m (37.4ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20120914184123')[0m
|
402
|
+
[1m[35m (31.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
|
403
|
+
Connecting to database specified by database.yml
|
404
|
+
[1m[36m (0.6ms)[0m [1mselect sqlite_version(*)[0m
|
405
|
+
[1m[35m (16.6ms)[0m 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')
|
406
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
407
|
+
[1m[35m (14.7ms)[0m CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
|
408
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("users")[0m
|
409
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_users_on_email')
|
410
|
+
[1m[36m (34.5ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
411
|
+
[1m[35m (31.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
412
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
413
|
+
[1m[35m (36.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
414
|
+
[1m[36m (0.0ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
415
|
+
[1m[35m (32.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
|
416
|
+
[1m[36m (32.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20120914174453')[0m
|
417
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
418
|
+
Connecting to database specified by database.yml
|
419
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
420
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
421
|
+
[1m[36m (29.7ms)[0m [1mCREATE 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') [0m
|
422
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("users")
|
423
|
+
[1m[36m (22.4ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")[0m
|
424
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("users")
|
425
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_users_on_email')[0m
|
426
|
+
[1m[35m (24.0ms)[0m CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
|
427
|
+
[1m[36m (24.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
428
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
429
|
+
[1m[36m (24.0ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
430
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
431
|
+
[1m[36m (25.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20120914184123')[0m
|
432
|
+
[1m[35m (23.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
|