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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0a6b9271e99e03cb5ed8ed5360567f4b6effdd985605cdc59100f7a5a426c4f
4
- data.tar.gz: d5ef6713efa9243ea8571de5b6dc8b00203341bbba5159be5a400ac2afab1d0b
3
+ metadata.gz: 6846d1f0397102a7286298bc7ca835f106f7a30609bd25b6e4aed9a7d796be4e
4
+ data.tar.gz: 362b790fabb91883ec8a32993ee61df529cbeb1714f6c2db09565977f32ce844
5
5
  SHA512:
6
- metadata.gz: 0bb036a2bec04281089bf68c708782cee18decf8ef101e124274164d23525aa510cbd0c61ff2db210aaef4e71e28b16a0bc9e03533d6be2dd1a33a7fc09afda5
7
- data.tar.gz: 34b88eea0643a7944c9b7f81509d115850a314ba16fa103acbe534aad917264fe869c64b60ad1329d2eaef02903b95980d577aed87acb737c65dcfbb1bb5334f
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] ||= SecureRandom.uuid
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
@@ -1,3 +1,3 @@
1
1
  module Kilroy
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.1.0'.freeze
3
3
  end
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.2
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-10-01 00:00:00.000000000 Z
11
+ date: 2018-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler