rack-redis-session-store 2.0.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rack-redis-session-store.rb +2 -4
- data/lib/version.rb +1 -1
- data/rack-redis-session-store.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebfa370ef2a8405445ce7f00e255cfbfd145f6c1
|
4
|
+
data.tar.gz: 49e849375d8356444e5ddedd1ff807a60aee0f16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c4f56d062a70435b1901b0c941cd46f8e1fc671ffac0a5a22d03ff73ccee7e2bf6aee1de28937abd96017bfa243bd415265a2c4e318b0d7b5d0d1845d39d6c5
|
7
|
+
data.tar.gz: 6384d17d7501558fddb326deba3194d63ee51f189d95e81aaad1f2d9672fbddeb5718bddbb9692722ed4e7de2f9b00a9b2c8404ee598df4b952104be875fbe14
|
@@ -25,7 +25,7 @@ module ActionDispatch
|
|
25
25
|
|
26
26
|
def get_session(env, sid)
|
27
27
|
@redis.with do |redis|
|
28
|
-
unless sid and session =
|
28
|
+
unless sid and session = MultiJson.load(redis.get(sid) || '{}')
|
29
29
|
sid, session = generate_sid, {}
|
30
30
|
end
|
31
31
|
[sid, session]
|
@@ -37,9 +37,7 @@ module ActionDispatch
|
|
37
37
|
expiry = expiry.nil? ? 0 : expiry + 1
|
38
38
|
|
39
39
|
@redis.with do |redis|
|
40
|
-
json =
|
41
|
-
json.(new_session, *new_session.keys)
|
42
|
-
end
|
40
|
+
json = MultiJson.dump(new_session)
|
43
41
|
redis.setex session_id, expiry,json
|
44
42
|
session_id
|
45
43
|
end
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VERSION = '2.0
|
1
|
+
VERSION = '2.1.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-redis-session-store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Le Duc Duy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,19 +67,19 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: multi_json
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
75
|
+
version: '1.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
82
|
+
version: '1.0'
|
83
83
|
description: Multi-threaded Redis store for rack ID-based session (connection pooled
|
84
84
|
with option for maximum redis connection)
|
85
85
|
email:
|