warden 0.10.6 → 0.10.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/warden/proxy.rb CHANGED
@@ -151,7 +151,7 @@ module Warden
151
151
 
152
152
  opts[:event] ||= :set_user
153
153
  manager._run_callbacks(:after_set_user, user, self, opts)
154
- user
154
+ @users[scope]
155
155
  end
156
156
 
157
157
  # Provides acccess to the user object in a given scope for a request.
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Warden
3
- VERSION = "0.10.6".freeze
3
+ VERSION = "0.10.7".freeze
4
4
  end
@@ -117,6 +117,18 @@ describe "standard authentication hooks" do
117
117
  setup_rack(app).call(env)
118
118
  env['warden.spec.order'].should == [1,2,3]
119
119
  end
120
+
121
+ it "should allow me to log out a user in an after_set_user block" do
122
+ RAM.after_set_user{|u,a,o| a.logout}
123
+
124
+ app = lambda do |e|
125
+ e['warden'].authenticate(:pass)
126
+ valid_response
127
+ end
128
+ env = env_with_params
129
+ setup_rack(app).call(env)
130
+ env['warden'].authenticated?.should be_false
131
+ end
120
132
  end
121
133
 
122
134
  context "after_fetch" do
data/warden.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{warden}
8
- s.version = "0.10.6"
8
+ s.version = "0.10.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Daniel Neighman"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warden
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 57
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 10
9
- - 6
10
- version: 0.10.6
9
+ - 7
10
+ version: 0.10.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Neighman