devise_g5_authenticatable 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +25 -0
- data/Gemfile +23 -0
- data/LICENSE +20 -0
- data/README.md +243 -0
- data/Rakefile +20 -0
- data/app/controllers/devise_g5_authenticatable/registrations_controller.rb +5 -0
- data/app/controllers/devise_g5_authenticatable/sessions_controller.rb +58 -0
- data/circle.yml +4 -0
- data/config/initializers/devise_g5_authenticatable.rb +3 -0
- data/config/locales/en.yml +6 -0
- data/devise_g5_authenticatable.gemspec +24 -0
- data/lib/devise_g5_authenticatable.rb +16 -0
- data/lib/devise_g5_authenticatable/controllers/helpers.rb +37 -0
- data/lib/devise_g5_authenticatable/controllers/url_helpers.rb +13 -0
- data/lib/devise_g5_authenticatable/engine.rb +11 -0
- data/lib/devise_g5_authenticatable/g5.rb +4 -0
- data/lib/devise_g5_authenticatable/g5/auth_password_validator.rb +30 -0
- data/lib/devise_g5_authenticatable/g5/auth_user_creator.rb +48 -0
- data/lib/devise_g5_authenticatable/g5/auth_user_updater.rb +43 -0
- data/lib/devise_g5_authenticatable/g5/user_exporter.rb +61 -0
- data/lib/devise_g5_authenticatable/models/g5_authenticatable.rb +99 -0
- data/lib/devise_g5_authenticatable/models/protected_attributes.rb +16 -0
- data/lib/devise_g5_authenticatable/omniauth.rb +9 -0
- data/lib/devise_g5_authenticatable/routes.rb +58 -0
- data/lib/devise_g5_authenticatable/version.rb +3 -0
- data/lib/tasks/g5/export_users.rake +13 -0
- data/spec/controllers/helpers_spec.rb +295 -0
- data/spec/controllers/sessions_controller_spec.rb +256 -0
- data/spec/controllers/url_helpers_spec.rb +332 -0
- data/spec/dummy/.gitignore +15 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/images/rails.png +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/javascripts/custom_sessions.js +2 -0
- data/spec/dummy/app/assets/javascripts/home.js +2 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/assets/stylesheets/custom_sessions.css +4 -0
- data/spec/dummy/app/assets/stylesheets/home.css +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/custom_registrations_controllers.rb +2 -0
- data/spec/dummy/app/controllers/custom_sessions_controller.rb +2 -0
- data/spec/dummy/app/controllers/home_controller.rb +4 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/helpers/custom_sessions_helper.rb +2 -0
- data/spec/dummy/app/helpers/home_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/admin.rb +3 -0
- data/spec/dummy/app/models/user.rb +10 -0
- data/spec/dummy/app/views/anonymous/new.html.erb +0 -0
- data/spec/dummy/app/views/home/index.html.erb +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +16 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +64 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml.ci +6 -0
- data/spec/dummy/config/database.yml.sample +13 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +39 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/devise.rb +259 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/devise.en.yml +60 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +70 -0
- data/spec/dummy/db/migrate/20131230235849_devise_create_users.rb +42 -0
- data/spec/dummy/db/migrate/20140102213131_drop_database_authenticatable.rb +16 -0
- data/spec/dummy/db/migrate/20140103032308_drop_recoverable.rb +16 -0
- data/spec/dummy/db/migrate/20140103042329_drop_rememberable.rb +13 -0
- data/spec/dummy/db/migrate/20140103174810_add_omniauth_columns_to_users.rb +18 -0
- data/spec/dummy/db/migrate/20140103191601_add_email_back_to_user.rb +8 -0
- data/spec/dummy/db/migrate/20140113202948_devise_create_admins.rb +42 -0
- data/spec/dummy/db/migrate/20140113233821_add_provider_and_uid_to_admins.rb +8 -0
- data/spec/dummy/db/schema.rb +50 -0
- data/spec/dummy/db/seeds.rb +7 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/lib/tasks/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/robots.txt +5 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/vendor/assets/javascripts/.gitkeep +0 -0
- data/spec/dummy/vendor/assets/stylesheets/.gitkeep +0 -0
- data/spec/dummy/vendor/plugins/.gitkeep +0 -0
- data/spec/factories/admin.rb +10 -0
- data/spec/factories/user.rb +10 -0
- data/spec/features/edit_registration_spec.rb +109 -0
- data/spec/features/registration_spec.rb +99 -0
- data/spec/features/sign_in_spec.rb +91 -0
- data/spec/features/sign_out_spec.rb +7 -0
- data/spec/g5/auth_password_validator_spec.rb +81 -0
- data/spec/g5/auth_user_creator_spec.rb +100 -0
- data/spec/g5/auth_user_updater_spec.rb +113 -0
- data/spec/g5/user_exporter_spec.rb +105 -0
- data/spec/models/g5_authenticatable_spec.rb +540 -0
- data/spec/models/protected_attributes_spec.rb +17 -0
- data/spec/routing/registrations_routing_spec.rb +107 -0
- data/spec/routing/sessions_routing_spec.rb +111 -0
- data/spec/spec_helper.rb +44 -0
- data/spec/support/devise.rb +3 -0
- data/spec/support/omniauth.rb +3 -0
- data/spec/support/shared_contexts/oauth_error.rb +9 -0
- data/spec/support/shared_contexts/rake.rb +21 -0
- data/spec/support/shared_examples/registration_error.rb +15 -0
- data/spec/support/user_feature_methods.rb +26 -0
- data/spec/tasks/export_users_spec.rb +90 -0
- metadata +293 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = '647a56085c4f52cc5e906029f424ff1fa1d118d66800fb131b28c7ef7467f379f253ec847cc15af0036a8c55a4c547c9ef73d09d17bf00f9ecbd6823e90edbae'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
+
|
3
|
+
en:
|
4
|
+
devise:
|
5
|
+
confirmations:
|
6
|
+
confirmed: "Your account was successfully confirmed."
|
7
|
+
confirmed_and_signed_in: "Your account was successfully confirmed. You are now signed in."
|
8
|
+
send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
|
9
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
|
10
|
+
failure:
|
11
|
+
already_authenticated: "You are already signed in."
|
12
|
+
inactive: "Your account is not activated yet."
|
13
|
+
invalid: "Invalid email or password."
|
14
|
+
invalid_token: "Invalid authentication token."
|
15
|
+
locked: "Your account is locked."
|
16
|
+
not_found_in_database: "Invalid email or password."
|
17
|
+
timeout: "Your session expired. Please sign in again to continue."
|
18
|
+
unauthenticated: "You need to sign in or sign up before continuing."
|
19
|
+
unconfirmed: "You have to confirm your account before continuing."
|
20
|
+
mailer:
|
21
|
+
confirmation_instructions:
|
22
|
+
subject: "Confirmation instructions"
|
23
|
+
reset_password_instructions:
|
24
|
+
subject: "Reset password instructions"
|
25
|
+
unlock_instructions:
|
26
|
+
subject: "Unlock Instructions"
|
27
|
+
omniauth_callbacks:
|
28
|
+
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
29
|
+
success: "Successfully authenticated from %{kind} account."
|
30
|
+
passwords:
|
31
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
32
|
+
send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
|
33
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
34
|
+
updated: "Your password was changed successfully. You are now signed in."
|
35
|
+
updated_not_active: "Your password was changed successfully."
|
36
|
+
registrations:
|
37
|
+
destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
|
38
|
+
signed_up: "Welcome! You have signed up successfully."
|
39
|
+
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
40
|
+
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
41
|
+
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
|
42
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
|
43
|
+
updated: "You updated your account successfully."
|
44
|
+
sessions:
|
45
|
+
signed_in: "Signed in successfully."
|
46
|
+
signed_out: "Signed out successfully."
|
47
|
+
unlocks:
|
48
|
+
send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
|
49
|
+
send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
|
50
|
+
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
51
|
+
errors:
|
52
|
+
messages:
|
53
|
+
already_confirmed: "was already confirmed, please try signing in"
|
54
|
+
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
55
|
+
expired: "has expired, please request a new one"
|
56
|
+
not_found: "not found"
|
57
|
+
not_locked: "was not locked"
|
58
|
+
not_saved:
|
59
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
60
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|
@@ -0,0 +1,70 @@
|
|
1
|
+
Dummy::Application.routes.draw do
|
2
|
+
devise_for :users
|
3
|
+
|
4
|
+
devise_for :admins,
|
5
|
+
path_prefix: 'registered',
|
6
|
+
controllers: {sessions: 'custom_sessions',
|
7
|
+
registrations: 'custom_registrations'},
|
8
|
+
path_names: {sign_in: 'custom_sign_in',
|
9
|
+
sign_out: 'custom_sign_out',
|
10
|
+
sign_up: 'custom_sign_up',
|
11
|
+
cancel: 'custom_cancel'}
|
12
|
+
|
13
|
+
root to: 'home#index'
|
14
|
+
# The priority is based upon order of creation:
|
15
|
+
# first created -> highest priority.
|
16
|
+
|
17
|
+
# Sample of regular route:
|
18
|
+
# match 'products/:id' => 'catalog#view'
|
19
|
+
# Keep in mind you can assign values other than :controller and :action
|
20
|
+
|
21
|
+
# Sample of named route:
|
22
|
+
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
23
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
24
|
+
|
25
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
26
|
+
# resources :products
|
27
|
+
|
28
|
+
# Sample resource route with options:
|
29
|
+
# resources :products do
|
30
|
+
# member do
|
31
|
+
# get 'short'
|
32
|
+
# post 'toggle'
|
33
|
+
# end
|
34
|
+
#
|
35
|
+
# collection do
|
36
|
+
# get 'sold'
|
37
|
+
# end
|
38
|
+
# end
|
39
|
+
|
40
|
+
# Sample resource route with sub-resources:
|
41
|
+
# resources :products do
|
42
|
+
# resources :comments, :sales
|
43
|
+
# resource :seller
|
44
|
+
# end
|
45
|
+
|
46
|
+
# Sample resource route with more complex sub-resources
|
47
|
+
# resources :products do
|
48
|
+
# resources :comments
|
49
|
+
# resources :sales do
|
50
|
+
# get 'recent', :on => :collection
|
51
|
+
# end
|
52
|
+
# end
|
53
|
+
|
54
|
+
# Sample resource route within a namespace:
|
55
|
+
# namespace :admin do
|
56
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
57
|
+
# # (app/controllers/admin/products_controller.rb)
|
58
|
+
# resources :products
|
59
|
+
# end
|
60
|
+
|
61
|
+
# You can have the root of your site routed with "root"
|
62
|
+
# just remember to delete public/index.html.
|
63
|
+
# root :to => 'welcome#index'
|
64
|
+
|
65
|
+
# See how all your routes lay out with "rake routes"
|
66
|
+
|
67
|
+
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
68
|
+
# Note: This route will make all actions in every controller accessible via GET requests.
|
69
|
+
# match ':controller(/:action(/:id))(.:format)'
|
70
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
class DeviseCreateUsers < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table(:users) do |t|
|
4
|
+
## Database authenticatable
|
5
|
+
t.string :email, :null => false, :default => ""
|
6
|
+
t.string :encrypted_password, :null => false, :default => ""
|
7
|
+
|
8
|
+
## Recoverable
|
9
|
+
t.string :reset_password_token
|
10
|
+
t.datetime :reset_password_sent_at
|
11
|
+
|
12
|
+
## Rememberable
|
13
|
+
t.datetime :remember_created_at
|
14
|
+
|
15
|
+
## Trackable
|
16
|
+
t.integer :sign_in_count, :default => 0, :null => false
|
17
|
+
t.datetime :current_sign_in_at
|
18
|
+
t.datetime :last_sign_in_at
|
19
|
+
t.string :current_sign_in_ip
|
20
|
+
t.string :last_sign_in_ip
|
21
|
+
|
22
|
+
## Confirmable
|
23
|
+
# t.string :confirmation_token
|
24
|
+
# t.datetime :confirmed_at
|
25
|
+
# t.datetime :confirmation_sent_at
|
26
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
27
|
+
|
28
|
+
## Lockable
|
29
|
+
# t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts
|
30
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
31
|
+
# t.datetime :locked_at
|
32
|
+
|
33
|
+
|
34
|
+
t.timestamps
|
35
|
+
end
|
36
|
+
|
37
|
+
add_index :users, :email, :unique => true
|
38
|
+
add_index :users, :reset_password_token, :unique => true
|
39
|
+
# add_index :users, :confirmation_token, :unique => true
|
40
|
+
# add_index :users, :unlock_token, :unique => true
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class DropDatabaseAuthenticatable < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
change_table(:users) do |t|
|
4
|
+
t.remove :email
|
5
|
+
t.remove :encrypted_password
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
change_table(:users) do |t|
|
11
|
+
t.string :email, null: false, default: ''
|
12
|
+
t.string :encrypted_password, null: false, default: ''
|
13
|
+
t.index :email, unique: true
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class DropRecoverable < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
change_table(:users) do |t|
|
4
|
+
t.remove :reset_password_token
|
5
|
+
t.remove :reset_password_sent_at
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
change_table(:users) do |t|
|
11
|
+
t.string :reset_password_token
|
12
|
+
t.datetime :reset_password_sent_at
|
13
|
+
t.index :reset_password_token, unique: true
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class AddOmniauthColumnsToUsers < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
change_table(:users) do |t|
|
4
|
+
t.string :uid
|
5
|
+
t.string :provider
|
6
|
+
t.string :g5_access_token
|
7
|
+
t.index [:provider, :uid], unique: true
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def down
|
12
|
+
change_table(:users) do |t|
|
13
|
+
t.remove :uid
|
14
|
+
t.remove :provider
|
15
|
+
t.remove :g5_access_token
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
class DeviseCreateAdmins < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table(:admins) do |t|
|
4
|
+
## Database authenticatable
|
5
|
+
t.string :email, :null => false, :default => ""
|
6
|
+
# t.string :encrypted_password, :null => false, :default => ""
|
7
|
+
|
8
|
+
## Recoverable
|
9
|
+
# t.string :reset_password_token
|
10
|
+
# t.datetime :reset_password_sent_at
|
11
|
+
|
12
|
+
## Rememberable
|
13
|
+
# t.datetime :remember_created_at
|
14
|
+
|
15
|
+
## Trackable
|
16
|
+
t.integer :sign_in_count, :default => 0, :null => false
|
17
|
+
t.datetime :current_sign_in_at
|
18
|
+
t.datetime :last_sign_in_at
|
19
|
+
t.string :current_sign_in_ip
|
20
|
+
t.string :last_sign_in_ip
|
21
|
+
|
22
|
+
## Confirmable
|
23
|
+
# t.string :confirmation_token
|
24
|
+
# t.datetime :confirmed_at
|
25
|
+
# t.datetime :confirmation_sent_at
|
26
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
27
|
+
|
28
|
+
## Lockable
|
29
|
+
# t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts
|
30
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
31
|
+
# t.datetime :locked_at
|
32
|
+
|
33
|
+
|
34
|
+
t.timestamps
|
35
|
+
end
|
36
|
+
|
37
|
+
add_index :admins, :email, :unique => true
|
38
|
+
# add_index :admins, :reset_password_token, :unique => true
|
39
|
+
# add_index :admins, :confirmation_token, :unique => true
|
40
|
+
# add_index :admins, :unlock_token, :unique => true
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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 => 20140113233821) do
|
15
|
+
|
16
|
+
create_table "admins", :force => true do |t|
|
17
|
+
t.string "email", :default => "", :null => false
|
18
|
+
t.integer "sign_in_count", :default => 0, :null => false
|
19
|
+
t.datetime "current_sign_in_at"
|
20
|
+
t.datetime "last_sign_in_at"
|
21
|
+
t.string "current_sign_in_ip"
|
22
|
+
t.string "last_sign_in_ip"
|
23
|
+
t.datetime "created_at", :null => false
|
24
|
+
t.datetime "updated_at", :null => false
|
25
|
+
t.string "provider"
|
26
|
+
t.string "uid"
|
27
|
+
t.string "g5_access_token"
|
28
|
+
end
|
29
|
+
|
30
|
+
add_index "admins", ["email"], :name => "index_admins_on_email", :unique => true
|
31
|
+
add_index "admins", ["provider", "uid"], :name => "index_admins_on_provider_and_uid", :unique => true
|
32
|
+
|
33
|
+
create_table "users", :force => true do |t|
|
34
|
+
t.integer "sign_in_count", :default => 0, :null => false
|
35
|
+
t.datetime "current_sign_in_at"
|
36
|
+
t.datetime "last_sign_in_at"
|
37
|
+
t.string "current_sign_in_ip"
|
38
|
+
t.string "last_sign_in_ip"
|
39
|
+
t.datetime "created_at", :null => false
|
40
|
+
t.datetime "updated_at", :null => false
|
41
|
+
t.string "uid"
|
42
|
+
t.string "provider"
|
43
|
+
t.string "g5_access_token"
|
44
|
+
t.string "email", :default => "", :null => false
|
45
|
+
end
|
46
|
+
|
47
|
+
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
48
|
+
add_index "users", ["provider", "uid"], :name => "index_users_on_provider_and_uid", :unique => true
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
+
#
|
4
|
+
# Examples:
|
5
|
+
#
|
6
|
+
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
7
|
+
# Mayor.create(name: 'Emanuel', city: cities.first)
|
File without changes
|
File without changes
|
File without changes
|