warden 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ == Version 0.8.1 / 2010-01-06
2
+
3
+ * Fix a bug when silence missing serializers is set (josevalim)
4
+
1
5
  == Version 0.8.0 / 2010-01-06
2
6
 
3
7
  * enhancements
data/lib/warden/proxy.rb CHANGED
@@ -214,9 +214,10 @@ module Warden
214
214
  @config.default_serializers.inject([]) do |array, s|
215
215
  unless klass = Warden::Serializers[s]
216
216
  raise "Invalid serializer #{s}" unless @config.silence_missing_serializers?
217
- next
217
+ array
218
+ else
219
+ array << klass.new(@env)
218
220
  end
219
- array << klass.new(@env)
220
221
  end
221
222
  end
222
223
  end
@@ -1,3 +1,3 @@
1
1
  module Warden
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1".freeze
3
3
  end
@@ -239,6 +239,19 @@ describe Warden::Proxy do
239
239
  end
240
240
  end
241
241
 
242
+ it "should not raise errors with missing serializers" do
243
+ env = env_with_params('/')
244
+ app = lambda do |env|
245
+ env['warden'].authenticate
246
+ env['warden'].serializers.size.should == 1
247
+ env['warden'].serializers.first.should be_kind_of(Warden::Serializers[:session])
248
+ valid_response
249
+ end
250
+ lambda {
251
+ setup_rack(app, :silence_missing_serializers => true, :default_serializers => [:session, :unknown]).call(env)
252
+ }.should_not raise_error
253
+ end
254
+
242
255
  describe "set user" do
243
256
  it "should store the user into the session" do
244
257
  env = env_with_params("/")
data/warden.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{warden}
8
- s.version = "0.8.0"
8
+ s.version = "0.8.1"
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-01-07}
12
+ s.date = %q{2010-01-08}
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.8.0
4
+ version: 0.8.1
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: 2010-01-07 00:00:00 +11:00
12
+ date: 2010-01-08 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency