merb-auth-core 0.9.13 → 1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@ module Merb
|
|
29
29
|
# end
|
30
30
|
#
|
31
31
|
def ensure_authenticated(*strategies)
|
32
|
-
session.authenticate!(request, params, *strategies) unless session.
|
32
|
+
session.authenticate!(request, params, *strategies) unless session.authenticated?
|
33
33
|
auth = session.authentication
|
34
34
|
if auth.halted?
|
35
35
|
self.headers.merge!(auth.headers)
|
@@ -40,7 +40,8 @@ describe "Merb::AuthenticationHelper" do
|
|
40
40
|
|
41
41
|
it "should run the authentication when testing if it is authenticated" do
|
42
42
|
@controller = ControllerMock.new(fake_request)
|
43
|
-
@controller.session.should_receive(:
|
43
|
+
@controller.session.should_receive(:authenticated?).and_return(false)
|
44
|
+
@controller.session.should_receive(:user).and_return("WINNA")
|
44
45
|
@controller.session.authentication.should_receive(:authenticate!).and_return("WINNA")
|
45
46
|
@controller.send(:ensure_authenticated)
|
46
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-auth-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0
|
4
|
+
version: "1.0"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam French, Daniel Neighman
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-08 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0
|
23
|
+
version: "1.0"
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: extlib
|