Projects
openEuler:Mainline
rubygem-activesupport
_service:tar_scm:Add-support-dalli-3.2.2.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:Add-support-dalli-3.2.2.patch of Package rubygem-activesupport
diff -Nur a/cache/stores/mem_cache_store_test.rb b/cache/stores/mem_cache_store_test.rb --- a/cache/stores/mem_cache_store_test.rb 2021-08-20 00:25:04.000000000 +0800 +++ b/cache/stores/mem_cache_store_test.rb 2022-07-05 11:22:22.774850776 +0800 @@ -17,8 +17,12 @@ end end -class UnavailableDalliServer < Dalli::Server - def alive? +class UnavailableDalliServer < Dalli::Protocol::Binary + def alive? # before https://github.com/petergoldstein/dalli/pull/863 + false + end + + def ensure_connected! # after https://github.com/petergoldstein/dalli/pull/863 false end end @@ -263,17 +267,21 @@ end def emulating_unavailability - old_server = Dalli.send(:remove_const, :Server) - Dalli.const_set(:Server, UnavailableDalliServer) + old_server = Dalli::Protocol.send(:remove_const, :Binary) + Dalli::Protocol.const_set(:Binary, UnavailableDalliServer) yield ActiveSupport::Cache::MemCacheStore.new ensure - Dalli.send(:remove_const, :Server) - Dalli.const_set(:Server, old_server) + Dalli::Protocol.send(:remove_const, :Binary) + Dalli::Protocol.const_set(:Binary, old_server) end def servers(cache = @cache) - client(cache).instance_variable_get(:@servers) + if client(cache).instance_variable_defined?(:@normalized_servers) + client(cache).instance_variable_get(:@normalized_servers) + else + client(cache).instance_variable_get(:@servers) + end end def client(cache = @cache)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2