devise-authy 1.7.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +5 -13
  2. data/.travis.yml +4 -0
  3. data/Gemfile +29 -13
  4. data/README.md +8 -6
  5. data/VERSION +1 -1
  6. data/app/controllers/devise/devise_authy_controller.rb +3 -3
  7. data/authy-devise-demo/Gemfile +39 -28
  8. data/authy-devise-demo/Gemfile.lock +166 -113
  9. data/authy-devise-demo/README.md +1 -1
  10. data/authy-devise-demo/app/controllers/welcome_controller.rb +2 -2
  11. data/authy-devise-demo/app/models/admin.rb +0 -3
  12. data/authy-devise-demo/app/models/user.rb +0 -3
  13. data/authy-devise-demo/config/application.rb +5 -41
  14. data/authy-devise-demo/config/environments/development.rb +21 -17
  15. data/authy-devise-demo/config/environments/production.rb +45 -33
  16. data/authy-devise-demo/config/environments/test.rb +18 -13
  17. data/authy-devise-demo/config/initializers/session_store.rb +1 -1
  18. data/authy-devise-demo/config/locales/devise.authy.en.yml +4 -4
  19. data/authy-devise-demo/config/secrets.yml +22 -0
  20. data/authy-devise-demo/db/migrate/20160906221739_add_sessions_table.rb +12 -0
  21. data/authy-devise-demo/db/schema.rb +32 -22
  22. data/config/locales/en.yml +4 -4
  23. data/devise-authy.gemspec +44 -47
  24. data/lib/devise-authy/controllers/helpers.rb +1 -1
  25. data/lib/devise-authy/controllers/view_helpers.rb +8 -2
  26. data/lib/devise-authy/mapping.rb +3 -7
  27. data/lib/devise-authy/models/authy_authenticatable.rb +1 -1
  28. data/lib/devise-authy/rails.rb +1 -1
  29. data/lib/generators/devise_authy/install_generator.rb +7 -0
  30. data/spec/controllers/devise_authy_controller_spec.rb +61 -60
  31. data/spec/controllers/passwords_controller_spec.rb +15 -15
  32. data/spec/features/authy_authenticatable_spec.rb +23 -23
  33. data/spec/features/authy_lockable_spec.rb +6 -6
  34. data/spec/generators_spec.rb +11 -9
  35. data/spec/models/authy_authenticatable_spec.rb +3 -3
  36. data/spec/models/authy_lockable_spec.rb +7 -7
  37. data/spec/rails-app/Gemfile +4 -3
  38. data/spec/rails-app/Gemfile.lock +116 -91
  39. data/spec/rails-app/app/controllers/welcome_controller.rb +1 -1
  40. data/spec/rails-app/app/models/user.rb +0 -3
  41. data/spec/rails-app/config/application.rb +15 -34
  42. data/spec/rails-app/config/environments/development.rb +21 -17
  43. data/spec/rails-app/config/environments/production.rb +45 -33
  44. data/spec/rails-app/config/environments/test.rb +18 -13
  45. data/spec/rails-app/config/secrets.yml +22 -0
  46. data/spec/routing/routes_spec.rb +7 -7
  47. data/spec/spec_helper.rb +17 -0
  48. data/spec/support/helpers.rb +3 -1
  49. metadata +34 -59
  50. data/Gemfile.lock +0 -194
@@ -37,7 +37,7 @@
37
37
 
38
38
  8. Edit `app/controllers/welcome_controller.rb` and add:
39
39
 
40
- before_filter :authenticate_user!
40
+ before_action :authenticate_user!
41
41
 
42
42
 
43
43
  9. Edit `app/views/welcome/index.html.erb` and add:
@@ -1,6 +1,6 @@
1
1
  class WelcomeController < ApplicationController
2
- before_filter :authenticate_user!, only: "user_page"
3
- before_filter :authenticate_admin!, only: "admin_page"
2
+ before_action :authenticate_user!, only: "user_page"
3
+ before_action :authenticate_admin!, only: "admin_page"
4
4
 
5
5
  def index
6
6
  redirect_to welcome_admin_page_path if current_admin
@@ -4,7 +4,4 @@ class Admin < ActiveRecord::Base
4
4
  # :lockable, :timeoutable and :omniauthable
5
5
  devise :authy_authenticatable, :authy_lockable, :database_authenticatable, :registerable,
6
6
  :recoverable, :rememberable, :trackable, :validatable, :lockable
7
-
8
- # Setup accessible (or protected) attributes for your model
9
- attr_accessible :authy_id, :last_sign_in_with_authy, :email, :password, :password_confirmation, :remember_me
10
7
  end
@@ -4,7 +4,4 @@ class User < ActiveRecord::Base
4
4
  # :lockable, :timeoutable and :omniauthable
5
5
  devise :database_authenticatable, :registerable,
6
6
  :recoverable, :rememberable, :trackable, :validatable, :lockable
7
-
8
- # Setup accessible (or protected) attributes for your model
9
- attr_accessible :email, :password, :password_confirmation, :remember_me
10
7
  end
@@ -2,12 +2,9 @@ require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
4
 
5
- if defined?(Bundler)
6
- # If you precompile assets before deploying to production, use this line
7
- Bundler.require(*Rails.groups(:assets => %w(development test)))
8
- # If you want your assets lazily compiled in production, use this line
9
- # Bundler.require(:default, :assets, Rails.env)
10
- end
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(*Rails.groups)
11
8
 
12
9
  module AuthyDeviseDemo
13
10
  class Application < Rails::Application
@@ -15,16 +12,6 @@ module AuthyDeviseDemo
15
12
  # Application configuration should go into files in config/initializers
16
13
  # -- all .rb files in that directory are automatically loaded.
17
14
 
18
- # Custom directories with classes and modules you want to be autoloadable.
19
- # config.autoload_paths += %W(#{config.root}/extras)
20
-
21
- # Only load the plugins named here, in the order given (default is alphabetical).
22
- # :all can be used as a placeholder for all plugins not explicitly named.
23
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
24
-
25
- # Activate observers that should always be running.
26
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
27
-
28
15
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
29
16
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
30
17
  # config.time_zone = 'Central Time (US & Canada)'
@@ -33,30 +20,7 @@ module AuthyDeviseDemo
33
20
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
34
21
  # config.i18n.default_locale = :de
35
22
 
36
- # Configure the default encoding used in templates for Ruby 1.9.
37
- config.encoding = "utf-8"
38
-
39
- # Configure sensitive parameters which will be filtered from the log file.
40
- config.filter_parameters += [:password]
41
-
42
- # Enable escaping HTML in JSON.
43
- config.active_support.escape_html_entities_in_json = true
44
-
45
- # Use SQL instead of Active Record's schema dumper when creating the database.
46
- # This is necessary if your schema can't be completely dumped by the schema dumper,
47
- # like if you have constraints or database-specific column types
48
- # config.active_record.schema_format = :sql
49
-
50
- # Enforce whitelist mode for mass assignment.
51
- # This will create an empty whitelist of attributes available for mass-assignment for all models
52
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
53
- # parameters by using an attr_accessible or attr_protected declaration.
54
- config.active_record.whitelist_attributes = true
55
-
56
- # Enable the asset pipeline
57
- config.assets.enabled = true
58
-
59
- # Version of your assets, change this if you want to expire all your assets
60
- config.assets.version = '1.0'
23
+ # Do not swallow errors in after_commit/after_rollback callbacks.
24
+ config.active_record.raise_in_transactional_callbacks = true
61
25
  end
62
26
  end
@@ -1,39 +1,43 @@
1
1
  AuthyDeviseDemo::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
5
5
  # every request. This slows down response time but is perfect for development
6
6
  # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
11
 
12
- # Show full error reports and disable caching
12
+ # Show full error reports and disable caching.
13
13
  config.consider_all_requests_local = true
14
14
  config.action_controller.perform_caching = false
15
15
 
16
- # Don't care if the mailer can't send
16
+ # Don't care if the mailer can't send.
17
17
  config.action_mailer.raise_delivery_errors = false
18
18
 
19
- # Print deprecation notices to the Rails logger
19
+ # Print deprecation notices to the Rails logger.
20
20
  config.active_support.deprecation = :log
21
21
 
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
27
29
 
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
30
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
+ # yet still be able to expire them through the digest params.
32
+ config.assets.digest = true
31
33
 
32
- # Do not compress assets
33
- config.assets.compress = false
34
+ # Adds additional error checking when serving assets at runtime.
35
+ # Checks for improperly declared sprockets dependencies.
36
+ # Raises helpful error messages.
37
+ config.assets.raise_runtime_errors = true
34
38
 
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
39
+ # Raises error for missing translations
40
+ # config.action_view.raise_on_missing_translations = true
37
41
 
38
42
  config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
39
43
  end
@@ -1,67 +1,79 @@
1
1
  AuthyDeviseDemo::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
- # Code is not reloaded between requests
4
+ # Code is not reloaded between requests.
5
5
  config.cache_classes = true
6
6
 
7
- # Full error reports are disabled and caching is turned on
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
8
14
  config.consider_all_requests_local = false
9
15
  config.action_controller.perform_caching = true
10
16
 
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like
20
+ # NGINX, varnish or squid.
21
+ # config.action_dispatch.rack_cache = true
22
+
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
13
26
 
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
16
30
 
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
18
32
  config.assets.compile = false
19
33
 
20
- # Generate digests for assets URLs
34
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
+ # yet still be able to expire them through the digest params.
21
36
  config.assets.digest = true
22
37
 
23
- # Defaults to nil and saved in location specified by config.assets.prefix
24
- # config.assets.manifest = YOUR_PATH
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
25
39
 
26
- # Specifies the header that your server uses for sending files
27
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
40
+ # Specifies the header that your server uses for sending files.
41
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
29
43
 
30
44
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
45
  # config.force_ssl = true
32
46
 
33
- # See everything in the log (default is :info)
34
- # config.log_level = :debug
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
35
50
 
36
- # Prepend all log lines with the following tags
51
+ # Prepend all log lines with the following tags.
37
52
  # config.log_tags = [ :subdomain, :uuid ]
38
53
 
39
- # Use a different logger for distributed setups
54
+ # Use a different logger for distributed setups.
40
55
  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
56
 
42
- # Use a different cache store in production
57
+ # Use a different cache store in production.
43
58
  # config.cache_store = :mem_cache_store
44
59
 
45
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
- # config.action_controller.asset_host = "http://assets.example.com"
47
-
48
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
- # config.assets.precompile += %w( search.js )
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
50
62
 
51
- # Disable delivery errors, bad email addresses will be ignored
63
+ # Ignore bad email addresses and do not raise email delivery errors.
64
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
52
65
  # config.action_mailer.raise_delivery_errors = false
53
66
 
54
- # Enable threaded mode
55
- # config.threadsafe!
56
-
57
67
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
- # the I18n.default_locale when a translation can not be found)
68
+ # the I18n.default_locale when a translation cannot be found).
59
69
  config.i18n.fallbacks = true
60
70
 
61
- # Send deprecation notices to registered listeners
71
+ # Send deprecation notices to registered listeners.
62
72
  config.active_support.deprecation = :notify
63
73
 
64
- # Log the query plan for queries taking more than this (works
65
- # with SQLite, MySQL, and PostgreSQL)
66
- # config.active_record.auto_explain_threshold_in_seconds = 0.5
74
+ # Use default logging formatter so that PID and timestamp are not suppressed.
75
+ config.log_formatter = ::Logger::Formatter.new
76
+
77
+ # Do not dump schema after migrations.
78
+ config.active_record.dump_schema_after_migration = false
67
79
  end
@@ -1,5 +1,5 @@
1
1
  AuthyDeviseDemo::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # The test environment is used exclusively to run your application's
5
5
  # test suite. You never need to work with it otherwise. Remember that
@@ -7,31 +7,36 @@ AuthyDeviseDemo::Application.configure do
7
7
  # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
9
 
10
- # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_assets = true
12
- config.static_cache_control = "public, max-age=3600"
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
13
14
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = 'public, max-age=3600'
16
18
 
17
- # Show full error reports and disable caching
19
+ # Show full error reports and disable caching.
18
20
  config.consider_all_requests_local = true
19
21
  config.action_controller.perform_caching = false
20
22
 
21
- # Raise exceptions instead of rendering exception templates
23
+ # Raise exceptions instead of rendering exception templates.
22
24
  config.action_dispatch.show_exceptions = false
23
25
 
24
- # Disable request forgery protection in test environment
25
- config.action_controller.allow_forgery_protection = false
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
26
28
 
27
29
  # Tell Action Mailer not to deliver emails to the real world.
28
30
  # The :test delivery method accumulates sent emails in the
29
31
  # ActionMailer::Base.deliveries array.
30
32
  config.action_mailer.delivery_method = :test
31
33
 
32
- # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
34
+ # Randomize the order test cases are executed.
35
+ config.active_support.test_order = :random
34
36
 
35
- # Print deprecation notices to the stderr
37
+ # Print deprecation notices to the stderr.
36
38
  config.active_support.deprecation = :stderr
39
+
40
+ # Raises error for missing translations
41
+ # config.action_view.raise_on_missing_translations = true
37
42
  end
@@ -1,6 +1,6 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- AuthyDeviseDemo::Application.config.session_store :cookie_store, key: '_authy-devise-demo_session'
3
+ AuthyDeviseDemo::Application.config.session_store :active_record_store, :key => '_my_app_session'
4
4
 
5
5
  # Use the database for sessions instead of the cookie-based default,
6
6
  # which shouldn't be used to store highly confidential information
@@ -1,7 +1,7 @@
1
1
  en:
2
2
  devise:
3
- submit_token: "Check Token"
4
- submit_token_title: "Please enter your Authy token:"
3
+ submit_token: 'Check Token'
4
+ submit_token_title: 'Please enter your Authy token:'
5
5
  authy_register_title: 'Enable Two factor authentication'
6
6
  enable_authy: 'Enable'
7
7
  cellphone: 'Enter your cellphone'
@@ -10,7 +10,7 @@ en:
10
10
  request_phone_call: 'Request phone call'
11
11
  remember_device: 'Remember Device'
12
12
 
13
- authy_verify_installation_title: "Verify your account"
13
+ authy_verify_installation_title: 'Verify your account'
14
14
  enable_my_account: 'Enable my account'
15
15
 
16
16
  devise_authy:
@@ -20,5 +20,5 @@ en:
20
20
  disabled: 'Two factor authentication was disabled'
21
21
  not_disabled: 'Something went wrong while disabling two factor authentication'
22
22
  signed_in: 'Signed in with Authy successfully.'
23
- already_enabled: "Two factor authentication is already enabled."
23
+ already_enabled: 'Two factor authentication is already enabled.'
24
24
  invalid_token: 'The entered token is invalid'
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: 48cb81d1fc128524d6f560261d71ed58c50d82faf6cac54fb4860ea66549826c7d03fb748e466d25dc8bbb09a9a570963c155f5004e08d03f09f16851359d981
15
+
16
+ test:
17
+ secret_key_base: 59b24997aac1cc4ac9b807b5075f7fcbc59c49aa2fecda9dab34daecbc4423b7fe2d536b55c7063f0880625c864fe742e510502a2b1d08c9156ce928d2d2de18
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,12 @@
1
+ class AddSessionsTable < ActiveRecord::Migration
2
+ def change
3
+ create_table :sessions do |t|
4
+ t.string :session_id, :null => false
5
+ t.text :data
6
+ t.timestamps
7
+ end
8
+
9
+ add_index :sessions, :session_id, :unique => true
10
+ add_index :sessions, :updated_at
11
+ end
12
+ end
@@ -9,54 +9,64 @@
9
9
  # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
10
  # you'll amass, the slower it'll run and the greater likelihood for issues).
11
11
  #
12
- # It's strongly recommended to check this file into your version control system.
12
+ # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20141202004246) do
14
+ ActiveRecord::Schema.define(version: 20160906221739) do
15
15
 
16
- create_table "admins", :force => true do |t|
17
- t.string "email", :default => "", :null => false
18
- t.string "encrypted_password", :default => "", :null => false
16
+ create_table "admins", force: :cascade do |t|
17
+ t.string "email", default: "", null: false
18
+ t.string "encrypted_password", default: "", null: false
19
19
  t.string "reset_password_token"
20
20
  t.datetime "reset_password_sent_at"
21
21
  t.datetime "remember_created_at"
22
- t.integer "sign_in_count", :default => 0
22
+ t.integer "sign_in_count", default: 0
23
23
  t.datetime "current_sign_in_at"
24
24
  t.datetime "last_sign_in_at"
25
25
  t.string "current_sign_in_ip"
26
26
  t.string "last_sign_in_ip"
27
- t.datetime "created_at", :null => false
28
- t.datetime "updated_at", :null => false
27
+ t.datetime "created_at"
28
+ t.datetime "updated_at"
29
29
  t.string "authy_id"
30
30
  t.datetime "last_sign_in_with_authy"
31
- t.boolean "authy_enabled", :default => false
32
- t.integer "failed_attempts", :default => 0
31
+ t.boolean "authy_enabled", default: false
32
+ t.integer "failed_attempts", default: 0
33
33
  t.string "unlock_token"
34
34
  t.datetime "locked_at"
35
35
  end
36
36
 
37
- add_index "admins", ["authy_id"], :name => "index_admins_on_authy_id"
38
- add_index "admins", ["email"], :name => "index_admins_on_email", :unique => true
39
- add_index "admins", ["reset_password_token"], :name => "index_admins_on_reset_password_token", :unique => true
37
+ add_index "admins", ["authy_id"], name: "index_admins_on_authy_id"
38
+ add_index "admins", ["email"], name: "index_admins_on_email", unique: true
39
+ add_index "admins", ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true
40
40
 
41
- create_table "users", :force => true do |t|
42
- t.string "email", :default => "", :null => false
43
- t.string "encrypted_password", :default => "", :null => false
41
+ create_table "sessions", force: :cascade do |t|
42
+ t.string "session_id", null: false
43
+ t.text "data"
44
+ t.datetime "created_at"
45
+ t.datetime "updated_at"
46
+ end
47
+
48
+ add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", unique: true
49
+ add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at"
50
+
51
+ create_table "users", force: :cascade do |t|
52
+ t.string "email", default: "", null: false
53
+ t.string "encrypted_password", default: "", null: false
44
54
  t.string "reset_password_token"
45
55
  t.datetime "reset_password_sent_at"
46
56
  t.datetime "remember_created_at"
47
- t.integer "sign_in_count", :default => 0
57
+ t.integer "sign_in_count", default: 0
48
58
  t.datetime "current_sign_in_at"
49
59
  t.datetime "last_sign_in_at"
50
60
  t.string "current_sign_in_ip"
51
61
  t.string "last_sign_in_ip"
52
- t.integer "failed_attempts", :default => 0
62
+ t.integer "failed_attempts", default: 0
53
63
  t.string "unlock_token"
54
64
  t.datetime "locked_at"
55
- t.datetime "created_at", :null => false
56
- t.datetime "updated_at", :null => false
65
+ t.datetime "created_at"
66
+ t.datetime "updated_at"
57
67
  end
58
68
 
59
- add_index "users", ["email"], :name => "index_users_on_email", :unique => true
60
- add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
69
+ add_index "users", ["email"], name: "index_users_on_email", unique: true
70
+ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
61
71
 
62
72
  end