devise 0.5.4 → 0.5.5

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.

@@ -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
 
@@ -126,7 +126,7 @@ module Devise
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
 
@@ -1,3 +1,3 @@
1
1
  module Devise
2
- VERSION = "0.5.4".freeze
2
+ VERSION = "0.5.5".freeze
3
3
  end
@@ -149,6 +149,11 @@ class ControllerAuthenticableTest < ActionController::TestCase
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Jos\xC3\xA9 Valim"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-11-19 00:00:00 -02:00
13
+ date: 2009-11-20 00:00:00 -02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -120,45 +120,45 @@ signing_key:
120
120
  specification_version: 3
121
121
  summary: Flexible authentication solution for Rails with Warden
122
122
  test_files:
123
- - test/controllers/filters_test.rb
124
- - test/controllers/helpers_test.rb
125
- - test/controllers/url_helpers_test.rb
126
- - test/models/validatable_test.rb
127
- - test/models/rememberable_test.rb
128
- - test/models/confirmable_test.rb
129
- - test/models/recoverable_test.rb
130
- - test/models/authenticatable_test.rb
131
- - test/integration/rememberable_test.rb
132
- - test/integration/confirmable_test.rb
133
- - test/integration/recoverable_test.rb
134
- - test/integration/authenticatable_test.rb
135
- - test/test_helper.rb
136
- - test/test_helpers_test.rb
137
- - test/encryptors_test.rb
138
- - test/mailers/reset_password_instructions_test.rb
139
- - test/mailers/confirmation_instructions_test.rb
140
- - test/routes_test.rb
141
- - test/devise_test.rb
142
- - test/failure_app_test.rb
143
- - test/rails_app/app/controllers/admins_controller.rb
144
- - test/rails_app/app/controllers/home_controller.rb
145
- - test/rails_app/app/controllers/users_controller.rb
146
- - test/rails_app/app/controllers/application_controller.rb
147
- - test/rails_app/app/models/account.rb
148
- - test/rails_app/app/models/user.rb
149
- - test/rails_app/app/models/admin.rb
150
- - test/rails_app/app/models/organizer.rb
151
- - test/rails_app/app/helpers/application_helper.rb
152
123
  - test/rails_app/config/boot.rb
153
- - test/rails_app/config/environments/production.rb
124
+ - test/rails_app/config/routes.rb
154
125
  - test/rails_app/config/environments/development.rb
126
+ - test/rails_app/config/environments/production.rb
155
127
  - test/rails_app/config/environments/test.rb
156
- - test/rails_app/config/initializers/new_rails_defaults.rb
157
- - test/rails_app/config/initializers/session_store.rb
158
- - test/rails_app/config/routes.rb
159
128
  - test/rails_app/config/environment.rb
160
- - test/mapping_test.rb
129
+ - test/rails_app/config/initializers/session_store.rb
130
+ - test/rails_app/config/initializers/new_rails_defaults.rb
131
+ - test/rails_app/app/controllers/users_controller.rb
132
+ - test/rails_app/app/controllers/application_controller.rb
133
+ - test/rails_app/app/controllers/admins_controller.rb
134
+ - test/rails_app/app/controllers/home_controller.rb
135
+ - test/rails_app/app/helpers/application_helper.rb
136
+ - test/rails_app/app/models/admin.rb
137
+ - test/rails_app/app/models/organizer.rb
138
+ - test/rails_app/app/models/account.rb
139
+ - test/rails_app/app/models/user.rb
140
+ - test/controllers/url_helpers_test.rb
141
+ - test/controllers/helpers_test.rb
142
+ - test/controllers/filters_test.rb
143
+ - test/models_test.rb
144
+ - test/integration/authenticatable_test.rb
145
+ - test/integration/rememberable_test.rb
146
+ - test/integration/recoverable_test.rb
147
+ - test/integration/confirmable_test.rb
148
+ - test/mailers/confirmation_instructions_test.rb
149
+ - test/mailers/reset_password_instructions_test.rb
150
+ - test/models/authenticatable_test.rb
151
+ - test/models/rememberable_test.rb
152
+ - test/models/recoverable_test.rb
153
+ - test/models/validatable_test.rb
154
+ - test/models/confirmable_test.rb
155
+ - test/encryptors_test.rb
161
156
  - test/support/model_tests_helper.rb
162
157
  - test/support/assertions_helper.rb
163
158
  - test/support/integration_tests_helper.rb
164
- - test/models_test.rb
159
+ - test/failure_app_test.rb
160
+ - test/devise_test.rb
161
+ - test/routes_test.rb
162
+ - test/test_helper.rb
163
+ - test/test_helpers_test.rb
164
+ - test/mapping_test.rb