macmillan-utils 1.0.36 → 1.0.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/macmillan/utils/middleware/cookie_message.rb +7 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 182d2d0bb630acae2ae30f20790d50cae2faca04
|
4
|
+
data.tar.gz: 160bd16626cf37def232a5854825fb83e226ab97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8d300ec617b865faa81b673dd5919b06c2519ef17736a0b9d2dedaeca8071e35037525bf608e87ec49a30f042cb8a4f6dd4ba2d24599d04490a93920683ccbf
|
7
|
+
data.tar.gz: decfab1462fad72ac385f0e35083030f5414d471244a2908702cf132b8fc47cf03128f399609cf4d5486432d4f13ac84a426db4f0b67f1b4871bd6ef8bcd7134
|
@@ -32,23 +32,23 @@ module Macmillan
|
|
32
32
|
debug_log("request.params['cookies'] IS #{request.params['cookies']}")
|
33
33
|
|
34
34
|
unless request.post?
|
35
|
-
debug_log("request.post? means pass-thru")
|
35
|
+
debug_log("request.post? (#{request.post?.inspect}) means pass-thru")
|
36
36
|
return false
|
37
37
|
end
|
38
38
|
unless request.cookies[COOKIE] != 'accepted'
|
39
|
-
debug_log("request.cookies[#{COOKIE}] means passthru")
|
39
|
+
debug_log("request.cookies[#{COOKIE}] (#{request.cookies[COOKIE]}) means passthru")
|
40
40
|
return false
|
41
41
|
end
|
42
42
|
unless request.params['cookies'] == 'accepted'
|
43
|
-
debug_log("request.params['cookies'] means passthru")
|
43
|
+
debug_log("request.params['cookies'] (#{request.params['cookies']}) means passthru")
|
44
44
|
return false
|
45
45
|
end
|
46
|
-
debug_log(
|
46
|
+
debug_log('About to set the acceptance cookie and redirect')
|
47
47
|
true
|
48
48
|
end
|
49
49
|
|
50
50
|
def debug_log(msg)
|
51
|
-
logger.
|
51
|
+
logger.info("[Macmillan::Utils::Middleware::CookieMessage] #{msg}")
|
52
52
|
end
|
53
53
|
|
54
54
|
def logger
|
@@ -59,6 +59,8 @@ module Macmillan
|
|
59
59
|
response = Rack::Response.new
|
60
60
|
location = build_location(request)
|
61
61
|
|
62
|
+
debug_log("Redirecting to #{location}")
|
63
|
+
|
62
64
|
response.redirect(location)
|
63
65
|
response.set_cookie(COOKIE, cookie_options(request))
|
64
66
|
|