ucb_rails_session_timeout 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a619c7ea2409509cbc9a820fe0c63e847919628fd50923da0d551ae4e4e90562
|
|
4
|
+
data.tar.gz: 7b74943438d74434493eebd3b1ee4f88bbf342966a0522c1fd541d4863877501
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4fb0be610b1155e8777b399e843e396a9276727f8fc794834b7becabbc03825c9c70e407a820669572792a41fc7a672f188821fb07eb2a11d03462c5cbf7a573
|
|
7
|
+
data.tar.gz: 9e17a95441a336ed51a1cb14ec0db22576e52feb29d78ae99c591bf20f935aaf485585c44a8bf2afa6251a68031fafd5d76db84edb8ac42d96c29b2f035c64a4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
##
|
|
1
|
+
## 1.0.1 - 2025-11-13
|
|
2
|
+
- Fixes issues where server runs in Pacific time zone and client could run in other zones leading to premature timeout
|
|
3
|
+
- Fixes issues with assets not being automatically discoverable by consuming app
|
|
2
4
|
|
|
3
|
-
-
|
|
5
|
+
## [1.0.0] - 2025-02-27
|
|
6
|
+
- Initial release
|
|
@@ -19,12 +19,12 @@ module UcbRailsSessionTimeout
|
|
|
19
19
|
private
|
|
20
20
|
|
|
21
21
|
def track_activity
|
|
22
|
-
session[:last_active_at] = Time.
|
|
22
|
+
session[:last_active_at] = Time.zone.now.strftime("%d/%m/%Y, %H:%M:%S")
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def check_timeout
|
|
26
26
|
return if session[:last_active_at].blank?
|
|
27
|
-
time_since_last_activity = Time.current - Time.parse(session[:last_active_at])
|
|
27
|
+
time_since_last_activity = Time.current - Time.zone.parse(session[:last_active_at])
|
|
28
28
|
if time_since_last_activity > (UcbRailsSessionTimeout.configuration.timeout_length + GRACE_PERIOD)
|
|
29
29
|
reset_session
|
|
30
30
|
handle_session_timeout()
|
|
@@ -7,6 +7,10 @@ module UcbRailsSessionTimeout
|
|
|
7
7
|
class Error < StandardError; end
|
|
8
8
|
|
|
9
9
|
class Engine < ::Rails::Engine
|
|
10
|
+
# Add gem's app/javascript to asset paths for Propshaft
|
|
11
|
+
initializer "ucb_rails_session_timeout.assets" do |app|
|
|
12
|
+
app.config.assets.paths << root.join("app/javascript")
|
|
13
|
+
end
|
|
10
14
|
end
|
|
11
15
|
|
|
12
16
|
def self.included(base)
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ucb_rails_session_timeout
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Darin Wilson
|
|
8
8
|
- Michael Valenza
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rails
|
|
@@ -67,7 +66,6 @@ metadata:
|
|
|
67
66
|
homepage_uri: https://gitlab.com/ucb-bit/cad/aa/ucb_rails_session_timeout
|
|
68
67
|
source_code_uri: https://gitlab.com/ucb-bit/cad/aa/ucb_rails_session_timeout
|
|
69
68
|
changelog_uri: https://gitlab.com/ucb-bit/cad/aa/ucb_rails_session_timeout/-/blob/main/CHANGELOG.md
|
|
70
|
-
post_install_message:
|
|
71
69
|
rdoc_options: []
|
|
72
70
|
require_paths:
|
|
73
71
|
- lib
|
|
@@ -82,8 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
82
80
|
- !ruby/object:Gem::Version
|
|
83
81
|
version: '0'
|
|
84
82
|
requirements: []
|
|
85
|
-
rubygems_version: 3.
|
|
86
|
-
signing_key:
|
|
83
|
+
rubygems_version: 3.6.9
|
|
87
84
|
specification_version: 4
|
|
88
85
|
summary: Auto-logout functionality for Rails applications
|
|
89
86
|
test_files: []
|