kilroy 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kilroy/middleware/visitor.rb +3 -1
- data/lib/kilroy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6846d1f0397102a7286298bc7ca835f106f7a30609bd25b6e4aed9a7d796be4e
|
4
|
+
data.tar.gz: 362b790fabb91883ec8a32993ee61df529cbeb1714f6c2db09565977f32ce844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be788fa82eb9d024a5721addb19af6ad1c941f501929cb6fba543367e85e073391d1e23ebc60102551d5acb50b27b874fb244aa0061d9f779475b4ec0cc84546
|
7
|
+
data.tar.gz: 315dc21a5d2813e09f2ef75580520f81a1b51c0418a800287d97ee9d3c20ec5360ed97106bd3a50319c334d40bf76601803d15bcb2067677ad8efeb6efd7a1bc
|
@@ -7,7 +7,9 @@ module Kilroy
|
|
7
7
|
|
8
8
|
def call(env)
|
9
9
|
request = ActionDispatch::Request.new(env)
|
10
|
-
request.cookie_jar.permanent.signed[:visitor_id]
|
10
|
+
legacy_cookie = request.cookie_jar.permanent.signed[:visitor_id]
|
11
|
+
request.cookie_jar.permanent.encrypted[:_kilroy_was_here] ||= { value: { visitor_id: (legacy_cookie || SecureRandom.uuid) } }
|
12
|
+
request.cookie_jar.delete(:visitor_id)
|
11
13
|
@app.call(env)
|
12
14
|
end
|
13
15
|
end
|
data/lib/kilroy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kilroy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- smudge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|