redis-session-store 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/redis-session-store.rb +5 -5
  3. metadata +11 -4
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rubygems/specification'
4
4
 
5
5
  spec = Gem::Specification.new do |s|
6
6
  s.name = 'redis-session-store'
7
- s.version = '0.1.6'
7
+ s.version = '0.1.7'
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.has_rdoc = true
10
10
  s.extra_rdoc_files = ["LICENSE"]
@@ -28,7 +28,7 @@ class RedisSessionStore < ActionController::Session::AbstractStore
28
28
  :key_prefix => ""
29
29
  }.update(options)
30
30
 
31
- @pool = Redis.new(@default_options)
31
+ @redis = Redis.new(@default_options)
32
32
  end
33
33
 
34
34
  private
@@ -39,7 +39,7 @@ class RedisSessionStore < ActionController::Session::AbstractStore
39
39
  def get_session(env, sid)
40
40
  sid ||= generate_sid
41
41
  begin
42
- data = @pool.call_command([:get, prefixed(sid)])
42
+ data = @redis.get(prefixed(sid))
43
43
  session = data.nil? ? {} : Marshal.load(data)
44
44
  rescue Errno::ECONNREFUSED
45
45
  session = {}
@@ -51,9 +51,9 @@ class RedisSessionStore < ActionController::Session::AbstractStore
51
51
  options = env['rack.session.options']
52
52
  expiry = options[:expire_after] || nil
53
53
 
54
- @pool.pipelined do |redis|
55
- redis.set(prefixed(sid), Marshal.dump(session_data))
56
- redis.expire(prefixed(sid), expiry) if expiry
54
+ @redis.pipelined do
55
+ @redis.set(prefixed(sid), Marshal.dump(session_data))
56
+ @redis.expire(prefixed(sid), expiry) if expiry
57
57
  end
58
58
 
59
59
  return true
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-session-store
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 21
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 1
8
- - 6
9
- version: 0.1.6
9
+ - 7
10
+ version: 0.1.7
10
11
  platform: ruby
11
12
  authors:
12
13
  - Mathias Meyer
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-04-19 00:00:00 +02:00
18
+ date: 2010-12-09 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: redis
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 3
27
30
  segments:
28
31
  - 0
29
32
  version: "0"
@@ -52,23 +55,27 @@ rdoc_options: []
52
55
  require_paths:
53
56
  - lib
54
57
  required_ruby_version: !ruby/object:Gem::Requirement
58
+ none: false
55
59
  requirements:
56
60
  - - ">="
57
61
  - !ruby/object:Gem::Version
62
+ hash: 3
58
63
  segments:
59
64
  - 0
60
65
  version: "0"
61
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
+ none: false
62
68
  requirements:
63
69
  - - ">="
64
70
  - !ruby/object:Gem::Version
71
+ hash: 3
65
72
  segments:
66
73
  - 0
67
74
  version: "0"
68
75
  requirements: []
69
76
 
70
77
  rubyforge_project:
71
- rubygems_version: 1.3.6
78
+ rubygems_version: 1.3.7
72
79
  signing_key:
73
80
  specification_version: 3
74
81
  summary: A drop-in replacement for e.g. MemCacheStore to store Rails sessions (and Rails sessions only) in Redis.