rack-cleancookies 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack/cleancookies.rb +3 -2
- metadata +2 -2
data/lib/rack/cleancookies.rb
CHANGED
@@ -24,8 +24,9 @@ module Rack
|
|
24
24
|
module_function :clean?
|
25
25
|
|
26
26
|
class Middleware
|
27
|
-
def initialize(app)
|
27
|
+
def initialize(app, options={verbose: false})
|
28
28
|
@app = app
|
29
|
+
@options = options
|
29
30
|
end
|
30
31
|
|
31
32
|
def call(env)
|
@@ -45,7 +46,7 @@ module Rack
|
|
45
46
|
env['HTTP_COOKIE'] = clean_cookies.join('; ')
|
46
47
|
|
47
48
|
# Inform about dropped dirty cookies
|
48
|
-
|
49
|
+
if !dirty_cookies.empty? && @options[:verbose]
|
49
50
|
env['rack.errors'].puts "Ignoring dirty cookies: #{dirty_cookies.inspect}"
|
50
51
|
end
|
51
52
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-cleancookies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|