devise 1.3.3 → 1.3.4
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.
- data/CHANGELOG.rdoc +5 -0
- data/Gemfile.lock +1 -1
- data/lib/devise/failure_app.rb +5 -1
- data/lib/devise/version.rb +1 -1
- data/test/failure_app_test.rb +5 -0
- metadata +4 -4
data/CHANGELOG.rdoc
CHANGED
data/Gemfile.lock
CHANGED
data/lib/devise/failure_app.rb
CHANGED
@@ -65,13 +65,17 @@ module Devise
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def redirect_url
|
68
|
-
if
|
68
|
+
if skip_format?
|
69
69
|
send(:"new_#{scope}_session_path")
|
70
70
|
else
|
71
71
|
send(:"new_#{scope}_session_path", :format => request_format)
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
+
def skip_format?
|
76
|
+
%w(html */*).include? request_format.to_s
|
77
|
+
end
|
78
|
+
|
75
79
|
# Choose whether we should respond in a http authentication fashion,
|
76
80
|
# including 401 and optional headers.
|
77
81
|
#
|
data/lib/devise/version.rb
CHANGED
data/test/failure_app_test.rb
CHANGED
@@ -39,6 +39,11 @@ class FailureTest < ActiveSupport::TestCase
|
|
39
39
|
assert_equal 'http://test.host/users/sign_in', @response.second['Location']
|
40
40
|
end
|
41
41
|
|
42
|
+
test 'return to the default redirect location for wildcard requests' do
|
43
|
+
call_failure 'action_dispatch.request.formats' => nil, 'HTTP_ACCEPT' => '*/*'
|
44
|
+
assert_equal 'http://test.host/users/sign_in', @response.second['Location']
|
45
|
+
end
|
46
|
+
|
42
47
|
test 'uses the proxy failure message as symbol' do
|
43
48
|
call_failure('warden' => OpenStruct.new(:message => :test))
|
44
49
|
assert_equal 'test', @request.flash[:alert]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 4
|
10
|
+
version: 1.3.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Jos\xC3\xA9 Valim"
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-04-
|
19
|
+
date: 2011-04-29 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|