rails_warden 0.5.1 → 0.5.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
data/lib/rails_warden.rb CHANGED
@@ -64,7 +64,8 @@ module Warden::Mixins::Common
64
64
  end
65
65
 
66
66
  Warden::Manager.before_failure do |env, opts|
67
- action = RailsWarden.unauthenticated_action || "unauthenticated"
67
+ opts ||= {}
68
+ action = opts[:action] || RailsWarden.unauthenticated_action || "unauthenticated"
68
69
  if Rails.respond_to?(:version) && Rails.version >= "3"
69
70
  env['action_dispatch.request.path_parameters'][:action] = action
70
71
  else
@@ -72,12 +73,6 @@ Warden::Manager.before_failure do |env, opts|
72
73
  end
73
74
  end
74
75
 
75
- # Rails needs the action to be passed in with the params
76
- Warden::Manager.before_failure do |env, opts|
77
- env['warden'].request.params["action"] = RailsWarden.unauthenticated_action
78
- end
79
-
80
-
81
76
  if !defined?(Rails::Railtie)
82
77
  Rails.configuration.after_initialize do
83
78
  class ::ActionController::Base
@@ -106,7 +101,7 @@ end
106
101
 
107
102
  class Warden::SessionSerializer
108
103
  def serialize(user)
109
- [user.class, user.id]
104
+ [user.class.name, user.id]
110
105
  end
111
106
 
112
107
  def deserialize(key)
data/rails_warden.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails_warden}
8
- s.version = "0.5.1"
8
+ s.version = "0.5.2"
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"]
12
- s.date = %q{2010-04-21}
12
+ s.date = %q{2010-05-14}
13
13
  s.description = %q{A gem that provides authenitcation via the Warden framework}
14
14
  s.email = %q{has.sox@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -53,9 +53,12 @@ Gem::Specification.new do |s|
53
53
  s.specification_version = 3
54
54
 
55
55
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
56
+ s.add_runtime_dependency(%q<warden>, [">= 0"])
56
57
  else
58
+ s.add_dependency(%q<warden>, [">= 0"])
57
59
  end
58
60
  else
61
+ s.add_dependency(%q<warden>, [">= 0"])
59
62
  end
60
63
  end
61
64
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 1
9
- version: 0.5.1
8
+ - 2
9
+ version: 0.5.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Neighman
@@ -14,10 +14,21 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-21 00:00:00 +10:00
17
+ date: 2010-05-14 00:00:00 +10:00
18
18
  default_executable:
19
- dependencies: []
20
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: warden
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :runtime
31
+ version_requirements: *id001
21
32
  description: A gem that provides authenitcation via the Warden framework
22
33
  email: has.sox@gmail.com
23
34
  executables: []