From ae79c7a201f3aeea8919790eca1faa3fb552f88a Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 31 Aug 2012 15:41:03 +0100 Subject: Revert "Merge pull request #7452 from arunagw/memcached_dalli" This reverts commit 7256cb53e0c34e510a4d59a50d120c0358cf1d99, reversing changes made to 6ebe22c3ae716d089af1e5090ddb0d12b31af8ac. Reason: A test was failing. --- .../lib/action_dispatch/middleware/session/mem_cache_store.rb | 6 +++--- actionpack/test/dispatch/session/mem_cache_store_test.rb | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb b/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb index 14af7eef68..38a737cd2b 100644 --- a/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb @@ -1,15 +1,15 @@ require 'action_dispatch/middleware/session/abstract_store' -require 'rack/session/dalli' +require 'rack/session/memcache' module ActionDispatch module Session - class MemCacheStore < Rack::Session::Dalli + class MemCacheStore < Rack::Session::Memcache include Compatibility include StaleSessionCheck include SessionObject def initialize(app, options = {}) - require 'dalli' + require 'memcache' options[:expire_after] ||= options[:expires] super end diff --git a/actionpack/test/dispatch/session/mem_cache_store_test.rb b/actionpack/test/dispatch/session/mem_cache_store_test.rb index 7e9e41c29a..03234612ab 100644 --- a/actionpack/test/dispatch/session/mem_cache_store_test.rb +++ b/actionpack/test/dispatch/session/mem_cache_store_test.rb @@ -34,9 +34,9 @@ class MemCacheStoreTest < ActionDispatch::IntegrationTest end begin - require 'dalli' - ss = Dalli::Client.new('localhost:11211').stats - raise Dalli::DalliError unless ss['localhost:11211'] + require 'memcache' + memcache = MemCache.new('localhost:11211') + memcache.set('ping', '') def test_setting_and_getting_session_value with_test_route_set do @@ -165,7 +165,7 @@ class MemCacheStoreTest < ActionDispatch::IntegrationTest assert_not_equal session_id, cookies['_session_id'] end end - rescue LoadError, RuntimeError, Dalli::DalliError + rescue LoadError, RuntimeError $stderr.puts "Skipping MemCacheStoreTest tests. Start memcached and try again." end -- cgit v1.2.3