rack-cerberus 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/MIT_LICENCE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Mickael Riga
1
+ Copyright (c) 2010-2011 Mickael Riga
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/README.rdoc CHANGED
@@ -61,7 +61,8 @@ If you want to help me, don't hesitate to fork that project on Github or send pa
61
61
  0.1.3 Don't go to page /logout when signing in after a logout (redirect to / instead)
62
62
  0.1.4 Fix /logout redirect so that it works with mapping
63
63
  0.1.5 Fix CSS and Javascript for IE (Yes I'm too kind)
64
+ 0.1.6 Send an Array instead of a string to Rack so that it works on Ruby 1.9
64
65
 
65
66
  === Copyright
66
67
 
67
- (c) 2010 Mickael Riga - see MIT_LICENCE for details
68
+ (c) 2010-2011 Mickael Riga - see MIT_LICENCE for details
data/cerberus.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rack-cerberus'
3
- s.version = "0.1.5"
3
+ s.version = "0.1.6"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.summary = "A Rack middleware for form-based authentication"
6
6
  s.description = "A Rack middleware for form-based authentication. Aim is a compromise between fonctionality, beauty and customization."
data/cerberus.rb CHANGED
@@ -87,7 +87,7 @@ PAGE
87
87
  else
88
88
  env['rack.session'].delete('cerberus_user')
89
89
  icon = @options[:icon_url].nil? ? '' : "<img src='#{@options[:icon_url]}' /><br />"
90
- [401, {'Content-Type' => 'text/html'}, AUTH_PAGE % [@options[:company_name], @options[:bg_color], @options[:bg_color], @options[:fg_color], @options[:company_name], icon, err, env['REQUEST_URI']]]
90
+ [401, {'Content-Type' => 'text/html'}, [AUTH_PAGE % [@options[:company_name], @options[:bg_color], @options[:bg_color], @options[:fg_color], @options[:company_name], icon, err, env['REQUEST_URI']]]]
91
91
  end
92
92
  end
93
93
 
data/spec.rb CHANGED
@@ -22,6 +22,7 @@ describe 'cerberus' do
22
22
  should 'Stop request if you are not already logged in or currently successfully logging' do
23
23
  res = req.get('/')
24
24
  res.status.should==401
25
+ res.body.class==String
25
26
  res = req.post('/', :params => {'cerberus_login' => 'fake', 'cerberus_pass' => 'fake'})
26
27
  res.status.should==401
27
28
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-cerberus
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mickael Riga
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-29 00:00:00 +01:00
18
+ date: 2011-02-16 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies: []
21
21