|
|
|
@ -1,33 +1,25 @@
|
|
|
|
|
%global gem_name dalli
|
|
|
|
|
|
|
|
|
|
# Depends on Rails and its needed by Rails
|
|
|
|
|
%global enable_test 0
|
|
|
|
|
%bcond_with tests
|
|
|
|
|
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 2.7.8
|
|
|
|
|
Release: 9%{?dist}
|
|
|
|
|
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
|
|
|
|
|
# git clone https://github.com/petergoldstein/dalli.git && cd dalli
|
|
|
|
|
# git checkout v2.7.8 && tar czvf dalli-2.7.8-tests.tgz test/
|
|
|
|
|
Source1: %{gem_name}-%{version}-tests.tgz
|
|
|
|
|
|
|
|
|
|
# Use 'assert_nil ...' instead of 'assert_equal nil, ...'
|
|
|
|
|
# https://github.com/petergoldstein/dalli/pull/661
|
|
|
|
|
Patch0: rubygem-dalli-2.7.6-Use-assert_nil-in-tests.patch
|
|
|
|
|
# Fix memcached 1.5.4 test compatibility.
|
|
|
|
|
# https://github.com/petergoldstein/dalli/pull/672
|
|
|
|
|
Patch1: rubygem-dalli-2.7.6-Fix-memcached-1.5.4-compatibility.patch
|
|
|
|
|
# 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 0%{enable_test} > 0
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: memcached
|
|
|
|
|
BuildRequires: rubygem(minitest)
|
|
|
|
|
BuildRequires: rubygem(mocha)
|
|
|
|
|
BuildRequires: rubygem(rails)
|
|
|
|
|
BuildRequires: rubygem(connection_pool)
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: ruby
|
|
|
|
@ -46,7 +38,7 @@ BuildArch: noarch
|
|
|
|
|
Documentation for %{name}
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{gem_name}-%{version}
|
|
|
|
|
%setup -q -n %{gem_name}-%{version} -b1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
|
|
@ -58,13 +50,13 @@ cp -pa .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if 0%{enable_test} > 0
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
tar xzvf %{SOURCE1}
|
|
|
|
|
cat %{PATCH0} | patch -p1
|
|
|
|
|
cat %{PATCH1} | patch -p1
|
|
|
|
|
# Symlink tests into place
|
|
|
|
|
ln -s %{_builddir}/test .
|
|
|
|
|
|
|
|
|
|
sed -i '/bundler/ s/^/#/' test/helper.rb
|
|
|
|
|
ruby -Ilib:test -e "Dir.glob('./test/test_*.rb').sort.each{ |x| require x }"
|
|
|
|
|
ruby -Ilib:test -rdalli -e "Dir.glob('./test/test_*.rb').sort.each{ |x| require x }"
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
@ -82,6 +74,10 @@ popd
|
|
|
|
|
%{gem_instdir}/Gemfile
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
|