rack-cerberus 0.1.5 → 0.1.6
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/MIT_LICENCE +1 -1
- data/README.rdoc +2 -1
- data/cerberus.gemspec +1 -1
- data/cerberus.rb +1 -1
- data/spec.rb +1 -0
- metadata +4 -4
data/MIT_LICENCE
CHANGED
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.
|
|
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:
|
|
4
|
+
hash: 23
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
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:
|
|
18
|
+
date: 2011-02-16 00:00:00 +00:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies: []
|
|
21
21
|
|