Release Devise 0.5.5 bringing back Ruby 1.8.6 compatibility.
This commit is contained in:
parent
3cee549a97
commit
eb335234d4
|
@ -1,3 +1,9 @@
|
||||||
|
== 0.5.5
|
||||||
|
|
||||||
|
* enhancements
|
||||||
|
* Allow overwriting find for authentication method
|
||||||
|
* [#38] Remove Ruby 1.8.7 dependency
|
||||||
|
|
||||||
== 0.5.4
|
== 0.5.4
|
||||||
|
|
||||||
* deprecations
|
* deprecations
|
||||||
|
@ -8,7 +14,6 @@
|
||||||
overwriten in ApplicationController
|
overwriten in ApplicationController
|
||||||
* Create sign_in_and_redirect and sign_out_and_redirect helpers
|
* Create sign_in_and_redirect and sign_out_and_redirect helpers
|
||||||
* Warden::Manager.default_scope is automatically configured to the first given scope
|
* Warden::Manager.default_scope is automatically configured to the first given scope
|
||||||
* Allow overwriting find for authentication method
|
|
||||||
|
|
||||||
== 0.5.3
|
== 0.5.3
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ module Devise
|
||||||
# If just a symbol is given, consider that the user was already signed in
|
# If just a symbol is given, consider that the user was already signed in
|
||||||
# through other means and just perform the redirection.
|
# through other means and just perform the redirection.
|
||||||
def sign_in_and_redirect(*args)
|
def sign_in_and_redirect(*args)
|
||||||
sign_in(*args) unless args.one? && args.first.is_a?(Symbol)
|
sign_in(*args) unless args.size == 1 && args.first.is_a?(Symbol)
|
||||||
redirect_to stored_location_for(args.first) || after_sign_in_path_for(args.first)
|
redirect_to stored_location_for(args.first) || after_sign_in_path_for(args.first)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module Devise
|
module Devise
|
||||||
VERSION = "0.5.4".freeze
|
VERSION = "0.5.5".freeze
|
||||||
end
|
end
|
||||||
|
|
|
@ -149,6 +149,11 @@ class ControllerAuthenticableTest < ActionController::TestCase
|
||||||
@controller.sign_in_and_redirect(admin)
|
@controller.sign_in_and_redirect(admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test 'only redirect if just a symbol is given' do
|
||||||
|
@controller.expects(:redirect_to).with(admin_root_path)
|
||||||
|
@controller.sign_in_and_redirect(:admin)
|
||||||
|
end
|
||||||
|
|
||||||
test 'sign out and redirect uses the configured after sign out path' do
|
test 'sign out and redirect uses the configured after sign out path' do
|
||||||
@mock_warden.expects(:user).with(:admin).returns(true)
|
@mock_warden.expects(:user).with(:admin).returns(true)
|
||||||
@mock_warden.expects(:logout).with(:admin).returns(true)
|
@mock_warden.expects(:logout).with(:admin).returns(true)
|
||||||
|
|
Loading…
Reference in New Issue