warden 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,4 @@
1
1
  * Allow a spec / test mode where a _spec_authenticate! method is called on a strategy instead if present
2
- * Implement back urls
2
+ * Implement back urls
3
+ * Move all configuration to Warden::Config
4
+ * Allow serializers to be chosen on storing/fetching/deleting
@@ -74,6 +74,18 @@ module Warden
74
74
  end
75
75
  end
76
76
 
77
+ # Quick accessor to strategies from manager
78
+ # :api: public
79
+ def serializers
80
+ Warden::Serializers
81
+ end
82
+
83
+ # Quick accessor to strategies from manager
84
+ # :api: public
85
+ def strategies
86
+ Warden::Strategies
87
+ end
88
+
77
89
  # :api: private
78
90
  def call(env) # :nodoc:
79
91
  # if this is downstream from another warden instance, don't do anything.
@@ -112,7 +124,7 @@ module Warden
112
124
  # This method was deprecated in favor of serializer in Session. You can set it while setting the middleware:
113
125
  #
114
126
  # use Warden::Manager do |manager|
115
- # manager.update(:session) do
127
+ # manager.serializers.update(:session) do
116
128
  # def serialize(user)
117
129
  # user.id
118
130
  # end
@@ -135,8 +147,8 @@ module Warden
135
147
  # This method was deprecated in favor of serializer in Session. You can set it while setting the middleware:
136
148
  #
137
149
  # use Warden::Manager do |manager|
138
- # manager.update(:session) do
139
- # def deserialize(user)
150
+ # manager.serializers.update(:session) do
151
+ # def deserialize(id)
140
152
  # User.get(id)
141
153
  # end
142
154
  # end
@@ -1,3 +1,3 @@
1
1
  module Warden
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
  end
@@ -208,10 +208,26 @@ describe Warden::Manager do
208
208
  end
209
209
  end # integrated strategies
210
210
 
211
- it "Should allow me to set a different default scope for warden" do
211
+ it "should allow me to set a different default scope for warden" do
212
212
  Warden::Manager.default_scope.should == :default
213
213
  Warden::Manager.default_scope = :other_scope
214
214
  Warden::Manager.default_scope.should == :other_scope
215
215
  Warden::Manager.default_scope = :default
216
216
  end
217
+
218
+ it "should allow me to access serializers through manager" do
219
+ Rack::Builder.new do
220
+ use Warden::Manager do |manager|
221
+ manager.serializers.should == Warden::Serializers
222
+ end
223
+ end
224
+ end
225
+
226
+ it "should allow me to access serializers through manager" do
227
+ Rack::Builder.new do
228
+ use Warden::Manager do |manager|
229
+ manager.strategies.should == Warden::Strategies
230
+ end
231
+ end
232
+ end
217
233
  end
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{warden}
8
- s.version = "0.6.4"
8
+ s.version = "0.6.5"
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-11-21}
12
+ s.date = %q{2009-12-02}
13
13
  s.email = %q{has.sox@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warden
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
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-11-21 00:00:00 +11:00
12
+ date: 2009-12-02 00:00:00 -02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency