diff --git a/Add-support-dalli-3.2.2.patch b/Add-support-dalli-3.2.2.patch new file mode 100644 index 0000000000000000000000000000000000000000..ab2bc8d65f4bfeab29099da92ae53cf2ec2069f6 --- /dev/null +++ b/Add-support-dalli-3.2.2.patch @@ -0,0 +1,45 @@ +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) diff --git a/rubygem-activesupport.spec b/rubygem-activesupport.spec index d30fd7eb55512b90c685d37a3b8cbccc7020b9e2..65d2692bc109dda939766a2ed0977434f8fe5f8e 100644 --- a/rubygem-activesupport.spec +++ b/rubygem-activesupport.spec @@ -2,13 +2,14 @@ Name: rubygem-%{gem_name} Epoch: 1 Version: 6.1.4.1 -Release: 1 +Release: 2 Summary: A support libraries and Ruby core extensions extracted from the Rails framework License: MIT URL: http://rubyonrails.org Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Source1: %{gem_name}-%{version}-tests.txz Source2: rails-%{version}-tools.txz +Patch0: Add-support-dalli-3.2.2.patch Requires: rubygem(bigdecimal) rubygem(json) BuildRequires: ruby(release) rubygems-devel ruby >= 2.2.2 rubygem(bigdecimal) rubygem(builder) BuildRequires: rubygem(concurrent-ruby) rubygem(connection_pool) rubygem(dalli) @@ -29,6 +30,9 @@ Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -b1 -b2 +pushd %{_builddir}/test +%patch0 -p1 +popd %build gem build ../%{gem_name}-%{version}.gemspec @@ -72,6 +76,9 @@ popd %doc %{gem_instdir}/README.rdoc %changelog +* Tue Jul 05 2022 liyanan - 6.1.4.1-2 +- Add support dalli 3.2.2 + * Wed Mar 02 2022 jiangxinyu - 6.1.4.1-1 - update to 6.1.4.1