rails_warden 0.2.6 → 0.3.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.
data/README.textile CHANGED
@@ -21,8 +21,16 @@ config/initializers/warden.rb
21
21
  end
22
22
 
23
23
  # Setup Session Serialization
24
- Warden::Manager.serialize_into_session{ |user| [user.class, user.id] }
25
- Warden::Manager.serialize_from_session{ |klass, id| klass.find(id) }
24
+ class Warden::SessionSerializer
25
+ def serialize(record)
26
+ [record.class, record.id]
27
+ end
28
+
29
+ def deserialize(keys)
30
+ klass, id = keys
31
+ klass.find(:first, :conditions => { :id => id })
32
+ end
33
+ end
26
34
 
27
35
  # Declare your strategies here
28
36
  #Warden::Strategies.add(:my_strategy) do
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.6
1
+ 0.3.0
data/lib/rails_warden.rb CHANGED
@@ -53,7 +53,7 @@ if defined?(Rails)
53
53
  end
54
54
  end
55
55
 
56
- class Warden::Serializers::Session
56
+ class Warden::SessionSerializer
57
57
  def serialize(user)
58
58
  [user.class, user.id]
59
59
  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.6"
8
+ s.version = "0.3.0"
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-07}
12
+ s.date = %q{2010-01-22}
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.6
4
+ version: 0.3.0
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-07 00:00:00 +11:00
12
+ date: 2010-01-22 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies: []
15
15