rack-auth-cookie 0.7.5 → 0.7.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/Rakefile +20 -21
- data/lib/rack/auth/cookie.rb +11 -3
- data/rack-auth-cookie.gemspec +1 -1
- data/test/test_rack_auth_cookie.rb +1 -1
- metadata +4 -4
data/Rakefile
CHANGED
@@ -1,25 +1,22 @@
|
|
1
1
|
require 'rake'
|
2
|
+
require 'rake/clean'
|
2
3
|
require 'rake/testtask'
|
3
4
|
require 'rbconfig'
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
desc 'Install the rack-auth-cookie library as a gem'
|
20
|
-
task :install_gem => [:gem] do
|
21
|
-
file = Dir["*.gem"].first
|
22
|
-
sh "gem install #{file}"
|
5
|
+
|
6
|
+
CLEAN.include("**/*.gem", "**/*.rbc")
|
7
|
+
|
8
|
+
namespace :gem do
|
9
|
+
desc 'Create the rack-auth-cookie the gem'
|
10
|
+
task :create do
|
11
|
+
spec = eval(IO.read('rack-auth-cookie.gemspec'))
|
12
|
+
Gem::Builder.new(spec).build
|
13
|
+
end
|
14
|
+
|
15
|
+
desc 'Install the rack-auth-cookie gem'
|
16
|
+
task :install => [:create] do
|
17
|
+
file = Dir["*.gem"].first
|
18
|
+
sh "gem install #{file}"
|
19
|
+
end
|
23
20
|
end
|
24
21
|
|
25
22
|
desc 'Export the git archive to a .zip, .gz and .bz2 file in your home directory'
|
@@ -49,6 +46,8 @@ task :export, :output_file do |t, args|
|
|
49
46
|
end
|
50
47
|
|
51
48
|
Rake::TestTask.new do |t|
|
52
|
-
|
53
|
-
|
49
|
+
t.verbose = true
|
50
|
+
t.warning = true
|
54
51
|
end
|
52
|
+
|
53
|
+
task :default => :test
|
data/lib/rack/auth/cookie.rb
CHANGED
@@ -6,7 +6,7 @@ module Rack
|
|
6
6
|
module Auth
|
7
7
|
class Cookie
|
8
8
|
# The version of the rack-auth-cookie library.
|
9
|
-
VERSION = '0.7.
|
9
|
+
VERSION = '0.7.6'
|
10
10
|
|
11
11
|
# Creates a new Rack::Auth::Cookie object.
|
12
12
|
#
|
@@ -135,14 +135,22 @@ module Rack
|
|
135
135
|
if env['AUTH_USER']
|
136
136
|
cookie = self.class.create_auth_cookie(env)
|
137
137
|
|
138
|
-
headers["Set-Cookie"]
|
138
|
+
if headers["Set-Cookie"]
|
139
|
+
headers["Set-Cookie"] << cookie
|
140
|
+
else
|
141
|
+
headers["Set-Cookie"] = cookie
|
142
|
+
end
|
139
143
|
end
|
140
144
|
|
141
145
|
# If authentication failed earlier, tell the client to clear the cookie
|
142
146
|
if env['AUTH_FAIL']
|
143
147
|
cookie = self.class.create_clear_cookie(env)
|
144
148
|
|
145
|
-
headers["Set-Cookie"]
|
149
|
+
if headers["Set-Cookie"]
|
150
|
+
headers["Set-Cookie"] << cookie
|
151
|
+
else
|
152
|
+
headers["Set-Cookie"] = cookie
|
153
|
+
end
|
146
154
|
end
|
147
155
|
end
|
148
156
|
|
data/rack-auth-cookie.gemspec
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = 'rack-auth-cookie'
|
5
|
-
gem.version = '0.7.
|
5
|
+
gem.version = '0.7.6'
|
6
6
|
gem.authors = ["Daniel Berger", "Charlie O'Keefe"]
|
7
7
|
gem.email = 'cokeefe@globe.gov'
|
8
8
|
gem.homepage = 'http://www.github.com/charlieok/rack-auth-cookie'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-auth-cookie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 6
|
10
|
+
version: 0.7.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Daniel Berger
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-11-23 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|