devise 4.5.0 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of devise might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/CHANGELOG.md +30 -1
- data/MIT-LICENSE +1 -1
- data/README.md +18 -0
- data/app/controllers/devise/passwords_controller.rb +1 -0
- data/app/controllers/devise/registrations_controller.rb +25 -7
- data/app/helpers/devise_helper.rb +10 -19
- data/app/views/devise/confirmations/new.html.erb +1 -1
- data/app/views/devise/passwords/edit.html.erb +1 -1
- data/app/views/devise/passwords/new.html.erb +1 -1
- data/app/views/devise/registrations/edit.html.erb +1 -1
- data/app/views/devise/registrations/new.html.erb +1 -1
- data/app/views/devise/sessions/new.html.erb +2 -2
- data/app/views/devise/shared/_error_messages.html.erb +15 -0
- data/app/views/devise/shared/_links.html.erb +7 -7
- data/app/views/devise/unlocks/new.html.erb +1 -1
- data/config/locales/en.yml +1 -0
- data/lib/devise.rb +4 -0
- data/lib/devise/controllers/helpers.rb +1 -1
- data/lib/devise/failure_app.rb +28 -3
- data/lib/devise/models/authenticatable.rb +7 -15
- data/lib/devise/models/confirmable.rb +4 -1
- data/lib/devise/models/database_authenticatable.rb +41 -6
- data/lib/devise/models/lockable.rb +2 -2
- data/lib/devise/models/registerable.rb +2 -0
- data/lib/devise/strategies/database_authenticatable.rb +3 -0
- data/lib/devise/test/controller_helpers.rb +1 -1
- data/lib/devise/version.rb +1 -1
- data/lib/generators/active_record/devise_generator.rb +4 -4
- data/lib/generators/devise/controllers_generator.rb +1 -1
- data/lib/generators/templates/devise.rb +12 -3
- data/lib/generators/templates/simple_form_for/registrations/edit.html.erb +1 -1
- data/lib/generators/templates/simple_form_for/registrations/new.html.erb +1 -1
- metadata +5 -305
- data/.gitignore +0 -10
- data/.travis.yml +0 -69
- data/.yardopts +0 -9
- data/CODE_OF_CONDUCT.md +0 -22
- data/CONTRIBUTING.md +0 -79
- data/Gemfile +0 -39
- data/Gemfile.lock +0 -202
- data/ISSUE_TEMPLATE.md +0 -19
- data/Rakefile +0 -37
- data/bin/test +0 -13
- data/devise.gemspec +0 -28
- data/devise.png +0 -0
- data/gemfiles/Gemfile.rails-4.1-stable +0 -32
- data/gemfiles/Gemfile.rails-4.1-stable.lock +0 -171
- data/gemfiles/Gemfile.rails-4.2-stable +0 -32
- data/gemfiles/Gemfile.rails-4.2-stable.lock +0 -192
- data/gemfiles/Gemfile.rails-5.0-stable +0 -33
- data/gemfiles/Gemfile.rails-5.0-stable.lock +0 -192
- data/gemfiles/Gemfile.rails-5.2-rc1 +0 -26
- data/gemfiles/Gemfile.rails-5.2-rc1.lock +0 -201
- data/guides/bug_report_templates/integration_test.rb +0 -106
- data/test/controllers/custom_registrations_controller_test.rb +0 -42
- data/test/controllers/custom_strategy_test.rb +0 -66
- data/test/controllers/helper_methods_test.rb +0 -24
- data/test/controllers/helpers_test.rb +0 -318
- data/test/controllers/inherited_controller_i18n_messages_test.rb +0 -53
- data/test/controllers/internal_helpers_test.rb +0 -129
- data/test/controllers/load_hooks_controller_test.rb +0 -21
- data/test/controllers/passwords_controller_test.rb +0 -34
- data/test/controllers/sessions_controller_test.rb +0 -108
- data/test/controllers/url_helpers_test.rb +0 -67
- data/test/delegator_test.rb +0 -21
- data/test/devise_test.rb +0 -109
- data/test/failure_app_test.rb +0 -346
- data/test/generators/active_record_generator_test.rb +0 -130
- data/test/generators/controllers_generator_test.rb +0 -50
- data/test/generators/devise_generator_test.rb +0 -41
- data/test/generators/install_generator_test.rb +0 -26
- data/test/generators/mongoid_generator_test.rb +0 -25
- data/test/generators/views_generator_test.rb +0 -105
- data/test/helpers/devise_helper_test.rb +0 -51
- data/test/integration/authenticatable_test.rb +0 -706
- data/test/integration/confirmable_test.rb +0 -326
- data/test/integration/database_authenticatable_test.rb +0 -110
- data/test/integration/http_authenticatable_test.rb +0 -114
- data/test/integration/lockable_test.rb +0 -242
- data/test/integration/mounted_engine_test.rb +0 -38
- data/test/integration/omniauthable_test.rb +0 -148
- data/test/integration/recoverable_test.rb +0 -349
- data/test/integration/registerable_test.rb +0 -365
- data/test/integration/rememberable_test.rb +0 -219
- data/test/integration/timeoutable_test.rb +0 -186
- data/test/integration/trackable_test.rb +0 -99
- data/test/mailers/confirmation_instructions_test.rb +0 -117
- data/test/mailers/email_changed_test.rb +0 -132
- data/test/mailers/mailer_test.rb +0 -20
- data/test/mailers/reset_password_instructions_test.rb +0 -98
- data/test/mailers/unlock_instructions_test.rb +0 -93
- data/test/mapping_test.rb +0 -136
- data/test/models/authenticatable_test.rb +0 -25
- data/test/models/confirmable_test.rb +0 -549
- data/test/models/database_authenticatable_test.rb +0 -290
- data/test/models/lockable_test.rb +0 -352
- data/test/models/omniauthable_test.rb +0 -9
- data/test/models/recoverable_test.rb +0 -263
- data/test/models/registerable_test.rb +0 -9
- data/test/models/rememberable_test.rb +0 -184
- data/test/models/serializable_test.rb +0 -60
- data/test/models/timeoutable_test.rb +0 -53
- data/test/models/trackable_test.rb +0 -80
- data/test/models/validatable_test.rb +0 -121
- data/test/models_test.rb +0 -155
- data/test/omniauth/config_test.rb +0 -61
- data/test/omniauth/url_helpers_test.rb +0 -53
- data/test/orm/active_record.rb +0 -24
- data/test/orm/mongoid.rb +0 -15
- data/test/parameter_sanitizer_test.rb +0 -105
- data/test/rails_app/Rakefile +0 -6
- data/test/rails_app/app/active_record/admin.rb +0 -8
- data/test/rails_app/app/active_record/shim.rb +0 -4
- data/test/rails_app/app/active_record/user.rb +0 -20
- data/test/rails_app/app/active_record/user_on_engine.rb +0 -9
- data/test/rails_app/app/active_record/user_on_main_app.rb +0 -9
- data/test/rails_app/app/active_record/user_with_validations.rb +0 -12
- data/test/rails_app/app/active_record/user_without_email.rb +0 -10
- data/test/rails_app/app/controllers/admins/sessions_controller.rb +0 -8
- data/test/rails_app/app/controllers/admins_controller.rb +0 -8
- data/test/rails_app/app/controllers/application_controller.rb +0 -13
- data/test/rails_app/app/controllers/application_with_fake_engine.rb +0 -32
- data/test/rails_app/app/controllers/custom/registrations_controller.rb +0 -33
- data/test/rails_app/app/controllers/home_controller.rb +0 -31
- data/test/rails_app/app/controllers/publisher/registrations_controller.rb +0 -4
- data/test/rails_app/app/controllers/publisher/sessions_controller.rb +0 -4
- data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +0 -16
- data/test/rails_app/app/controllers/users_controller.rb +0 -33
- data/test/rails_app/app/helpers/application_helper.rb +0 -5
- data/test/rails_app/app/mailers/users/from_proc_mailer.rb +0 -5
- data/test/rails_app/app/mailers/users/mailer.rb +0 -5
- data/test/rails_app/app/mailers/users/reply_to_mailer.rb +0 -6
- data/test/rails_app/app/mongoid/admin.rb +0 -31
- data/test/rails_app/app/mongoid/shim.rb +0 -25
- data/test/rails_app/app/mongoid/user.rb +0 -50
- data/test/rails_app/app/mongoid/user_on_engine.rb +0 -41
- data/test/rails_app/app/mongoid/user_on_main_app.rb +0 -41
- data/test/rails_app/app/mongoid/user_with_validations.rb +0 -37
- data/test/rails_app/app/mongoid/user_without_email.rb +0 -35
- data/test/rails_app/app/views/admins/index.html.erb +0 -1
- data/test/rails_app/app/views/admins/sessions/new.html.erb +0 -2
- data/test/rails_app/app/views/home/admin_dashboard.html.erb +0 -1
- data/test/rails_app/app/views/home/index.html.erb +0 -1
- data/test/rails_app/app/views/home/join.html.erb +0 -1
- data/test/rails_app/app/views/home/private.html.erb +0 -1
- data/test/rails_app/app/views/home/user_dashboard.html.erb +0 -1
- data/test/rails_app/app/views/layouts/application.html.erb +0 -24
- data/test/rails_app/app/views/users/edit_form.html.erb +0 -1
- data/test/rails_app/app/views/users/index.html.erb +0 -1
- data/test/rails_app/app/views/users/mailer/confirmation_instructions.erb +0 -1
- data/test/rails_app/app/views/users/sessions/new.html.erb +0 -1
- data/test/rails_app/bin/bundle +0 -3
- data/test/rails_app/bin/rails +0 -4
- data/test/rails_app/bin/rake +0 -4
- data/test/rails_app/config.ru +0 -4
- data/test/rails_app/config/application.rb +0 -48
- data/test/rails_app/config/boot.rb +0 -27
- data/test/rails_app/config/database.yml +0 -18
- data/test/rails_app/config/environment.rb +0 -7
- data/test/rails_app/config/environments/development.rb +0 -32
- data/test/rails_app/config/environments/production.rb +0 -88
- data/test/rails_app/config/environments/test.rb +0 -47
- data/test/rails_app/config/initializers/backtrace_silencers.rb +0 -9
- data/test/rails_app/config/initializers/devise.rb +0 -187
- data/test/rails_app/config/initializers/inflections.rb +0 -4
- data/test/rails_app/config/initializers/secret_token.rb +0 -5
- data/test/rails_app/config/initializers/session_store.rb +0 -3
- data/test/rails_app/config/routes.rb +0 -128
- data/test/rails_app/db/migrate/20100401102949_create_tables.rb +0 -77
- data/test/rails_app/db/schema.rb +0 -57
- data/test/rails_app/lib/lazy_load_test_module.rb +0 -5
- data/test/rails_app/lib/shared_admin.rb +0 -23
- data/test/rails_app/lib/shared_user.rb +0 -32
- data/test/rails_app/lib/shared_user_without_email.rb +0 -28
- data/test/rails_app/lib/shared_user_without_omniauth.rb +0 -15
- data/test/rails_app/public/404.html +0 -26
- data/test/rails_app/public/422.html +0 -26
- data/test/rails_app/public/500.html +0 -26
- data/test/rails_app/public/favicon.ico +0 -0
- data/test/rails_test.rb +0 -11
- data/test/routes_test.rb +0 -281
- data/test/secret_key_finder_test.rb +0 -121
- data/test/support/action_controller/record_identifier.rb +0 -12
- data/test/support/assertions.rb +0 -30
- data/test/support/helpers.rb +0 -83
- data/test/support/http_method_compatibility.rb +0 -53
- data/test/support/integration.rb +0 -95
- data/test/support/locale/en.yml +0 -8
- data/test/support/mongoid.yml +0 -6
- data/test/support/webrat/integrations/rails.rb +0 -35
- data/test/test/controller_helpers_test.rb +0 -193
- data/test/test/integration_helpers_test.rb +0 -34
- data/test/test_helper.rb +0 -36
- data/test/test_models.rb +0 -35
@@ -1 +0,0 @@
|
|
1
|
-
<%= @resource.email %>
|
@@ -1 +0,0 @@
|
|
1
|
-
Special user view
|
data/test/rails_app/bin/bundle
DELETED
data/test/rails_app/bin/rails
DELETED
data/test/rails_app/bin/rake
DELETED
data/test/rails_app/config.ru
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require File.expand_path('../boot', __FILE__)
|
4
|
-
|
5
|
-
require "action_controller/railtie"
|
6
|
-
require "action_mailer/railtie"
|
7
|
-
require "rails/test_unit/railtie"
|
8
|
-
|
9
|
-
Bundler.require :default, DEVISE_ORM
|
10
|
-
|
11
|
-
begin
|
12
|
-
require "#{DEVISE_ORM}/railtie"
|
13
|
-
rescue LoadError
|
14
|
-
end
|
15
|
-
|
16
|
-
require "devise"
|
17
|
-
|
18
|
-
module RailsApp
|
19
|
-
class Application < Rails::Application
|
20
|
-
# Add additional load paths for your own custom dirs
|
21
|
-
config.autoload_paths.reject!{ |p| p =~ /\/app\/(\w+)$/ && !%w(controllers helpers mailers views).include?($1) }
|
22
|
-
config.autoload_paths += ["#{config.root}/app/#{DEVISE_ORM}"]
|
23
|
-
|
24
|
-
# Configure generators values. Many other options are available, be sure to check the documentation.
|
25
|
-
# config.generators do |g|
|
26
|
-
# g.orm :active_record
|
27
|
-
# g.template_engine :erb
|
28
|
-
# g.test_framework :test_unit, fixture: true
|
29
|
-
# end
|
30
|
-
|
31
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
32
|
-
config.filter_parameters << :password
|
33
|
-
# config.assets.enabled = false
|
34
|
-
|
35
|
-
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
|
36
|
-
rails_version = Gem::Version.new(Rails.version)
|
37
|
-
if DEVISE_ORM == :active_record &&
|
38
|
-
rails_version >= Gem::Version.new('4.2.0') &&
|
39
|
-
rails_version < Gem::Version.new('5.1.0')
|
40
|
-
config.active_record.raise_in_transactional_callbacks = true
|
41
|
-
end
|
42
|
-
|
43
|
-
# This was used to break devise in some situations
|
44
|
-
config.to_prepare do
|
45
|
-
Devise::SessionsController.layout "application"
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
unless defined?(DEVISE_ORM)
|
4
|
-
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
5
|
-
end
|
6
|
-
|
7
|
-
module Devise
|
8
|
-
module Test
|
9
|
-
# Detection for minor differences between Rails 4 and 5, 5.1, and 5.2 in tests.
|
10
|
-
|
11
|
-
def self.rails52?
|
12
|
-
Rails.version.start_with? '5.2'
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.rails51?
|
16
|
-
Rails.version.start_with? '5.1'
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.rails5?
|
20
|
-
Rails.version.start_with? '5'
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
# Set up gems listed in the Gemfile.
|
26
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
|
27
|
-
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3-ruby (not necessary on OS X Leopard)
|
3
|
-
development:
|
4
|
-
adapter: sqlite3
|
5
|
-
database: db/development.sqlite3
|
6
|
-
pool: 5
|
7
|
-
timeout: 5000
|
8
|
-
|
9
|
-
# Warning: The database defined as "test" will be erased and
|
10
|
-
# re-generated from your development database when you run "rake".
|
11
|
-
# Do not set this db to the same as development or production.
|
12
|
-
test:
|
13
|
-
adapter: sqlite3
|
14
|
-
database: ":memory:"
|
15
|
-
|
16
|
-
production:
|
17
|
-
adapter: sqlite3
|
18
|
-
database: ":memory:"
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RailsApp::Application.configure do
|
4
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
-
|
6
|
-
# In the development environment your application's code is reloaded on
|
7
|
-
# every request. This slows down response time but is perfect for development
|
8
|
-
# since you don't have to restart the web server when you make code changes.
|
9
|
-
config.cache_classes = false
|
10
|
-
|
11
|
-
# Do not eager load code on boot.
|
12
|
-
config.eager_load = false
|
13
|
-
|
14
|
-
# Show full error reports and disable caching.
|
15
|
-
config.consider_all_requests_local = true
|
16
|
-
config.action_controller.perform_caching = false
|
17
|
-
|
18
|
-
# Don't care if the mailer can't send.
|
19
|
-
config.action_mailer.raise_delivery_errors = false
|
20
|
-
|
21
|
-
# Print deprecation notices to the Rails logger.
|
22
|
-
config.active_support.deprecation = :log
|
23
|
-
|
24
|
-
# Only use best-standards-support built into browsers.
|
25
|
-
config.action_dispatch.best_standards_support = :builtin
|
26
|
-
|
27
|
-
# Raise an error on page load if there are pending migrations
|
28
|
-
config.active_record.migration_error = :page_load
|
29
|
-
|
30
|
-
# Debug mode disables concatenation and preprocessing of assets.
|
31
|
-
config.assets.debug = true
|
32
|
-
end
|
@@ -1,88 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RailsApp::Application.configure do
|
4
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
-
|
6
|
-
# Code is not reloaded between requests.
|
7
|
-
config.cache_classes = true
|
8
|
-
|
9
|
-
# Eager load code on boot. This eager loads most of Rails and
|
10
|
-
# your application in memory, allowing both thread web servers
|
11
|
-
# and those relying on copy on write to perform better.
|
12
|
-
# Rake tasks automatically ignore this option for performance.
|
13
|
-
config.eager_load = true
|
14
|
-
|
15
|
-
# Full error reports are disabled and caching is turned on.
|
16
|
-
config.consider_all_requests_local = false
|
17
|
-
config.action_controller.perform_caching = true
|
18
|
-
|
19
|
-
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
20
|
-
# Add `rack-cache` to your Gemfile before enabling this.
|
21
|
-
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
22
|
-
# config.action_dispatch.rack_cache = true
|
23
|
-
|
24
|
-
# Disable Rails's static asset server (Apache or nginx will already do this).
|
25
|
-
if Rails.version >= "5.0.0"
|
26
|
-
config.public_file_server.enabled = false
|
27
|
-
elsif Rails.version >= "4.2.0"
|
28
|
-
config.serve_static_files = false
|
29
|
-
else
|
30
|
-
config.serve_static_assets = false
|
31
|
-
end
|
32
|
-
|
33
|
-
# Compress JavaScripts and CSS.
|
34
|
-
config.assets.js_compressor = :uglifier
|
35
|
-
# config.assets.css_compressor = :sass
|
36
|
-
|
37
|
-
# Whether to fallback to assets pipeline if a precompiled asset is missed.
|
38
|
-
config.assets.compile = false
|
39
|
-
|
40
|
-
# Generate digests for assets URLs.
|
41
|
-
config.assets.digest = true
|
42
|
-
|
43
|
-
# Version of your assets, change this if you want to expire all your assets.
|
44
|
-
config.assets.version = '1.0'
|
45
|
-
|
46
|
-
# Specifies the header that your server uses for sending files.
|
47
|
-
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
48
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
49
|
-
|
50
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
51
|
-
# config.force_ssl = true
|
52
|
-
|
53
|
-
# Set to :debug to see everything in the log.
|
54
|
-
config.log_level = :info
|
55
|
-
|
56
|
-
# Prepend all log lines with the following tags.
|
57
|
-
# config.log_tags = [:subdomain, :uuid]
|
58
|
-
|
59
|
-
# Use a different logger for distributed setups.
|
60
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
61
|
-
|
62
|
-
# Use a different cache store in production.
|
63
|
-
# config.cache_store = :mem_cache_store
|
64
|
-
|
65
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
66
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
67
|
-
|
68
|
-
# Precompile additional assets.
|
69
|
-
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
70
|
-
# config.assets.precompile += %w( search.js )
|
71
|
-
|
72
|
-
# Ignore bad email addresses and do not raise email delivery errors.
|
73
|
-
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
74
|
-
# config.action_mailer.raise_delivery_errors = false
|
75
|
-
|
76
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
77
|
-
# the I18n.default_locale when a translation can not be found).
|
78
|
-
config.i18n.fallbacks = true
|
79
|
-
|
80
|
-
# Send deprecation notices to registered listeners.
|
81
|
-
config.active_support.deprecation = :notify
|
82
|
-
|
83
|
-
# Disable automatic flushing of the log to improve performance.
|
84
|
-
# config.autoflush_log = false
|
85
|
-
|
86
|
-
# Use default logging formatter so that PID and timestamp are not suppressed.
|
87
|
-
config.log_formatter = ::Logger::Formatter.new
|
88
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RailsApp::Application.configure do
|
4
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
-
|
6
|
-
# The test environment is used exclusively to run your application's
|
7
|
-
# test suite. You never need to work with it otherwise. Remember that
|
8
|
-
# your test database is "scratch space" for the test suite and is wiped
|
9
|
-
# and recreated between test runs. Don't rely on the data there!
|
10
|
-
config.cache_classes = true
|
11
|
-
|
12
|
-
# Do not eager load code on boot. This avoids loading your whole application
|
13
|
-
# just for the purpose of running a single test. If you are using a tool that
|
14
|
-
# preloads Rails for running tests, you may have to set it to true.
|
15
|
-
config.eager_load = false
|
16
|
-
|
17
|
-
# Disable serving static files from the `/public` folder by default since
|
18
|
-
# Apache or NGINX already handles this.
|
19
|
-
if Rails.version >= "5.0.0"
|
20
|
-
config.public_file_server.enabled = true
|
21
|
-
config.public_file_server.headers = {'Cache-Control' => 'public, max-age=3600'}
|
22
|
-
elsif Rails.version >= "4.2.0"
|
23
|
-
config.serve_static_files = true
|
24
|
-
config.static_cache_control = "public, max-age=3600"
|
25
|
-
else
|
26
|
-
config.serve_static_assets = true
|
27
|
-
config.static_cache_control = "public, max-age=3600"
|
28
|
-
end
|
29
|
-
|
30
|
-
# Show full error reports and disable caching.
|
31
|
-
config.consider_all_requests_local = true
|
32
|
-
config.action_controller.perform_caching = false
|
33
|
-
|
34
|
-
# Raise exceptions instead of rendering exception templates.
|
35
|
-
config.action_dispatch.show_exceptions = false
|
36
|
-
|
37
|
-
# Disable request forgery protection in test environment.
|
38
|
-
config.action_controller.allow_forgery_protection = false
|
39
|
-
|
40
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
41
|
-
# The :test delivery method accumulates sent emails in the
|
42
|
-
# ActionMailer::Base.deliveries array.
|
43
|
-
config.action_mailer.delivery_method = :test
|
44
|
-
|
45
|
-
# Print deprecation notices to the stderr.
|
46
|
-
config.active_support.deprecation = :stderr
|
47
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Be sure to restart your server when you modify this file.
|
4
|
-
|
5
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
6
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
7
|
-
|
8
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
9
|
-
Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,187 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "omniauth-facebook"
|
4
|
-
require "omniauth-openid"
|
5
|
-
|
6
|
-
# Use this hook to configure devise mailer, warden hooks and so forth. The first
|
7
|
-
# four configuration values can also be set straight in your models.
|
8
|
-
Devise.setup do |config|
|
9
|
-
config.secret_key = "d9eb5171c59a4c817f68b0de27b8c1e340c2341b52cdbc60d3083d4e8958532" \
|
10
|
-
"18dcc5f589cafde048faec956b61f864b9b5513ff9ce29bf9e5d58b0f234f8e3b"
|
11
|
-
|
12
|
-
# ==> Mailer Configuration
|
13
|
-
# Configure the e-mail address which will be shown in Devise::Mailer,
|
14
|
-
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
15
|
-
config.mailer_sender = "please-change-me@config-initializers-devise.com"
|
16
|
-
|
17
|
-
|
18
|
-
config.parent_controller = "ApplicationWithFakeEngine"
|
19
|
-
# Configure the class responsible to send e-mails.
|
20
|
-
# config.mailer = "Devise::Mailer"
|
21
|
-
|
22
|
-
# ==> ORM configuration
|
23
|
-
# Load and configure the ORM. Supports :active_record (default) and
|
24
|
-
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
25
|
-
# available as additional gems.
|
26
|
-
require "devise/orm/#{DEVISE_ORM}"
|
27
|
-
|
28
|
-
# ==> Configuration for any authentication mechanism
|
29
|
-
# Configure which keys are used when authenticating a user. By default is
|
30
|
-
# just :email. You can configure it to use [:username, :subdomain], so for
|
31
|
-
# authenticating a user, both parameters are required. Remember that those
|
32
|
-
# parameters are used only when authenticating and not when retrieving from
|
33
|
-
# session. If you need permissions, you should implement that in a before filter.
|
34
|
-
# You can also supply hash where the value is a boolean expliciting if authentication
|
35
|
-
# should be aborted or not if the value is not present. By default is empty.
|
36
|
-
# config.authentication_keys = [:email]
|
37
|
-
|
38
|
-
# Configure parameters from the request object used for authentication. Each entry
|
39
|
-
# given should be a request method and it will automatically be passed to
|
40
|
-
# find_for_authentication method and considered in your model lookup. For instance,
|
41
|
-
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
42
|
-
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
43
|
-
# config.request_keys = []
|
44
|
-
|
45
|
-
# Configure which authentication keys should be case-insensitive.
|
46
|
-
# These keys will be downcased upon creating or modifying a user and when used
|
47
|
-
# to authenticate or find a user. Default is :email.
|
48
|
-
config.case_insensitive_keys = [:email]
|
49
|
-
|
50
|
-
# Configure which authentication keys should have whitespace stripped.
|
51
|
-
# These keys will have whitespace before and after removed upon creating or
|
52
|
-
# modifying a user and when used to authenticate or find a user. Default is :email.
|
53
|
-
config.strip_whitespace_keys = [:email]
|
54
|
-
|
55
|
-
# Tell if authentication through request.params is enabled. True by default.
|
56
|
-
# config.params_authenticatable = true
|
57
|
-
|
58
|
-
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
59
|
-
config.http_authenticatable = true
|
60
|
-
|
61
|
-
# If http headers should be returned for AJAX requests. True by default.
|
62
|
-
# config.http_authenticatable_on_xhr = true
|
63
|
-
|
64
|
-
# The realm used in Http Basic Authentication. "Application" by default.
|
65
|
-
# config.http_authentication_realm = "Application"
|
66
|
-
|
67
|
-
# ==> Configuration for :database_authenticatable
|
68
|
-
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
69
|
-
# using other encryptors, it sets how many times you want the password re-encrypted.
|
70
|
-
config.stretches = Rails.env.test? ? 1 : 10
|
71
|
-
|
72
|
-
# ==> Configuration for :confirmable
|
73
|
-
# The time you want to give your user to confirm their account. During this time
|
74
|
-
# they will be able to access your application without confirming. Default is nil.
|
75
|
-
# When allow_unconfirmed_access_for is zero, the user won't be able to sign in without confirming.
|
76
|
-
# You can use this to let your user access some features of your application
|
77
|
-
# without confirming the account, but blocking it after a certain period
|
78
|
-
# (ie 2 days).
|
79
|
-
# config.allow_unconfirmed_access_for = 2.days
|
80
|
-
|
81
|
-
# Defines which key will be used when confirming an account
|
82
|
-
# config.confirmation_keys = [:email]
|
83
|
-
|
84
|
-
# ==> Configuration for :rememberable
|
85
|
-
# The time the user will be remembered without asking for credentials again.
|
86
|
-
# config.remember_for = 2.weeks
|
87
|
-
|
88
|
-
# If true, extends the user's remember period when remembered via cookie.
|
89
|
-
# config.extend_remember_period = false
|
90
|
-
|
91
|
-
# ==> Configuration for :validatable
|
92
|
-
# Range for password length. Default is 8..72.
|
93
|
-
# config.password_length = 8..72
|
94
|
-
|
95
|
-
# Regex to use to validate the email address
|
96
|
-
# config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
|
97
|
-
|
98
|
-
# ==> Configuration for :timeoutable
|
99
|
-
# The time you want to timeout the user session without activity. After this
|
100
|
-
# time the user will be asked for credentials again. Default is 30 minutes.
|
101
|
-
# config.timeout_in = 30.minutes
|
102
|
-
|
103
|
-
# ==> Configuration for :lockable
|
104
|
-
# Defines which strategy will be used to lock an account.
|
105
|
-
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
106
|
-
# :none = No lock strategy. You should handle locking by yourself.
|
107
|
-
# config.lock_strategy = :failed_attempts
|
108
|
-
|
109
|
-
# Defines which key will be used when locking and unlocking an account
|
110
|
-
# config.unlock_keys = [:email]
|
111
|
-
|
112
|
-
# Defines which strategy will be used to unlock an account.
|
113
|
-
# :email = Sends an unlock link to the user email
|
114
|
-
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
115
|
-
# :both = Enables both strategies
|
116
|
-
# :none = No unlock strategy. You should handle unlocking by yourself.
|
117
|
-
# config.unlock_strategy = :both
|
118
|
-
|
119
|
-
# Number of authentication tries before locking an account if lock_strategy
|
120
|
-
# is failed attempts.
|
121
|
-
# config.maximum_attempts = 20
|
122
|
-
|
123
|
-
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
124
|
-
# config.unlock_in = 1.hour
|
125
|
-
|
126
|
-
# ==> Configuration for :recoverable
|
127
|
-
#
|
128
|
-
# Defines which key will be used when recovering the password for an account
|
129
|
-
# config.reset_password_keys = [:email]
|
130
|
-
|
131
|
-
# Time interval you can reset your password with a reset password key.
|
132
|
-
# Don't put a too small interval or your users won't have the time to
|
133
|
-
# change their passwords.
|
134
|
-
config.reset_password_within = 2.hours
|
135
|
-
|
136
|
-
# When set to false, does not sign a user in automatically after their password is
|
137
|
-
# reset. Defaults to true, so a user is signed in automatically after a reset.
|
138
|
-
# config.sign_in_after_reset_password = true
|
139
|
-
|
140
|
-
# Set up a pepper to generate the encrypted password.
|
141
|
-
config.pepper = "d142367154e5beacca404b1a6a4f8bc52c6fdcfa3ccc3cf8eb49f3458a688ee6ac3b9fae488432a3bfca863b8a90008368a9f3a3dfbe5a962e64b6ab8f3a3a1a"
|
142
|
-
|
143
|
-
# ==> Scopes configuration
|
144
|
-
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
145
|
-
# "users/sessions/new". It's turned off by default because it's slower if you
|
146
|
-
# are using only default views.
|
147
|
-
# config.scoped_views = false
|
148
|
-
|
149
|
-
# Configure the default scope given to Warden. By default it's the first
|
150
|
-
# devise role declared in your routes (usually :user).
|
151
|
-
# config.default_scope = :user
|
152
|
-
|
153
|
-
# Configure sign_out behavior.
|
154
|
-
# Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
|
155
|
-
# The default is true, which means any logout action will sign out all active scopes.
|
156
|
-
# config.sign_out_all_scopes = true
|
157
|
-
|
158
|
-
# ==> Navigation configuration
|
159
|
-
# Lists the formats that should be treated as navigational. Formats like
|
160
|
-
# :html, should redirect to the sign in page when the user does not have
|
161
|
-
# access, but formats like :xml or :json, should return 401.
|
162
|
-
# If you have any extra navigational formats, like :iphone or :mobile, you
|
163
|
-
# should add them to the navigational formats lists. Default is [:html]
|
164
|
-
# config.navigational_formats = [:html, :iphone]
|
165
|
-
|
166
|
-
# The default HTTP method used to sign out a resource. Default is :get.
|
167
|
-
# config.sign_out_via = :get
|
168
|
-
|
169
|
-
# ==> OmniAuth
|
170
|
-
config.omniauth :facebook, 'APP_ID', 'APP_SECRET', scope: 'email,offline_access'
|
171
|
-
config.omniauth :openid
|
172
|
-
config.omniauth :openid, name: 'google', identifier: 'https://www.google.com/accounts/o8/id'
|
173
|
-
|
174
|
-
# ==> Warden configuration
|
175
|
-
# If you want to use other strategies, that are not supported by Devise, or
|
176
|
-
# change the failure app, you can configure them inside the config.warden block.
|
177
|
-
#
|
178
|
-
# config.warden do |manager|
|
179
|
-
# manager.failure_app = AnotherApp
|
180
|
-
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
181
|
-
# end
|
182
|
-
|
183
|
-
ActiveSupport.on_load(:devise_failure_app) do
|
184
|
-
require "lazy_load_test_module"
|
185
|
-
include LazyLoadTestModule
|
186
|
-
end
|
187
|
-
end
|