commit
353d93cd35
@ -0,0 +1,2 @@
|
|||||||
|
SOURCES/dalli-3.2.0-tests.txz
|
||||||
|
SOURCES/dalli-3.2.0.gem
|
@ -0,0 +1,2 @@
|
|||||||
|
b33b5d42252c248bf2d67092c83b1345310324c3 SOURCES/dalli-3.2.0-tests.txz
|
||||||
|
4fe6c3942a04a6dbaca8abde9549c485f341e002 SOURCES/dalli-3.2.0.gem
|
@ -0,0 +1,44 @@
|
|||||||
|
From 754414d3cd21a385ea62d58307ed7055e1df2996 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||||
|
Date: Thu, 18 Jan 2018 17:10:50 +0100
|
||||||
|
Subject: [PATCH] Fix mamcached 1.5.4 compatibility.
|
||||||
|
|
||||||
|
memcached 1.5.4 changed order of evaluation of command line parameters
|
||||||
|
[1]. As a result, the test suite failed with errors such as:
|
||||||
|
|
||||||
|
~~~
|
||||||
|
$ ruby -Ilib:test -e 'Dir.glob('\''./test/test_*.rb'\'').sort.each{ |x| require x }'
|
||||||
|
Testing with Rails 5.1.4
|
||||||
|
Using standard socket IO (ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux])
|
||||||
|
Run options: --seed 35324
|
||||||
|
# Running:
|
||||||
|
Found memcached 1.5.4 in PATH
|
||||||
|
.........................................................Cannot set item size limit higher than 1/2 of memory max.
|
||||||
|
Cannot set item size limit higher than 1/2 of memory max.
|
||||||
|
F
|
||||||
|
Failure:
|
||||||
|
Dalli::using a live server::in low memory conditions#test_0001_handle error response correctly [/builddir/build/BUILD/dalli-2.7.6/usr/share/gems/gems/dalli-2.7.6/test/test_dalli.rb:740]:
|
||||||
|
unexpected failure on iteration 0
|
||||||
|
/usr/share/gems/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:70:in `method': undefined method `test_0001_handle error response correctly' for class `Minitest::Result' (NameError)
|
||||||
|
~~~
|
||||||
|
|
||||||
|
This commit adjust the memcached parameters to make the test suite pass.
|
||||||
|
|
||||||
|
[1] https://github.com/memcached/memcached/commit/95246f7947e9d95969d04db0898a93ef66235fb0
|
||||||
|
---
|
||||||
|
test/memcached_mock.rb | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/memcached_mock.rb b/test/memcached_mock.rb
|
||||||
|
index 47e96cb..42ba9d7 100644
|
||||||
|
--- a/test/memcached_mock.rb
|
||||||
|
+++ b/test/memcached_mock.rb
|
||||||
|
@@ -108,7 +108,7 @@ def memcached_cas_persistent(port = 25662)
|
||||||
|
|
||||||
|
|
||||||
|
def memcached_low_mem_persistent(port = 19128)
|
||||||
|
- dc = start_and_flush_with_retry(port, '-m 1 -M')
|
||||||
|
+ dc = start_and_flush_with_retry(port, '-m 1 -M -I 512k')
|
||||||
|
yield dc, port if block_given?
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,125 @@
|
|||||||
|
From 6d3243e7f41166b9fe57a64df066b1d1ec27164c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Tue, 22 Aug 2017 13:42:43 +0200
|
||||||
|
Subject: [PATCH] Use `assert_nil` in tests
|
||||||
|
|
||||||
|
instead of `assert_equal nil`, because it produces errors with activesupport >= 5.1.3.
|
||||||
|
---
|
||||||
|
test/test_active_support.rb | 16 ++++++++--------
|
||||||
|
test/test_dalli.rb | 8 ++++----
|
||||||
|
test/test_encoding.rb | 2 +-
|
||||||
|
3 files changed, 13 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/test_active_support.rb b/test/test_active_support.rb
|
||||||
|
index eca4322..6313b4c 100644
|
||||||
|
--- a/test/test_active_support.rb
|
||||||
|
+++ b/test/test_active_support.rb
|
||||||
|
@@ -84,7 +84,7 @@ def self.it_with_and_without_local_cache(message, &block)
|
||||||
|
with_cache cache_nils: true do
|
||||||
|
@dalli.write('nil', nil)
|
||||||
|
dvalue = @dalli.fetch('nil') { flunk }
|
||||||
|
- assert_equal nil, dvalue
|
||||||
|
+ assert_nil dvalue
|
||||||
|
end
|
||||||
|
|
||||||
|
with_cache cache_nils: false do
|
||||||
|
@@ -281,7 +281,7 @@ def self.it_with_and_without_local_cache(message, &block)
|
||||||
|
@dalli.delete(y)
|
||||||
|
Dalli::Client.any_instance.expects(:get).with(y, {}).once.returns(nil)
|
||||||
|
dres = @dalli.read(y)
|
||||||
|
- assert_equal nil, dres
|
||||||
|
+ assert_nil dres
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
@@ -320,15 +320,15 @@ def self.it_with_and_without_local_cache(message, &block)
|
||||||
|
assert_equal 6, @dalli.increment('counterY1', 1, :initial => 5)
|
||||||
|
assert_equal 6, @dalli.read('counterY1', :raw => true).to_i
|
||||||
|
|
||||||
|
- assert_equal nil, @dalli.increment('counterZ1', 1, :initial => nil)
|
||||||
|
- assert_equal nil, @dalli.read('counterZ1')
|
||||||
|
+ assert_nil @dalli.increment('counterZ1', 1, :initial => nil)
|
||||||
|
+ assert_nil @dalli.read('counterZ1')
|
||||||
|
|
||||||
|
assert_equal 5, @dalli.decrement('counterY2', 1, :initial => 5)
|
||||||
|
assert_equal 4, @dalli.decrement('counterY2', 1, :initial => 5)
|
||||||
|
assert_equal 4, @dalli.read('counterY2', :raw => true).to_i
|
||||||
|
|
||||||
|
- assert_equal nil, @dalli.decrement('counterZ2', 1, :initial => nil)
|
||||||
|
- assert_equal nil, @dalli.read('counterZ2')
|
||||||
|
+ assert_nil @dalli.decrement('counterZ2', 1, :initial => nil)
|
||||||
|
+ assert_nil @dalli.read('counterZ2')
|
||||||
|
|
||||||
|
user = MockUser.new
|
||||||
|
assert op_addset_succeeds(@dalli.write(user, 0, :raw => true))
|
||||||
|
@@ -369,7 +369,7 @@ def self.it_with_and_without_local_cache(message, &block)
|
||||||
|
memcached_kill(new_port)
|
||||||
|
|
||||||
|
silence_logger do
|
||||||
|
- assert_equal @dalli.read('foo'), nil
|
||||||
|
+ assert_nil @dalli.read('foo')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@@ -446,7 +446,7 @@ def self.it_with_and_without_local_cache(message, &block)
|
||||||
|
|
||||||
|
it 'supports connection pooling' do
|
||||||
|
with_cache :expires_in => 1, :namespace => 'foo', :compress => true, :pool_size => 3 do
|
||||||
|
- assert_equal nil, @dalli.read('foo')
|
||||||
|
+ assert_nil @dalli.read('foo')
|
||||||
|
assert @dalli.write('foo', 1)
|
||||||
|
assert_equal 1, @dalli.fetch('foo') { raise 'boom' }
|
||||||
|
assert_equal true, @dalli.dalli.is_a?(ConnectionPool)
|
||||||
|
diff --git a/test/test_dalli.rb b/test/test_dalli.rb
|
||||||
|
index ac404b0..0d36877 100644
|
||||||
|
--- a/test/test_dalli.rb
|
||||||
|
+++ b/test/test_dalli.rb
|
||||||
|
@@ -143,7 +143,7 @@
|
||||||
|
|
||||||
|
it 'returns nil for nonexist key' do
|
||||||
|
memcached_persistent do |dc|
|
||||||
|
- assert_equal nil, dc.get('notexist')
|
||||||
|
+ assert_nil dc.get('notexist')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@@ -234,7 +234,7 @@
|
||||||
|
|
||||||
|
dc.set("fetch_key", nil)
|
||||||
|
res = dc.fetch("fetch_key") { flunk "fetch block called" }
|
||||||
|
- assert_equal nil, res
|
||||||
|
+ assert_nil res
|
||||||
|
end
|
||||||
|
|
||||||
|
memcached_persistent(21345, cache_nils: false) do |dc|
|
||||||
|
@@ -507,7 +507,7 @@
|
||||||
|
assert_equal 'bar', dc.get(:foo)
|
||||||
|
|
||||||
|
resp = dc.get('123')
|
||||||
|
- assert_equal nil, resp
|
||||||
|
+ assert_nil resp
|
||||||
|
|
||||||
|
assert op_addset_succeeds(dc.set('123', 'xyz'))
|
||||||
|
|
||||||
|
@@ -561,7 +561,7 @@
|
||||||
|
assert_equal 'bar', dc.get(:foo)
|
||||||
|
|
||||||
|
resp = dc.get('123')
|
||||||
|
- assert_equal nil, resp
|
||||||
|
+ assert_nil resp
|
||||||
|
|
||||||
|
assert op_addset_succeeds(dc.set('123', 'xyz'))
|
||||||
|
|
||||||
|
diff --git a/test/test_encoding.rb b/test/test_encoding.rb
|
||||||
|
index 8f03e4a..7daf874 100644
|
||||||
|
--- a/test/test_encoding.rb
|
||||||
|
+++ b/test/test_encoding.rb
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
assert dc.set(key, 'bar', 1)
|
||||||
|
assert_equal 'bar', dc.get(key)
|
||||||
|
sleep 1.2
|
||||||
|
- assert_equal nil, dc.get(key)
|
||||||
|
+ assert_nil dc.get(key)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,151 @@
|
|||||||
|
%global gem_name dalli
|
||||||
|
|
||||||
|
# Depends on Rails and its needed by Rails
|
||||||
|
%bcond_with tests
|
||||||
|
|
||||||
|
Name: rubygem-%{gem_name}
|
||||||
|
Version: 3.2.0
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: High performance memcached client for Ruby
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/petergoldstein/dalli
|
||||||
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
|
# Tests are not shipped with the gem, you may get them like so
|
||||||
|
# git clone https://github.com/petergoldstein/dalli.git --no-checkout
|
||||||
|
# git -C dalli archive -v -o dalli-3.2.0-tests.txz v3.2.0 test/
|
||||||
|
Source1: %{gem_name}-%{version}-tests.txz
|
||||||
|
|
||||||
|
BuildRequires: ruby(release)
|
||||||
|
BuildRequires: rubygems-devel
|
||||||
|
%if %{with tests}
|
||||||
|
BuildRequires: memcached
|
||||||
|
BuildRequires: rubygem(minitest)
|
||||||
|
BuildRequires: rubygem(connection_pool)
|
||||||
|
%endif
|
||||||
|
BuildRequires: ruby
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
High performance memcached client for Ruby
|
||||||
|
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
Documentation for %{name}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{gem_name}-%{version} -b1
|
||||||
|
|
||||||
|
%build
|
||||||
|
gem build ../%{gem_name}-%{version}.gemspec
|
||||||
|
%gem_install
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
|
cp -pa .%{gem_dir}/* \
|
||||||
|
%{buildroot}%{gem_dir}/
|
||||||
|
|
||||||
|
%check
|
||||||
|
%if %{with tests}
|
||||||
|
pushd .%{gem_instdir}
|
||||||
|
# Symlink tests into place
|
||||||
|
ln -s %{_builddir}/test .
|
||||||
|
|
||||||
|
sed -i '/bundler/ s/^/#/' test/helper.rb
|
||||||
|
ruby -Ilib:test -rdalli -e "Dir.glob('./test/test_*.rb').sort.each{ |x| require x }"
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%dir %{gem_instdir}
|
||||||
|
%{gem_libdir}
|
||||||
|
%exclude %{gem_cache}
|
||||||
|
%{gem_spec}
|
||||||
|
%license %{gem_instdir}/LICENSE
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%doc %{gem_docdir}
|
||||||
|
%doc %{gem_instdir}/README.md
|
||||||
|
%doc %{gem_instdir}/History.md
|
||||||
|
%{gem_instdir}/Gemfile
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Jan 10 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.2.0-1
|
||||||
|
- Rebuilt for MSVSphere 9.3
|
||||||
|
|
||||||
|
* Mon Feb 07 2022 Pavel Valena <pvalena@redhat.com> - 3.2.0-1
|
||||||
|
- Update to dalli 3.2.0.
|
||||||
|
Resolves: rhbz#1689613
|
||||||
|
|
||||||
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.8-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.8-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.8-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.8-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.8-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.8-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.8-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.8-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 29 2018 Pavel Valena <pvalena@redhat.com> - 2.7.8-1
|
||||||
|
- Update to dalli 2.7.8.
|
||||||
|
|
||||||
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.6-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 18 2018 Vít Ondruch <vondruch@redhat.com> - 2.7.6-4
|
||||||
|
- Fix memcached 1.5.4 test compatibility.
|
||||||
|
|
||||||
|
* Wed Aug 30 2017 Pavel Valena <pvalena@redhat.com> - 2.7.6-3
|
||||||
|
- Fix FTBFS(tests only) in rawhide.
|
||||||
|
|
||||||
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.6-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 27 2017 Pavel Valena <pvalena@redhat.com> - 2.7.6-1
|
||||||
|
- Update to 2.7.6.
|
||||||
|
|
||||||
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.4-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Mar 18 2015 Josef Stribny <jstribny@redhat.com> - 2.7.4-1
|
||||||
|
- Update to 2.7.4
|
||||||
|
|
||||||
|
* Mon Jun 16 2014 Josef Stribny <jstribny@redhat.com> - 2.7.2-2
|
||||||
|
- Fix the test the right way
|
||||||
|
|
||||||
|
* Mon Jun 16 2014 Josef Stribny <jstribny@redhat.com> - 2.7.2-1
|
||||||
|
- Update to dalli 2.7.2
|
||||||
|
|
||||||
|
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.4-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Aug 08 2013 Josef Stribny <jstribny@redhat.com> - 2.6.4-2
|
||||||
|
- Enable tests
|
||||||
|
|
||||||
|
* Wed Jul 31 2013 Josef Stribny <jstribny@redhat.com> - 2.6.4-1
|
||||||
|
- Initial package
|
Loading…
Reference in new issue