summaryrefslogtreecommitdiffstats
path: root/activesupport-remove-memcache-build-dep.patch
diff options
context:
space:
mode:
authorMohammed Morsi <mmorsi@redhat.com>2011-02-02 16:58:48 -0500
committerMohammed Morsi <mmorsi@redhat.com>2011-02-02 16:58:48 -0500
commit6aeefd1ef18ce1905375e02758880a385c2b7ee7 (patch)
treedac592fd8d381eaf8fb63478834e39d2426768a8 /activesupport-remove-memcache-build-dep.patch
parent2e3c9b6da5282c574df847a84b6de89a62419c43 (diff)
downloadrubygem-activesupport-6aeefd1ef18ce1905375e02758880a385c2b7ee7.tar.gz
rubygem-activesupport-6aeefd1ef18ce1905375e02758880a385c2b7ee7.tar.xz
rubygem-activesupport-6aeefd1ef18ce1905375e02758880a385c2b7ee7.zip
update to activesupport 3.0.3
Diffstat (limited to 'activesupport-remove-memcache-build-dep.patch')
-rw-r--r--activesupport-remove-memcache-build-dep.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/activesupport-remove-memcache-build-dep.patch b/activesupport-remove-memcache-build-dep.patch
new file mode 100644
index 0000000..12b8c14
--- /dev/null
+++ b/activesupport-remove-memcache-build-dep.patch
@@ -0,0 +1,67 @@
+--- test/abstract_unit.rb.orig 2011-02-02 12:38:56.766898240 -0500
++++ test/abstract_unit.rb 2011-02-02 12:38:55.397898289 -0500
+@@ -34,12 +34,16 @@ require 'active_support'
+ require 'active_support/ruby/shim' if RUBY_VERSION < '1.8.7'
+
+ def uses_memcached(test_name)
+- require 'memcache'
+ begin
+- MemCache.new('localhost:11211').stats
+- yield
+- rescue MemCache::MemCacheError
+- $stderr.puts "Skipping #{test_name} tests. Start memcached and try again."
++ require 'memcache'
++ begin
++ MemCache.new('localhost:11211').stats
++ yield
++ rescue MemCache::MemCacheError
++ $stderr.puts "Skipping #{test_name} tests. Start memcached and try again."
++ end
++ rescue LoadError
++ $stderr.puts "Skipping #{test_name} tests. Install memcache-client and try again."
+ end
+ end
+
+--- test/caching_test.rb.orig 2011-02-02 12:39:05.979900964 -0500
++++ test/caching_test.rb 2011-02-02 12:41:10.089899015 -0500
+@@ -59,40 +59,6 @@ class CacheStoreSettingTest < ActiveSupp
+ assert_equal "/path/to/cache/directory", store.cache_path
+ end
+
+- def test_mem_cache_fragment_cache_store
+- MemCache.expects(:new).with(%w[localhost], {})
+- store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost"
+- assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
+- end
+-
+- def test_mem_cache_fragment_cache_store_with_given_mem_cache
+- mem_cache = MemCache.new
+- MemCache.expects(:new).never
+- store = ActiveSupport::Cache.lookup_store :mem_cache_store, mem_cache
+- assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
+- end
+-
+- def test_mem_cache_fragment_cache_store_with_given_mem_cache_like_object
+- MemCache.expects(:new).never
+- memcache = Object.new
+- def memcache.get() true end
+- store = ActiveSupport::Cache.lookup_store :mem_cache_store, memcache
+- assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
+- end
+-
+- def test_mem_cache_fragment_cache_store_with_multiple_servers
+- MemCache.expects(:new).with(%w[localhost 192.168.1.1], {})
+- store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost", '192.168.1.1'
+- assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
+- end
+-
+- def test_mem_cache_fragment_cache_store_with_options
+- MemCache.expects(:new).with(%w[localhost 192.168.1.1], { :timeout => 10 })
+- store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost", '192.168.1.1', :namespace => 'foo', :timeout => 10
+- assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
+- assert_equal 'foo', store.options[:namespace]
+- end
+-
+ def test_object_assigned_fragment_cache_store
+ store = ActiveSupport::Cache.lookup_store ActiveSupport::Cache::FileStore.new("/path/to/cache/directory")
+ assert_kind_of(ActiveSupport::Cache::FileStore, store)