brevio-session 0.2.2 → 0.2.3

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: 97d1fd49360aab5a99bd4191bf1504c9c9b001a582284559373550244432d04b
4
- data.tar.gz: 452394130da4b986a42aaf807eb0cb580e7e1ff2f54b79e28224aca4e6915a37
3
+ metadata.gz: d07ff8ef0c9b9c6b67397ebe37500340d3e9d1304297f11c59cc03887b5d999b
4
+ data.tar.gz: fd8226dfd4afcb75f122551a11af4da5330380d25638b8c1457fd653b080418d
5
5
  SHA512:
6
- metadata.gz: a673c0227a23ccc2c95104932249bed517cabce3b1ab461a12717dbca74f4e755db44d51c6103126679f3988687942919a88715c7940eb18722f7a5d7534e32d
7
- data.tar.gz: b3f17e1adaa4df6f376f0cc20c34ae2332cffe60e0ede1d70d5cf63eb12214f67720e7db981ea901c02f183cb74fbcd00df8d436d84acd59448d5d12f075db89
6
+ metadata.gz: aefe562e7d811da30cb91f3b06c7ccd4cd1a5a80aada26bca5f1bf234623271552fc6194b92f1dcebb64b7a6f60e6e724f18f6639a2567842529ab3bc3d3c558
7
+ data.tar.gz: f0b6ab203d252f450092588f8039707988afbc884b606a686bd3c493269b85004bfbeb66623dc2d85f4bc3713bd5ee0b8d80ea2ad723fbd34eda45161bd4f82f
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.2.2
data/Gemfile.lock CHANGED
@@ -1,36 +1,35 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brevio-session (0.2.1)
4
+ brevio-session (0.2.3)
5
5
  actionpack (~> 7.0.3)
6
- redis (~> 5.0)
6
+ redis (~> 4.8)
7
7
  zeitwerk (~> 2.6.7)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (7.0.8)
13
- actionview (= 7.0.8)
14
- activesupport (= 7.0.8)
12
+ actionpack (7.0.8.1)
13
+ actionview (= 7.0.8.1)
14
+ activesupport (= 7.0.8.1)
15
15
  rack (~> 2.0, >= 2.2.4)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (7.0.8)
20
- activesupport (= 7.0.8)
19
+ actionview (7.0.8.1)
20
+ activesupport (= 7.0.8.1)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activesupport (7.0.8)
25
+ activesupport (7.0.8.1)
26
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
27
27
  i18n (>= 1.6, < 2)
28
28
  minitest (>= 5.1)
29
29
  tzinfo (~> 2.0)
30
30
  ast (2.4.2)
31
31
  builder (3.2.4)
32
- concurrent-ruby (1.2.2)
33
- connection_pool (2.4.1)
32
+ concurrent-ruby (1.2.3)
34
33
  crass (1.0.6)
35
34
  debug (1.5.0)
36
35
  irb (>= 1.3.6)
@@ -42,17 +41,17 @@ GEM
42
41
  irb (1.6.1)
43
42
  reline (>= 0.3.0)
44
43
  json (2.6.2)
45
- loofah (2.21.3)
44
+ loofah (2.22.0)
46
45
  crass (~> 1.0.2)
47
46
  nokogiri (>= 1.12.0)
48
- minitest (5.20.0)
49
- nokogiri (1.15.4-arm64-darwin)
47
+ minitest (5.22.2)
48
+ nokogiri (1.16.2-arm64-darwin)
50
49
  racc (~> 1.4)
51
50
  parallel (1.22.1)
52
51
  parser (3.1.2.1)
53
52
  ast (~> 2.4.1)
54
- racc (1.7.1)
55
- rack (2.2.8)
53
+ racc (1.7.3)
54
+ rack (2.2.8.1)
56
55
  rack-test (2.1.0)
57
56
  rack (>= 1.3)
58
57
  rails-dom-testing (2.2.0)
@@ -63,10 +62,7 @@ GEM
63
62
  loofah (~> 2.21)
64
63
  nokogiri (~> 1.14)
65
64
  rainbow (3.1.1)
66
- redis (5.0.7)
67
- redis-client (>= 0.9.0)
68
- redis-client (0.17.0)
69
- connection_pool
65
+ redis (4.8.1)
70
66
  regexp_parser (2.5.0)
71
67
  reline (0.3.2)
72
68
  io-console (~> 0.5)
@@ -87,10 +83,11 @@ GEM
87
83
  tzinfo (2.0.6)
88
84
  concurrent-ruby (~> 1.0)
89
85
  unicode-display_width (2.2.0)
90
- zeitwerk (2.6.12)
86
+ zeitwerk (2.6.13)
91
87
 
92
88
  PLATFORMS
93
89
  arm64-darwin-21
90
+ arm64-darwin-23
94
91
 
95
92
  DEPENDENCIES
96
93
  brevio-session!
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'brevio-session'
5
- spec.version = '0.2.2'
5
+ spec.version = '0.2.3'
6
6
  spec.authors = ['Brevio AS']
7
7
  spec.email = ['support@brevio.com']
8
8
  spec.files = `git ls-files -z`.split("\0")
@@ -15,6 +15,7 @@ module Brevio::Session
15
15
 
16
16
  session_hash = { user_id: user.brevio_id,
17
17
  audit_company_id: user.audit_company.brevio_id,
18
+ user_patch: user.patch,
18
19
  user_stamp: updated_at }
19
20
 
20
21
  Testing.config.logger.info "setting Brevio session to #{session_hash}"
@@ -23,14 +24,17 @@ module Brevio::Session
23
24
  redis_key,
24
25
  session_hash
25
26
  )
27
+
28
+ Testing.config.gem_config.redis.set("brevio-id:audit-company:#{user.audit_company.brevio_id}:patch", user.audit_company.patch)
26
29
  set_cookie(redis_key)
27
30
  end
28
31
 
29
- def brevio_login_new_user(user_brevio_id, audit_company:)
32
+ def brevio_login_new_user(user_brevio_id, patch: nil, audit_company:)
30
33
  redis_key = SecureRandom.hex(6)
31
34
 
32
35
  session_hash = { user_id: user_brevio_id,
33
36
  audit_company_id: audit_company.brevio_id,
37
+ user_patch: patch || SecureRandom.hex(12),
34
38
  user_stamp: Time.current.yesterday }
35
39
 
36
40
  Testing.config.logger.info "setting Brevio session to #{session_hash}"
@@ -14,5 +14,5 @@ require 'action_dispatch'
14
14
  module BrevioSession; end # Necessary for reasons
15
15
 
16
16
  module Brevio::Session
17
- class NilSession < StandardError; end
17
+ class NilSession < RuntimeError; end
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brevio-session
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brevio AS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-03 00:00:00.000000000 Z
11
+ date: 2024-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubygems_version: 3.4.1
146
+ rubygems_version: 3.4.10
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: Brevio session wrapper