mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Remove deprecations, bump to .dev and update template.
This commit is contained in:
parent
da510508bb
commit
73669e09c8
7 changed files with 7 additions and 53 deletions
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
devise (1.2.rc2)
|
||||
devise (1.2.0)
|
||||
bcrypt-ruby (~> 2.1.2)
|
||||
orm_adapter (~> 0.0.3)
|
||||
warden (~> 1.0.3)
|
||||
|
|
|
@ -238,12 +238,6 @@ module Devise
|
|||
omniauth_configs.keys
|
||||
end
|
||||
|
||||
def self.cookie_domain=(value)
|
||||
ActiveSupport::Deprecation.warn "Devise.cookie_domain=(value) is deprecated. "
|
||||
"Please use Devise.cookie_options = { :domain => value } instead."
|
||||
self.cookie_options[:domain] = value
|
||||
end
|
||||
|
||||
# Get the mailer class from the mailer reference object.
|
||||
def self.mailer
|
||||
if defined?(ActiveSupport::Dependencies::ClassCache)
|
||||
|
|
|
@ -80,12 +80,6 @@ module Devise
|
|||
end
|
||||
end
|
||||
|
||||
def anybody_signed_in?
|
||||
ActiveSupport::Deprecation.warn "Devise#anybody_signed_in? is deprecated. "
|
||||
"Please use Devise#signed_in?(nil) instead."
|
||||
signed_in?
|
||||
end
|
||||
|
||||
# Sign in a user that already was authenticated. This helper is useful for logging
|
||||
# users in after sign up.
|
||||
#
|
||||
|
|
|
@ -65,20 +65,8 @@ module Devise
|
|||
end
|
||||
end
|
||||
|
||||
def active?
|
||||
ActiveSupport::Deprecation.warn "[DEVISE] active? is deprecated, please use active_for_authentication? instead.", caller
|
||||
active_for_authentication?
|
||||
end
|
||||
|
||||
def active_for_authentication?
|
||||
my_methods = self.class.instance_methods(false)
|
||||
if my_methods.include?("active?") || my_methods.include?(:active?)
|
||||
ActiveSupport::Deprecation.warn "[DEVISE] Overriding active? is deprecated to avoid conflicts. " \
|
||||
"Please use active_for_authentication? instead.", caller
|
||||
active?
|
||||
else
|
||||
true
|
||||
end
|
||||
true
|
||||
end
|
||||
|
||||
def inactive_message
|
||||
|
|
|
@ -17,14 +17,6 @@ module Devise
|
|||
Devise.include_helpers(Devise::Controllers)
|
||||
end
|
||||
|
||||
initializer "devise.navigationals" do
|
||||
formats = Devise.navigational_formats
|
||||
if formats.include?(:"*/*") && formats.exclude?("*/*")
|
||||
puts "[DEVISE] We see the symbol :\"*/*\" in the navigational formats in your initializer " \
|
||||
"but not the string \"*/*\". Due to changes in latest Rails, please include the latter."
|
||||
end
|
||||
end
|
||||
|
||||
initializer "devise.omniauth" do |app|
|
||||
Devise.omniauth_configs.each do |provider, config|
|
||||
app.middleware.use config.strategy_class, *config.args do |strategy|
|
||||
|
@ -36,23 +28,5 @@ module Devise
|
|||
Devise.include_helpers(Devise::OmniAuth)
|
||||
end
|
||||
end
|
||||
|
||||
initializer "devise.encryptor_check" do
|
||||
case Devise.encryptor
|
||||
when :bcrypt
|
||||
puts "[DEVISE] From version 1.2, there is no need to set your encryptor to bcrypt " \
|
||||
"since encryptors are only enabled if you include :encryptable in your models. " \
|
||||
"With this change, we can integrate better with bcrypt and get rid of the " \
|
||||
"password_salt column (since bcrypt stores the salt with password). " \
|
||||
"Please comment config.encryptor in your initializer to get rid of this warning."
|
||||
when nil
|
||||
# Nothing to say
|
||||
else
|
||||
puts "[DEVISE] You are using #{Devise.encryptor} as encryptor. From version 1.2, " \
|
||||
"you need to explicitly add `devise :encryptable, :encryptor => :#{Devise.encryptor}` " \
|
||||
"to your models and comment the current value in the config/initializers/devise.rb. " \
|
||||
"You must also add t.encryptable to your existing migrations."
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module Devise
|
||||
VERSION = "1.2.0".freeze
|
||||
VERSION = "1.3.0.dev".freeze
|
||||
end
|
||||
|
|
|
@ -82,6 +82,10 @@ Devise.setup do |config|
|
|||
# to false if you are not using database authenticatable.
|
||||
config.use_salt_as_remember_token = true
|
||||
|
||||
# Options to be passed to the created cookie. For instance, you can set
|
||||
# :secure => true in order to force SSL only cookies.
|
||||
# config.cookie_options = {}
|
||||
|
||||
# ==> Configuration for :validatable
|
||||
# Range for password length. Default is 6..20.
|
||||
# config.password_length = 6..20
|
||||
|
|
Loading…
Reference in a new issue