rails_warden 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rails_warden.rb +13 -14
- data/rails_warden.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.6
|
data/lib/rails_warden.rb
CHANGED
@@ -53,20 +53,19 @@ if defined?(Rails)
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
Warden::Manager.serialize_into_session{ |user| [user.class, user.id] }
|
56
|
+
class Warden::Serializers::Session
|
57
|
+
def serialize(user)
|
58
|
+
[user.class, user.id]
|
59
|
+
end
|
61
60
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
61
|
+
def deserialize(key)
|
62
|
+
klass, id = key
|
63
|
+
klass = case klass
|
64
|
+
when Class
|
65
|
+
klass
|
66
|
+
when String, Symbol
|
67
|
+
klass.to_s.classify.constantize
|
68
|
+
end
|
69
|
+
klass.find(id)
|
70
70
|
end
|
71
|
-
klass.find(id)
|
72
71
|
end
|
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.2.
|
8
|
+
s.version = "0.2.6"
|
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{2009-
|
12
|
+
s.date = %q{2009-12-07}
|
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 = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_warden
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Neighman
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-07 00:00:00 +11:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|