session-check 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # Session Check
2
+
3
+ A gem that supplies a JS routine to check every 10 sec to see if your session has expired, and boots you to the sign in page if it is.
4
+
5
+ # Usage
6
+
7
+ Include the gem in your Gemfile...
8
+
9
+ gem 'session-check'
10
+
11
+ ... and include the helper tag in your layout.erb, anywhere in the _<head>_ tag.
12
+
13
+ <%= session_check %>
14
+
15
+ You're done.
16
+
17
+ # How it works
18
+
19
+ A JS timeout checks a value supplied from your Devise config, and when it determines that the Devise session has expired,
20
+ it takes the user to the sign in page. A global AJAX listener ensures AJAX heavy apps are catered for, by listening to each
21
+ request and resetting the counter for you.
@@ -0,0 +1,15 @@
1
+ require 'rails'
2
+
3
+ module Session
4
+ module Check
5
+ class Engine < ::Rails::Engine
6
+ initializer "session-check.loader" do
7
+ ActiveSupport.on_load(:action_controller) do
8
+ include SessionCheckHelper
9
+ helper_method :session_check
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
15
+
@@ -0,0 +1,5 @@
1
+ module Session
2
+ module Check
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: session-check
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Harry Lascelles
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ type: :runtime
16
+ name: rails
17
+ prerelease: false
18
+ requirement: !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ! '>='
22
+ - !ruby/object:Gem::Version
23
+ version: '0'
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description:
31
+ email:
32
+ - harry@harrylascelles.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - lib/session/check/version.rb
38
+ - lib/session/check.rb
39
+ - README.md
40
+ homepage:
41
+ licenses: []
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 1.8.25
61
+ signing_key:
62
+ specification_version: 3
63
+ summary: A gem for JS clients to check if their session has expired.
64
+ test_files: []
65
+ has_rdoc: