safe_cookies 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/safe_cookies/version.rb +1 -1
- data/lib/safe_cookies.rb +1 -0
- data/spec/safe_cookies_spec.rb +14 -0
- metadata +4 -4
data/lib/safe_cookies/version.rb
CHANGED
data/lib/safe_cookies.rb
CHANGED
data/spec/safe_cookies_spec.rb
CHANGED
@@ -119,4 +119,18 @@ describe SafeCookies::Middleware do
|
|
119
119
|
options[:non_http_only].should == [:cookie3]
|
120
120
|
end
|
121
121
|
|
122
|
+
it 'sets cookies on the root path (if no "path" is supplied, browsers assume the current)' do
|
123
|
+
subject = described_class.new(app, :my_old_cookie => 3600)
|
124
|
+
env['HTTP_COOKIE'] = 'my_old_cookie=foobar'
|
125
|
+
app.should_receive(:call).and_return([ stub, {}, stub ])
|
126
|
+
|
127
|
+
code, headers, response = subject.call(env)
|
128
|
+
|
129
|
+
cookies = headers['Set-Cookie'].split("\n")
|
130
|
+
cookies.size.should > 0
|
131
|
+
cookies.each do |cookie|
|
132
|
+
cookie.should include('; path=/;')
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
122
136
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: safe_cookies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Dominik Sch\xC3\xB6ler"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-08-
|
18
|
+
date: 2013-08-27 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|