simple_user 0.1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +35 -0
- data/Rakefile +40 -0
- data/app/assets/javascripts/simple_user/application.js +15 -0
- data/app/assets/javascripts/simple_user/facebook_connect.js.erb +33 -0
- data/app/assets/stylesheets/simple_user/application.css +13 -0
- data/app/controllers/simple_user/admin_users/registrations_controller.rb +7 -0
- data/app/controllers/simple_user/admin_users/sessions_controller.rb +20 -0
- data/app/controllers/simple_user/admin_users_controller.rb +134 -0
- data/app/controllers/simple_user/application_controller.rb +7 -0
- data/app/controllers/simple_user/auth_controller.rb +26 -0
- data/app/controllers/simple_user/users/registrations_controller.rb +5 -0
- data/app/controllers/simple_user/users/sessions_controller.rb +41 -0
- data/app/controllers/simple_user/users_controller.rb +88 -0
- data/app/helpers/simple_user/application_helper.rb +13 -0
- data/app/helpers/simple_user/links_helper.rb +9 -0
- data/app/models/ability.rb +25 -0
- data/app/models/role.rb +18 -0
- data/app/models/simple_user/admin_user.rb +48 -0
- data/app/models/simple_user/authentication.rb +9 -0
- data/app/models/simple_user/user.rb +92 -0
- data/app/views/layouts/simple_user/application.html.erb +28 -0
- data/app/views/simple_user/admin_users/_form.html.erb +15 -0
- data/app/views/simple_user/admin_users/confirmations/new.html.erb +16 -0
- data/app/views/simple_user/admin_users/edit.html.erb +6 -0
- data/app/views/simple_user/admin_users/index.html.erb +27 -0
- data/app/views/simple_user/admin_users/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/simple_user/admin_users/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/simple_user/admin_users/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/simple_user/admin_users/new.html.erb +5 -0
- data/app/views/simple_user/admin_users/passwords/edit.html.erb +19 -0
- data/app/views/simple_user/admin_users/passwords/new.html.erb +15 -0
- data/app/views/simple_user/admin_users/registrations/edit.html.erb +28 -0
- data/app/views/simple_user/admin_users/registrations/new.html.erb +18 -0
- data/app/views/simple_user/admin_users/sessions/new.html.erb +15 -0
- data/app/views/simple_user/admin_users/shared/_links.erb +25 -0
- data/app/views/simple_user/admin_users/show.html.erb +15 -0
- data/app/views/simple_user/admin_users/unlocks/new.html.erb +16 -0
- data/app/views/simple_user/application/_menu_admin_users.html.erb +15 -0
- data/app/views/simple_user/application/_menu_users.html.erb +9 -0
- data/app/views/simple_user/users/_form.html.erb +14 -0
- data/app/views/simple_user/users/confirmations/new.html.erb +16 -0
- data/app/views/simple_user/users/edit.html.erb +6 -0
- data/app/views/simple_user/users/index.html.erb +31 -0
- data/app/views/simple_user/users/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/simple_user/users/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/simple_user/users/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/simple_user/users/new.html.erb +5 -0
- data/app/views/simple_user/users/passwords/edit.html.erb +19 -0
- data/app/views/simple_user/users/passwords/new.html.erb +15 -0
- data/app/views/simple_user/users/registrations/edit.html.erb +30 -0
- data/app/views/simple_user/users/registrations/new.html.erb +20 -0
- data/app/views/simple_user/users/sessions/new.html.erb +15 -0
- data/app/views/simple_user/users/shared/_links.erb +25 -0
- data/app/views/simple_user/users/show.html.erb +25 -0
- data/app/views/simple_user/users/unlocks/new.html.erb +16 -0
- data/config/initializers/devise.rb +243 -0
- data/config/initializers/omniauth.rb +7 -0
- data/config/initializers/rolify.rb +8 -0
- data/config/locales/devise.en.yml +59 -0
- data/config/routes.rb +39 -0
- data/db/migrate/20130312215459_devise_create_simple_user_users.rb +50 -0
- data/db/migrate/20130312215519_devise_create_simple_user_admin_users.rb +48 -0
- data/db/migrate/20130312215950_create_simple_user_authentications.rb +13 -0
- data/db/migrate/20130312226960_rolify_create_roles.rb +19 -0
- data/db/seed.rb +9 -0
- data/lib/generators/simple_user/generate_views/generate_views_generator.rb +12 -0
- data/lib/generators/simple_user/install/install_generator.rb +20 -0
- data/lib/generators/simple_user/install/templates/devise_config.yml +1 -0
- data/lib/generators/simple_user/install/templates/fb_config.yml +3 -0
- data/lib/generators/simple_user/install/templates/simple_user.yml +3 -0
- data/lib/simple_user.rb +4 -0
- data/lib/simple_user/engine.rb +48 -0
- data/lib/simple_user/version.rb +3 -0
- data/lib/tasks/simple_user_tasks.rake +16 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +16 -0
- data/test/dummy/app/assets/javascripts/welcome.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/assets/stylesheets/welcome.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +31 -0
- data/test/dummy/app/controllers/welcome_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/welcome_helper.rb +2 -0
- data/test/dummy/app/views/admin_users/_form.html.erb +15 -0
- data/test/dummy/app/views/admin_users/confirmations/new.html.erb +16 -0
- data/test/dummy/app/views/admin_users/edit.html.erb +6 -0
- data/test/dummy/app/views/admin_users/index.html.erb +27 -0
- data/test/dummy/app/views/admin_users/mailer/confirmation_instructions.html.erb +5 -0
- data/test/dummy/app/views/admin_users/mailer/reset_password_instructions.html.erb +8 -0
- data/test/dummy/app/views/admin_users/mailer/unlock_instructions.html.erb +7 -0
- data/test/dummy/app/views/admin_users/new.html.erb +5 -0
- data/test/dummy/app/views/admin_users/passwords/edit.html.erb +19 -0
- data/test/dummy/app/views/admin_users/passwords/new.html.erb +15 -0
- data/test/dummy/app/views/admin_users/registrations/edit.html.erb +28 -0
- data/test/dummy/app/views/admin_users/registrations/new.html.erb +18 -0
- data/test/dummy/app/views/admin_users/sessions/new.html.erb +15 -0
- data/test/dummy/app/views/admin_users/shared/_links.erb +25 -0
- data/test/dummy/app/views/admin_users/show.html.erb +15 -0
- data/test/dummy/app/views/admin_users/unlocks/new.html.erb +16 -0
- data/test/dummy/app/views/application/_menu_admin_users.html.erb +15 -0
- data/test/dummy/app/views/application/_menu_users.html.erb +9 -0
- data/test/dummy/app/views/layouts/application.html.erb +28 -0
- data/test/dummy/app/views/simple_user/admin_users/_form.html.erb +15 -0
- data/test/dummy/app/views/simple_user/admin_users/confirmations/new.html.erb +16 -0
- data/test/dummy/app/views/simple_user/admin_users/edit.html.erb +6 -0
- data/test/dummy/app/views/simple_user/admin_users/index.html.erb +27 -0
- data/test/dummy/app/views/simple_user/admin_users/mailer/confirmation_instructions.html.erb +5 -0
- data/test/dummy/app/views/simple_user/admin_users/mailer/reset_password_instructions.html.erb +8 -0
- data/test/dummy/app/views/simple_user/admin_users/mailer/unlock_instructions.html.erb +7 -0
- data/test/dummy/app/views/simple_user/admin_users/new.html.erb +5 -0
- data/test/dummy/app/views/simple_user/admin_users/passwords/edit.html.erb +19 -0
- data/test/dummy/app/views/simple_user/admin_users/passwords/new.html.erb +15 -0
- data/test/dummy/app/views/simple_user/admin_users/registrations/edit.html.erb +28 -0
- data/test/dummy/app/views/simple_user/admin_users/registrations/new.html.erb +18 -0
- data/test/dummy/app/views/simple_user/admin_users/sessions/new.html.erb +15 -0
- data/test/dummy/app/views/simple_user/admin_users/shared/_links.erb +25 -0
- data/test/dummy/app/views/simple_user/admin_users/show.html.erb +15 -0
- data/test/dummy/app/views/simple_user/admin_users/unlocks/new.html.erb +16 -0
- data/test/dummy/app/views/simple_user/application/_menu_admin_users.html.erb +15 -0
- data/test/dummy/app/views/simple_user/application/_menu_users.html.erb +9 -0
- data/test/dummy/app/views/simple_user/users/_form.html.erb +14 -0
- data/test/dummy/app/views/simple_user/users/confirmations/new.html.erb +16 -0
- data/test/dummy/app/views/simple_user/users/edit.html.erb +6 -0
- data/test/dummy/app/views/simple_user/users/index.html.erb +31 -0
- data/test/dummy/app/views/simple_user/users/mailer/confirmation_instructions.html.erb +5 -0
- data/test/dummy/app/views/simple_user/users/mailer/reset_password_instructions.html.erb +8 -0
- data/test/dummy/app/views/simple_user/users/mailer/unlock_instructions.html.erb +7 -0
- data/test/dummy/app/views/simple_user/users/new.html.erb +5 -0
- data/test/dummy/app/views/simple_user/users/passwords/edit.html.erb +19 -0
- data/test/dummy/app/views/simple_user/users/passwords/new.html.erb +15 -0
- data/test/dummy/app/views/simple_user/users/registrations/edit.html.erb +30 -0
- data/test/dummy/app/views/simple_user/users/registrations/new.html.erb +20 -0
- data/test/dummy/app/views/simple_user/users/sessions/new.html.erb +15 -0
- data/test/dummy/app/views/simple_user/users/shared/_links.erb +25 -0
- data/test/dummy/app/views/simple_user/users/show.html.erb +25 -0
- data/test/dummy/app/views/simple_user/users/unlocks/new.html.erb +16 -0
- data/test/dummy/app/views/welcome/index.html.erb +3 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/devise_config.yml +1 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/fb_config.yml +3 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +7 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130314021609_devise_create_simple_user_users.simple_user.rb +51 -0
- data/test/dummy/db/migrate/20130314021610_devise_create_simple_user_admin_users.simple_user.rb +49 -0
- data/test/dummy/db/migrate/20130314021611_create_simple_user_authentications.simple_user.rb +14 -0
- data/test/dummy/db/migrate/20130314021612_rolify_create_simple_user_roles.simple_user.rb +20 -0
- data/test/dummy/db/migrate/20130314222446_devise_create_simple_user_users.simple_user.rb +51 -0
- data/test/dummy/db/migrate/20130314222447_devise_create_simple_user_admin_users.simple_user.rb +49 -0
- data/test/dummy/db/migrate/20130314222448_create_simple_user_authentications.simple_user.rb +14 -0
- data/test/dummy/db/migrate/20130314222449_rolify_create_roles.simple_user.rb +20 -0
- data/test/dummy/db/schema.rb +87 -0
- data/test/dummy/log/development.log +100 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/functional/welcome_controller_test.rb +9 -0
- data/test/dummy/test/unit/helpers/welcome_helper_test.rb +4 -0
- data/test/dummy/tmp/cache/assets/C43/6A0/sprockets%2F9112a8a5c58f114023075f00ab994366 +0 -0
- data/test/dummy/tmp/cache/assets/C7B/190/sprockets%2F37b103f4623089af1456b90830fe941c +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/D13/C60/sprockets%2F2dedb8177c20286c4259c1d58c5646cc +0 -0
- data/test/dummy/tmp/cache/assets/D21/5D0/sprockets%2Fe2c4f946939f2d7d0b42d86383755cae +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D3E/F40/sprockets%2F25a167c7563d6fe8ec6b13ec1ac09274 +0 -0
- data/test/dummy/tmp/cache/assets/D43/A50/sprockets%2Fa41b368b71464f0a4feb19b6f875e44e +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D92/950/sprockets%2Fcda629d2e4e4583027facd41bf1ea406 +0 -0
- data/test/dummy/tmp/cache/assets/DA0/140/sprockets%2F25f485eb0a9f28b68e69ab1c0f57c0da +0 -0
- data/test/dummy/tmp/cache/assets/DCF/BD0/sprockets%2Fc8b53c6aae12e5a5be5fe8db5472a793 +0 -0
- data/test/dummy/tmp/cache/assets/DD2/810/sprockets%2Fdc8aca3689d6b6e14aa38b7c88a46bc3 +0 -0
- data/test/dummy/tmp/cache/assets/DD8/CE0/sprockets%2F5de7f141c1d9dc26ce8af1ad6246d99f +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/E02/930/sprockets%2Fec83bf6c33e43fb6a5cf38a52df8c60e +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E2A/CE0/sprockets%2F17bd5e2fd8a5fd2d834c9dadfd102c2f +0 -0
- data/test/fixtures/simple_user/admin_users.yml +11 -0
- data/test/fixtures/simple_user/authentications.yml +13 -0
- data/test/fixtures/simple_user/users.yml +11 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/simple_user_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/simple_user/admin_user_test.rb +9 -0
- data/test/unit/simple_user/authentication_test.rb +9 -0
- data/test/unit/simple_user/user_test.rb +9 -0
- metadata +516 -0
data/test/dummy/db/migrate/20130314021610_devise_create_simple_user_admin_users.simple_user.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# This migration comes from simple_user (originally 20130312215519)
|
2
|
+
class DeviseCreateSimpleUserAdminUsers < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table(:simple_user_admin_users) do |t|
|
5
|
+
## Database authenticatable
|
6
|
+
t.string :email, :null => false, :default => ""
|
7
|
+
t.string :encrypted_password, :null => false, :default => ""
|
8
|
+
|
9
|
+
## Recoverable
|
10
|
+
t.string :reset_password_token
|
11
|
+
t.datetime :reset_password_sent_at
|
12
|
+
|
13
|
+
## Rememberable
|
14
|
+
t.datetime :remember_created_at
|
15
|
+
|
16
|
+
## Trackable
|
17
|
+
t.integer :sign_in_count, :default => 0
|
18
|
+
t.datetime :current_sign_in_at
|
19
|
+
t.datetime :last_sign_in_at
|
20
|
+
t.string :current_sign_in_ip
|
21
|
+
t.string :last_sign_in_ip
|
22
|
+
|
23
|
+
## Confirmable
|
24
|
+
# t.string :confirmation_token
|
25
|
+
# t.datetime :confirmed_at
|
26
|
+
# t.datetime :confirmation_sent_at
|
27
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
28
|
+
|
29
|
+
## Lockable
|
30
|
+
# t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
31
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
32
|
+
# t.datetime :locked_at
|
33
|
+
|
34
|
+
## Token authenticatable
|
35
|
+
# t.string :authentication_token
|
36
|
+
|
37
|
+
t.string :username
|
38
|
+
t.boolean :active, :default => true
|
39
|
+
|
40
|
+
t.timestamps
|
41
|
+
end
|
42
|
+
|
43
|
+
add_index :simple_user_admin_users, :email, :unique => true
|
44
|
+
add_index :simple_user_admin_users, :reset_password_token, :unique => true
|
45
|
+
# add_index :simple_user_admin_users, :confirmation_token, :unique => true
|
46
|
+
# add_index :simple_user_admin_users, :unlock_token, :unique => true
|
47
|
+
# add_index :simple_user_admin_users, :authentication_token, :unique => true
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from simple_user (originally 20130312215950)
|
2
|
+
class CreateSimpleUserAuthentications < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :simple_user_authentications do |t|
|
5
|
+
t.string :provider
|
6
|
+
t.string :token
|
7
|
+
t.string :uid
|
8
|
+
t.references :user
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
add_index :simple_user_authentications, :user_id
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This migration comes from simple_user (originally 20130312226960)
|
2
|
+
class RolifyCreateSimpleUserRoles < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table(:simple_user_roles) do |t|
|
5
|
+
t.string :name
|
6
|
+
t.references :resource, :polymorphic => true
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
create_table(:simple_user_users_roles, :id => false) do |t|
|
12
|
+
t.references :simple_user_admin_user
|
13
|
+
t.references :simple_user_role
|
14
|
+
end
|
15
|
+
|
16
|
+
add_index(:simple_user_roles, :name)
|
17
|
+
add_index(:simple_user_roles, [ :name, :resource_type, :resource_id ], :name => "simple_users_r_n_rt_rid")
|
18
|
+
add_index(:simple_user_users_roles, [ :simple_user_admin_user_id, :simple_user_role_id ], :name => "simple_users_ur_i_auid_urid")
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# This migration comes from simple_user (originally 20130312215459)
|
2
|
+
class DeviseCreateSimpleUserUsers < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table(:simple_user_users) do |t|
|
5
|
+
## Database authenticatable
|
6
|
+
t.string :email, :null => false, :default => ""
|
7
|
+
t.string :encrypted_password, :null => false, :default => ""
|
8
|
+
|
9
|
+
## Recoverable
|
10
|
+
t.string :reset_password_token
|
11
|
+
t.datetime :reset_password_sent_at
|
12
|
+
|
13
|
+
## Rememberable
|
14
|
+
t.datetime :remember_created_at
|
15
|
+
|
16
|
+
## Trackable
|
17
|
+
t.integer :sign_in_count, :default => 0
|
18
|
+
t.datetime :current_sign_in_at
|
19
|
+
t.datetime :last_sign_in_at
|
20
|
+
t.string :current_sign_in_ip
|
21
|
+
t.string :last_sign_in_ip
|
22
|
+
|
23
|
+
## Confirmable
|
24
|
+
# t.string :confirmation_token
|
25
|
+
# t.datetime :confirmed_at
|
26
|
+
# t.datetime :confirmation_sent_at
|
27
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
28
|
+
|
29
|
+
## Lockable
|
30
|
+
# t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
31
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
32
|
+
# t.datetime :locked_at
|
33
|
+
|
34
|
+
## Token authenticatable
|
35
|
+
# t.string :authentication_token
|
36
|
+
|
37
|
+
t.string :first_name
|
38
|
+
t.string :last_name
|
39
|
+
t.string :username
|
40
|
+
t.boolean :active, :default => true
|
41
|
+
|
42
|
+
t.timestamps
|
43
|
+
end
|
44
|
+
|
45
|
+
add_index :simple_user_users, :email, :unique => true
|
46
|
+
add_index :simple_user_users, :reset_password_token, :unique => true
|
47
|
+
# add_index :simple_user_users, :confirmation_token, :unique => true
|
48
|
+
# add_index :simple_user_users, :unlock_token, :unique => true
|
49
|
+
# add_index :simple_user_users, :authentication_token, :unique => true
|
50
|
+
end
|
51
|
+
end
|
data/test/dummy/db/migrate/20130314222447_devise_create_simple_user_admin_users.simple_user.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# This migration comes from simple_user (originally 20130312215519)
|
2
|
+
class DeviseCreateSimpleUserAdminUsers < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table(:simple_user_admin_users) do |t|
|
5
|
+
## Database authenticatable
|
6
|
+
t.string :email, :null => false, :default => ""
|
7
|
+
t.string :encrypted_password, :null => false, :default => ""
|
8
|
+
|
9
|
+
## Recoverable
|
10
|
+
t.string :reset_password_token
|
11
|
+
t.datetime :reset_password_sent_at
|
12
|
+
|
13
|
+
## Rememberable
|
14
|
+
t.datetime :remember_created_at
|
15
|
+
|
16
|
+
## Trackable
|
17
|
+
t.integer :sign_in_count, :default => 0
|
18
|
+
t.datetime :current_sign_in_at
|
19
|
+
t.datetime :last_sign_in_at
|
20
|
+
t.string :current_sign_in_ip
|
21
|
+
t.string :last_sign_in_ip
|
22
|
+
|
23
|
+
## Confirmable
|
24
|
+
# t.string :confirmation_token
|
25
|
+
# t.datetime :confirmed_at
|
26
|
+
# t.datetime :confirmation_sent_at
|
27
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
28
|
+
|
29
|
+
## Lockable
|
30
|
+
# t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
31
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
32
|
+
# t.datetime :locked_at
|
33
|
+
|
34
|
+
## Token authenticatable
|
35
|
+
# t.string :authentication_token
|
36
|
+
|
37
|
+
t.string :username
|
38
|
+
t.boolean :active, :default => true
|
39
|
+
|
40
|
+
t.timestamps
|
41
|
+
end
|
42
|
+
|
43
|
+
add_index :simple_user_admin_users, :email, :unique => true
|
44
|
+
add_index :simple_user_admin_users, :reset_password_token, :unique => true
|
45
|
+
# add_index :simple_user_admin_users, :confirmation_token, :unique => true
|
46
|
+
# add_index :simple_user_admin_users, :unlock_token, :unique => true
|
47
|
+
# add_index :simple_user_admin_users, :authentication_token, :unique => true
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from simple_user (originally 20130312215950)
|
2
|
+
class CreateSimpleUserAuthentications < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :simple_user_authentications do |t|
|
5
|
+
t.string :provider
|
6
|
+
t.string :token
|
7
|
+
t.string :uid
|
8
|
+
t.references :user
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
add_index :simple_user_authentications, :user_id
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This migration comes from simple_user (originally 20130312226960)
|
2
|
+
class RolifyCreateRoles < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table(:roles) do |t|
|
5
|
+
t.string :name
|
6
|
+
t.references :resource, :polymorphic => true
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
create_table(:users_roles, :id => false) do |t|
|
12
|
+
t.references :simple_user_admin_user
|
13
|
+
t.references :role
|
14
|
+
end
|
15
|
+
|
16
|
+
add_index(:roles, :name)
|
17
|
+
add_index(:roles, [ :name, :resource_type, :resource_id ], :name => "roles_n_rt_rid")
|
18
|
+
add_index(:users_roles, [ :simple_user_admin_user_id, :role_id ], :name => "user_role_i_auid_urid")
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20130314021612) do
|
15
|
+
|
16
|
+
create_table "simple_user_admin_users", :force => true do |t|
|
17
|
+
t.string "email", :default => "", :null => false
|
18
|
+
t.string "encrypted_password", :default => "", :null => false
|
19
|
+
t.string "reset_password_token"
|
20
|
+
t.datetime "reset_password_sent_at"
|
21
|
+
t.datetime "remember_created_at"
|
22
|
+
t.integer "sign_in_count", :default => 0
|
23
|
+
t.datetime "current_sign_in_at"
|
24
|
+
t.datetime "last_sign_in_at"
|
25
|
+
t.string "current_sign_in_ip"
|
26
|
+
t.string "last_sign_in_ip"
|
27
|
+
t.string "username"
|
28
|
+
t.boolean "active", :default => true
|
29
|
+
t.datetime "created_at", :null => false
|
30
|
+
t.datetime "updated_at", :null => false
|
31
|
+
end
|
32
|
+
|
33
|
+
add_index "simple_user_admin_users", ["email"], :name => "index_simple_user_admin_users_on_email", :unique => true
|
34
|
+
add_index "simple_user_admin_users", ["reset_password_token"], :name => "index_simple_user_admin_users_on_reset_password_token", :unique => true
|
35
|
+
|
36
|
+
create_table "simple_user_authentications", :force => true do |t|
|
37
|
+
t.string "provider"
|
38
|
+
t.string "token"
|
39
|
+
t.string "uid"
|
40
|
+
t.integer "user_id"
|
41
|
+
t.datetime "created_at", :null => false
|
42
|
+
t.datetime "updated_at", :null => false
|
43
|
+
end
|
44
|
+
|
45
|
+
add_index "simple_user_authentications", ["user_id"], :name => "index_simple_user_authentications_on_user_id"
|
46
|
+
|
47
|
+
create_table "simple_user_roles", :force => true do |t|
|
48
|
+
t.string "name"
|
49
|
+
t.integer "resource_id"
|
50
|
+
t.string "resource_type"
|
51
|
+
t.datetime "created_at", :null => false
|
52
|
+
t.datetime "updated_at", :null => false
|
53
|
+
end
|
54
|
+
|
55
|
+
add_index "simple_user_roles", ["name", "resource_type", "resource_id"], :name => "simple_users_r_n_rt_rid"
|
56
|
+
add_index "simple_user_roles", ["name"], :name => "index_simple_user_roles_on_name"
|
57
|
+
|
58
|
+
create_table "simple_user_users", :force => true do |t|
|
59
|
+
t.string "email", :default => "", :null => false
|
60
|
+
t.string "encrypted_password", :default => "", :null => false
|
61
|
+
t.string "reset_password_token"
|
62
|
+
t.datetime "reset_password_sent_at"
|
63
|
+
t.datetime "remember_created_at"
|
64
|
+
t.integer "sign_in_count", :default => 0
|
65
|
+
t.datetime "current_sign_in_at"
|
66
|
+
t.datetime "last_sign_in_at"
|
67
|
+
t.string "current_sign_in_ip"
|
68
|
+
t.string "last_sign_in_ip"
|
69
|
+
t.string "first_name"
|
70
|
+
t.string "last_name"
|
71
|
+
t.string "username"
|
72
|
+
t.boolean "active", :default => true
|
73
|
+
t.datetime "created_at", :null => false
|
74
|
+
t.datetime "updated_at", :null => false
|
75
|
+
end
|
76
|
+
|
77
|
+
add_index "simple_user_users", ["email"], :name => "index_simple_user_users_on_email", :unique => true
|
78
|
+
add_index "simple_user_users", ["reset_password_token"], :name => "index_simple_user_users_on_reset_password_token", :unique => true
|
79
|
+
|
80
|
+
create_table "simple_user_users_roles", :id => false, :force => true do |t|
|
81
|
+
t.integer "simple_user_admin_user_id"
|
82
|
+
t.integer "simple_user_role_id"
|
83
|
+
end
|
84
|
+
|
85
|
+
add_index "simple_user_users_roles", ["simple_user_admin_user_id", "simple_user_role_id"], :name => "simple_users_ur_i_auid_urid"
|
86
|
+
|
87
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
|
3
|
+
|
4
|
+
Started GET "/" for 127.0.0.1 at 2013-03-13 20:13:39 -0600
|
5
|
+
Processing by WelcomeController#index as HTML
|
6
|
+
Rendered welcome/index.html.erb within layouts/application (86.0ms)
|
7
|
+
Compiled welcome.css (1ms) (pid 3768)
|
8
|
+
Compiled application.css (35ms) (pid 3768)
|
9
|
+
Compiled jquery.js (8ms) (pid 3768)
|
10
|
+
Compiled jquery_ujs.js (1ms) (pid 3768)
|
11
|
+
Compiled simple_user/facebook_connect.js (4ms) (pid 3768)
|
12
|
+
Compiled simple_user/application.js (40ms) (pid 3768)
|
13
|
+
Compiled welcome.js (1ms) (pid 3768)
|
14
|
+
Compiled application.js (452ms) (pid 3768)
|
15
|
+
Rendered application/_menu_users.html.erb (4.5ms)
|
16
|
+
Rendered application/_menu_admin_users.html.erb (5.0ms)
|
17
|
+
Completed 200 OK in 939ms (Views: 937.2ms | ActiveRecord: 0.0ms)
|
18
|
+
|
19
|
+
|
20
|
+
Started GET "/assets/simple_user/facebook_connect.js?body=1" for 127.0.0.1 at 2013-03-13 20:13:41 -0600
|
21
|
+
Served asset /simple_user/facebook_connect.js - 200 OK (13ms)
|
22
|
+
|
23
|
+
|
24
|
+
Started GET "/assets/simple_user/application.js?body=1" for 127.0.0.1 at 2013-03-13 20:13:41 -0600
|
25
|
+
Served asset /simple_user/application.js - 200 OK (29ms)
|
26
|
+
|
27
|
+
|
28
|
+
Started GET "/assets/welcome.css?body=1" for 127.0.0.1 at 2013-03-13 20:13:41 -0600
|
29
|
+
Served asset /welcome.css - 200 OK (16ms)
|
30
|
+
|
31
|
+
|
32
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-03-13 20:13:41 -0600
|
33
|
+
Served asset /application.css - 304 Not Modified (10ms)
|
34
|
+
|
35
|
+
|
36
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2013-03-13 20:13:41 -0600
|
37
|
+
Served asset /jquery.js - 304 Not Modified (8ms)
|
38
|
+
|
39
|
+
|
40
|
+
Started GET "/assets/welcome.js?body=1" for 127.0.0.1 at 2013-03-13 20:13:41 -0600
|
41
|
+
Served asset /welcome.js - 200 OK (84ms)
|
42
|
+
|
43
|
+
|
44
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-03-13 20:13:41 -0600
|
45
|
+
Served asset /application.js - 200 OK (39ms)
|
46
|
+
|
47
|
+
|
48
|
+
Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2013-03-13 20:13:42 -0600
|
49
|
+
Served asset /jquery_ujs.js - 304 Not Modified (6ms)
|
50
|
+
Connecting to database specified by database.yml
|
51
|
+
Connecting to database specified by database.yml
|
52
|
+
[1m[36m (12.8ms)[0m [1mselect sqlite_version(*)[0m
|
53
|
+
[1m[35m (13.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
54
|
+
[1m[36m (6.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
55
|
+
[1m[35m (23.4ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
56
|
+
Migrating to DeviseCreateSimpleUserUsers (20130314021609)
|
57
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
58
|
+
[1m[35m (2.2ms)[0m CREATE TABLE "simple_user_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT 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), "first_name" varchar(255), "last_name" varchar(255), "username" varchar(255), "active" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
59
|
+
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "index_simple_user_users_on_email" ON "simple_user_users" ("email")[0m
|
60
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_simple_user_users_on_reset_password_token" ON "simple_user_users" ("reset_password_token")
|
61
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130314021609')[0m
|
62
|
+
[1m[35m (6.6ms)[0m commit transaction
|
63
|
+
Migrating to DeviseCreateSimpleUserAdminUsers (20130314021610)
|
64
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
65
|
+
[1m[35m (2.2ms)[0m CREATE TABLE "simple_user_admin_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT 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), "username" varchar(255), "active" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
66
|
+
[1m[36m (1.6ms)[0m [1mCREATE UNIQUE INDEX "index_simple_user_admin_users_on_email" ON "simple_user_admin_users" ("email")[0m
|
67
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_simple_user_admin_users_on_reset_password_token" ON "simple_user_admin_users" ("reset_password_token")
|
68
|
+
[1m[36m (1.7ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130314021610')[0m
|
69
|
+
[1m[35m (10.2ms)[0m commit transaction
|
70
|
+
Migrating to CreateSimpleUserAuthentications (20130314021611)
|
71
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
72
|
+
[1m[35m (1.9ms)[0m CREATE TABLE "simple_user_authentications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar(255), "token" varchar(255), "uid" varchar(255), "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
73
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_simple_user_authentications_on_user_id" ON "simple_user_authentications" ("user_id")[0m
|
74
|
+
[1m[35m (1.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20130314021611')
|
75
|
+
[1m[36m (5.3ms)[0m [1mcommit transaction[0m
|
76
|
+
Migrating to RolifyCreateSimpleUserRoles (20130314021612)
|
77
|
+
[1m[35m (0.2ms)[0m begin transaction
|
78
|
+
[1m[36m (2.7ms)[0m [1mCREATE TABLE "simple_user_roles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "resource_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
79
|
+
[1m[35m (7.1ms)[0m CREATE TABLE "simple_user_users_roles" ("simple_user_admin_user_id" integer, "simple_user_role_id" integer)
|
80
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_simple_user_roles_on_name" ON "simple_user_roles" ("name")[0m
|
81
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "simple_users_r_n_rt_rid" ON "simple_user_roles" ("name", "resource_type", "resource_id")
|
82
|
+
[1m[36m (4.9ms)[0m [1mCREATE INDEX "simple_users_ur_i_auid_urid" ON "simple_user_users_roles" ("simple_user_admin_user_id", "simple_user_role_id")[0m
|
83
|
+
[1m[35m (0.5ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20130314021612')
|
84
|
+
[1m[36m (31.5ms)[0m [1mcommit transaction[0m
|
85
|
+
[1m[35m (0.5ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
86
|
+
Connecting to database specified by database.yml
|
87
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
88
|
+
[1m[35mSimpleUser::AdminUser Exists (6.5ms)[0m SELECT 1 AS one FROM "simple_user_admin_users" WHERE "simple_user_admin_users"."email" = 'admin@example.com' LIMIT 1
|
89
|
+
[1m[36mSimpleUser::AdminUser Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "simple_user_admin_users" WHERE "simple_user_admin_users"."email" = 'admin@example.com' LIMIT 1[0m
|
90
|
+
[1m[35mSimpleUser::AdminUser Exists (0.4ms)[0m SELECT 1 AS one FROM "simple_user_admin_users" WHERE "simple_user_admin_users"."username" = 'admin' LIMIT 1
|
91
|
+
Binary data inserted for `string` type on column `encrypted_password`
|
92
|
+
[1m[36mSQL (6.7ms)[0m [1mINSERT INTO "simple_user_admin_users" ("active", "created_at", "current_sign_in_at", "current_sign_in_ip", "email", "encrypted_password", "last_sign_in_at", "last_sign_in_ip", "remember_created_at", "reset_password_sent_at", "reset_password_token", "sign_in_count", "updated_at", "username") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["active", true], ["created_at", Thu, 14 Mar 2013 02:17:47 UTC +00:00], ["current_sign_in_at", nil], ["current_sign_in_ip", nil], ["email", "admin@example.com"], ["encrypted_password", "$2a$10$OSw1HjBt2VP2iskOS2JwQOaQTGBgmm9vgnswiHbt7XyDiDPOPILCu"], ["last_sign_in_at", nil], ["last_sign_in_ip", nil], ["remember_created_at", nil], ["reset_password_sent_at", nil], ["reset_password_token", nil], ["sign_in_count", 0], ["updated_at", Thu, 14 Mar 2013 02:17:47 UTC +00:00], ["username", "admin"]]
|
93
|
+
[1m[35m (6.2ms)[0m commit transaction
|
94
|
+
DEPRECATION WARNING: Calling set_table_name is deprecated. Please use `self.table_name = 'the_name'` instead. (called from <class:Role> at /home/pablomarti89/Projects/RailsApps/3212/simple_user/app/models/role.rb:3)
|
95
|
+
[1m[36mRole Load (0.6ms)[0m [1mSELECT "simple_user_roles".* FROM "simple_user_roles" WHERE "simple_user_roles"."name" = 'admin' AND "simple_user_roles"."resource_type" IS NULL AND "simple_user_roles"."resource_id" IS NULL LIMIT 1[0m
|
96
|
+
[1m[35m (0.2ms)[0m begin transaction
|
97
|
+
[1m[36mSQL (1.6ms)[0m [1mINSERT INTO "simple_user_roles" ("created_at", "name", "resource_id", "resource_type", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", Thu, 14 Mar 2013 02:17:47 UTC +00:00], ["name", "admin"], ["resource_id", nil], ["resource_type", nil], ["updated_at", Thu, 14 Mar 2013 02:17:47 UTC +00:00]]
|
98
|
+
[1m[35m (3.6ms)[0m commit transaction
|
99
|
+
[1m[36m (0.6ms)[0m [1mSELECT "simple_user_roles".id FROM "simple_user_roles" INNER JOIN "simple_user/admin_users_roles" ON "simple_user_roles"."id" = "simple_user/admin_users_roles"."role_id" WHERE "simple_user/admin_users_roles"."admin_user_id" = 1[0m
|
100
|
+
SQLite3::SQLException: no such table: simple_user/admin_users_roles: SELECT "simple_user_roles".id FROM "simple_user_roles" INNER JOIN "simple_user/admin_users_roles" ON "simple_user_roles"."id" = "simple_user/admin_users_roles"."role_id" WHERE "simple_user/admin_users_roles"."admin_user_id" = 1
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|