redis-session-store 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/redis-session-store.rb +7 -0
  3. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3050f5517fc5247b9d25a33f9f6465d01a3fb53a
4
- data.tar.gz: 806d6dfc551aa06d49515f179cb8fde40c836df4
3
+ metadata.gz: 3e789857c8192df4657d8e3f853d863c82e47931
4
+ data.tar.gz: cbc1244aac8ddaa92a9248e070499d3a1aa17ba8
5
5
  SHA512:
6
- metadata.gz: 147ff236358fa4bd9fbdb6e59c6e07666eeacc00b89231ef491edcbc0a33e94d1e320db01a8156c9be5a02602b665edea46a2c0637161676ef1d6aecd9c3180b
7
- data.tar.gz: 426f6b6344b8dfc377e984f93f4d674db76dcc229b54ab5c6db98da152e5fff252edca6e456d2b9fcd7217fc9de66a8c3f8e522c42d43b7eee07ff3cc0a504c2
6
+ metadata.gz: b71a5a59e1522f06578b476e2b82503f86b66f2996a06a22ecb565fd2b9376d64c3bffe04d841f956152ded974bdfd8f9fbaad1bf1547b1ec29f634fb5906888
7
+ data.tar.gz: 5ceadbf4b2c47cabe2b23960d60c0ab258459428cc9cecdc91277b525e22a50cebcde50e48463c0ebb3c5c24c27adf19d39d51ca1ecb4c3acf90014b52e50e02
@@ -30,6 +30,13 @@ class RedisSessionStore < ActionController::Session::AbstractStore
30
30
  "#{@default_options[:key_prefix]}#{sid}"
31
31
  end
32
32
 
33
+ def generate_sid
34
+ loop do
35
+ sid = super
36
+ break sid unless @redis.get(prefixed(sid))
37
+ end
38
+ end
39
+
33
40
  def get_session(env, sid)
34
41
  unless sid && (session = load_session_from_redis(sid))
35
42
  sid = generate_sid
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-session-store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Meyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description: A drop-in replacement for e.g. MemCacheStore to store Rails sessions
@@ -54,17 +54,17 @@ require_paths:
54
54
  - lib
55
55
  required_ruby_version: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - '>='
57
+ - - ">="
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - '>='
62
+ - - ">="
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  requirements: []
66
66
  rubyforge_project:
67
- rubygems_version: 2.0.14
67
+ rubygems_version: 2.2.2
68
68
  signing_key:
69
69
  specification_version: 4
70
70
  summary: A drop-in replacement for e.g. MemCacheStore to store Rails sessions (and