auto-session-timeout 0.9 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +14 -6
- data/.gitignore +2 -0
- data/README.md +1 -0
- data/lib/auto/session/timeout/version.rb +1 -1
- data/lib/auto_session_timeout.rb +3 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YmRiNTA2ODE4NzJiMDc3Zjg2MjM1YTgzMGFmZGQ1YWI4ZjhiOTY0MA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NjhjNzcyOGY0YWZlNDI2MGM1YWMzYmJjMThhZTA5ODA5NDEwZmY1Nw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZWZkZmIyNGQzNmFmNTM5Nzg5MmM4YWU4Yjg0MGFhODQ0NjdlODg5ZWFlYmVh
|
10
|
+
ZTQyYjQ5MTBiMTU5MmY3NDQyNTExNjBiZDllNWU3ZTk5ODNjNjQ1M2UxOTli
|
11
|
+
ZjI0ZTQ4N2UyZGUzZGEwNjhhN2QzZThlNWU3MDA2YzE4YjA2Mzc=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
N2I1YzhiYzMzNTQ2YTkwMDJkZjE0OTA3MDIyM2E2NmY4NmM3N2Y0NTNkMjM5
|
14
|
+
NjE2OWIxOWYwZmUxNWE2MDYxYzYxM2M2NTY3MWVmYTcyMTAxNTBhZGZmMDQ2
|
15
|
+
YzY1YzY0MmU5YmIzNDlkYzBiOTVmYmUyYzdlYmQwOGI3ZjIyMzM=
|
data/.gitignore
CHANGED
data/README.md
CHANGED
data/lib/auto_session_timeout.rb
CHANGED
@@ -6,13 +6,14 @@ module AutoSessionTimeout
|
|
6
6
|
end
|
7
7
|
|
8
8
|
module ClassMethods
|
9
|
-
def auto_session_timeout(seconds)
|
9
|
+
def auto_session_timeout(seconds=nil)
|
10
10
|
prepend_before_filter do |c|
|
11
11
|
if c.session[:auto_session_expires_at] && c.session[:auto_session_expires_at] < Time.now
|
12
12
|
c.send :reset_session
|
13
13
|
else
|
14
14
|
unless c.url_for(c.params).start_with?(c.send(:active_url))
|
15
|
-
|
15
|
+
offset = seconds || current_user.try(:auto_timeout)
|
16
|
+
c.session[:auto_session_expires_at] = Time.now + offset if offset && offset > 0
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
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:
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Bass
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-24 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
|
@@ -97,12 +97,12 @@ require_paths:
|
|
97
97
|
- lib
|
98
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - '>='
|
100
|
+
- - ! '>='
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- - '>='
|
105
|
+
- - ! '>='
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|