aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-28 05:27:34 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-28 05:27:34 -0700
commit7256cb53e0c34e510a4d59a50d120c0358cf1d99 (patch)
treeb437f7f6cc153bf878f26b36a7be6bd78da5996a /actionpack
parent6ebe22c3ae716d089af1e5090ddb0d12b31af8ac (diff)
parent1f5f5cfc363c82f38f0e1b171d1f798c6d5b4402 (diff)
downloadrails-7256cb53e0c34e510a4d59a50d120c0358cf1d99.tar.gz
rails-7256cb53e0c34e510a4d59a50d120c0358cf1d99.tar.bz2
rails-7256cb53e0c34e510a4d59a50d120c0358cf1d99.zip
Merge pull request #7452 from arunagw/memcached_dalli
Memcached to dalli for actionpack test.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb6
-rw-r--r--actionpack/test/dispatch/session/mem_cache_store_test.rb8
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 38a737cd2b..14af7eef68 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/memcache'
+require 'rack/session/dalli'
module ActionDispatch
module Session
- class MemCacheStore < Rack::Session::Memcache
+ class MemCacheStore < Rack::Session::Dalli
include Compatibility
include StaleSessionCheck
include SessionObject
def initialize(app, options = {})
- require 'memcache'
+ require 'dalli'
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 03234612ab..7e9e41c29a 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 'memcache'
- memcache = MemCache.new('localhost:11211')
- memcache.set('ping', '')
+ require 'dalli'
+ ss = Dalli::Client.new('localhost:11211').stats
+ raise Dalli::DalliError unless ss['localhost:11211']
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
+ rescue LoadError, RuntimeError, Dalli::DalliError
$stderr.puts "Skipping MemCacheStoreTest tests. Start memcached and try again."
end