Skip to content
This repository
Browse code

Release Devise 0.5.5 bringing back Ruby 1.8.6 compatibility.

  • Loading branch information...
commit eb335234d414d282b31d189eb4b574f47b2515e2 1 parent 3cee549
José Valim josevalim authored
7 CHANGELOG.rdoc
Source Rendered
... ... @@ -1,3 +1,9 @@
  1 +== 0.5.5
  2 +
  3 +* enhancements
  4 + * Allow overwriting find for authentication method
  5 + * [#38] Remove Ruby 1.8.7 dependency
  6 +
1 7 == 0.5.4
2 8
3 9 * deprecations
@@ -8,7 +14,6 @@
8 14 overwriten in ApplicationController
9 15 * Create sign_in_and_redirect and sign_out_and_redirect helpers
10 16 * Warden::Manager.default_scope is automatically configured to the first given scope
11   - * Allow overwriting find for authentication method
12 17
13 18 == 0.5.3
14 19
2  lib/devise/controllers/filters.rb
@@ -126,7 +126,7 @@ def after_sign_out_path_for(resource_or_scope)
126 126 # If just a symbol is given, consider that the user was already signed in
127 127 # through other means and just perform the redirection.
128 128 def sign_in_and_redirect(*args)
129   - sign_in(*args) unless args.one? && args.first.is_a?(Symbol)
  129 + sign_in(*args) unless args.size == 1 && args.first.is_a?(Symbol)
130 130 redirect_to stored_location_for(args.first) || after_sign_in_path_for(args.first)
131 131 end
132 132
2  lib/devise/version.rb
... ... @@ -1,3 +1,3 @@
1 1 module Devise
2   - VERSION = "0.5.4".freeze
  2 + VERSION = "0.5.5".freeze
3 3 end
5 test/controllers/filters_test.rb
@@ -149,6 +149,11 @@ def setup
149 149 @controller.sign_in_and_redirect(admin)
150 150 end
151 151
  152 + test 'only redirect if just a symbol is given' do
  153 + @controller.expects(:redirect_to).with(admin_root_path)
  154 + @controller.sign_in_and_redirect(:admin)
  155 + end
  156 +
152 157 test 'sign out and redirect uses the configured after sign out path' do
153 158 @mock_warden.expects(:user).with(:admin).returns(true)
154 159 @mock_warden.expects(:logout).with(:admin).returns(true)

0 comments on commit eb33523

Please sign in to comment.
Something went wrong with that request. Please try again.