diff --git a/README.md b/README.md index 2403137..fddf1c2 100644 --- a/README.md +++ b/README.md @@ -22,16 +22,10 @@ Configuration ============= See lib/redis-session-store.rb for a list of valid options. -Set them using: - - ActionController::Base.session = { - :db => 2, - :expire_after => 120.minutes, - :key_prefix => "myapp:session:" - } - - In your Rails app, throw in an initializer with the following contents and the configuration above: - Rails.application.config.session_store :redis_session_store + YourApp::Application.config.session_store :redis_session_store, + :db => 0, + :expire_after => 10.minutes, + :key_prefix => "your_app:session:" diff --git a/VERSION b/VERSION index 9e11b32..d15723f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.1 +0.3.2 diff --git a/lib/redis-session-store.rb b/lib/redis-session-store.rb index 27148c9..8ee5028 100644 --- a/lib/redis-session-store.rb +++ b/lib/redis-session-store.rb @@ -53,8 +53,7 @@ def get_session(env, sid) [sid, session] end - def set_session(env, sid, session_data) - options = env['rack.session.options'] + def set_session(env, sid, session_data, options) expiry = options[:expire_after] || nil @redis.pipelined do diff --git a/rails3-redis2-session-store.gemspec b/rails3-redis2-session-store.gemspec index a905cc1..6ef42ab 100644 --- a/rails3-redis2-session-store.gemspec +++ b/rails3-redis2-session-store.gemspec @@ -1,29 +1,30 @@ # Generated by jeweler # DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' +# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = %q{rails3-redis2-session-store} - s.version = "0.3.1" + s.version = "0.3.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Mathias Meyer", "Ivan Porto Carrero"] - s.date = %q{2010-12-07} + s.date = %q{2011-03-08} s.description = %q{A drop-in replacement for e.g. MemCacheStore to store Rails sessions (and Rails sessions only) in Redis.} s.email = %q{ivan@flanders.co.nz} s.extra_rdoc_files = [ "LICENSE", - "README.md" + "README.md" ] s.files = [ "LICENSE", - "README.md", - "Rakefile", - "VERSION", - "lib/redis-session-store.rb" + "README.md", + "Rakefile", + "VERSION", + "lib/redis-session-store.rb" ] s.homepage = %q{http://github.com/casualjim/redis-session-store} + s.rdoc_options = ["--charset=UTF-8"] s.require_paths = ["lib"] s.rubygems_version = %q{1.3.7} s.summary = %q{Rails 3 Redis 2 session store}