auto-session-timeout 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/auto-session-timeout.gemspec +1 -1
- data/lib/auto/session/timeout/version.rb +1 -1
- data/lib/auto_session_timeout.rb +3 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77ae45c61583c38e509d9db9197d0b20043fc183
|
4
|
+
data.tar.gz: 0173b194b2ae4b8b1c4dabdb957cf78256cf83da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d70255cc2a19147c9e48cde559c828a396c8936001bb4054703ec42fa837c2e7932d437964bffdcd5edaa1c8934f55694c8ba373a5bdacb4a466870037117b4
|
7
|
+
data.tar.gz: cb1b5c13b32213881d94bd7cc329afa6cde3bc13ad0dbd4b25699cd81d52e8fb406dc14172d48131abf4f20510a7545960b56643a56fde6b29d2666f96fd1105
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
-
spec.add_development_dependency "rake"
|
22
|
+
spec.add_development_dependency "rake", "~> 0"
|
23
23
|
spec.add_development_dependency "minitest", "~> 4.2"
|
24
24
|
spec.add_development_dependency "actionpack", "~> 3.2"
|
25
25
|
end
|
data/lib/auto_session_timeout.rb
CHANGED
@@ -6,7 +6,7 @@ module AutoSessionTimeout
|
|
6
6
|
|
7
7
|
module ClassMethods
|
8
8
|
def auto_session_timeout(seconds=nil)
|
9
|
-
|
9
|
+
prepend_before_action do |c|
|
10
10
|
if c.session[:auto_session_expires_at] && c.session[:auto_session_expires_at] < Time.now
|
11
11
|
c.send :reset_session
|
12
12
|
else
|
@@ -26,7 +26,7 @@ module AutoSessionTimeout
|
|
26
26
|
|
27
27
|
def render_session_status
|
28
28
|
response.headers["Etag"] = "" # clear etags to prevent caching
|
29
|
-
render
|
29
|
+
render plain: !!current_user, status: 200
|
30
30
|
end
|
31
31
|
|
32
32
|
def render_session_timeout
|
@@ -36,4 +36,4 @@ module AutoSessionTimeout
|
|
36
36
|
|
37
37
|
end
|
38
38
|
|
39
|
-
ActionController::Base.send :include, AutoSessionTimeout
|
39
|
+
ActionController::Base.send :include, AutoSessionTimeout
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auto-session-timeout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Bass
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|