diff --git a/redis-4.0.1.gem b/redis-4.0.1.gem new file mode 100644 index 0000000000000000000000000000000000000000..f04f0025e3d9daf8eaa240cc0f8f0f33256ac37f Binary files /dev/null and b/redis-4.0.1.gem differ diff --git a/redis-test.conf b/redis-test.conf new file mode 100644 index 0000000000000000000000000000000000000000..3612b2b6ac0fa3af10c0176777f5b3cea4082b52 --- /dev/null +++ b/redis-test.conf @@ -0,0 +1,9 @@ +dir ./test/db +pidfile ./redis.pid +port 6381 +unixsocket ./redis.sock +timeout 300 +loglevel debug +logfile stdout +databases 16 +daemonize yes diff --git a/rubygem-redis.spec b/rubygem-redis.spec new file mode 100644 index 0000000000000000000000000000000000000000..5cf954e5dc26ba49f4390f8b2428d042f48b7a9e --- /dev/null +++ b/rubygem-redis.spec @@ -0,0 +1,67 @@ +%global gem_name redis +Name: rubygem-%{gem_name} +Version: 4.0.1 +Release: 1 +Summary: A Ruby client library for Redis +License: MIT +URL: https://github.com/redis/redis-rb +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# We will use this static file to start a testing redis server instance +Source1: redis-test.conf +BuildRequires: ruby ruby(release) rubygems-devel rubygem(test-unit) redis +BuildArch: noarch +%description +A Ruby client that tries to match Redis' API one-to-one, while still +providing an idiomatic interface. + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch +%description doc +Documentation for %{name}. + +%prep +%setup -q -c -T +%gem_install -n %{SOURCE0} + +%build + +%check +pushd .%{gem_instdir} +cp -p %{SOURCE1} test/test.conf +redis-server test/test.conf +LANG=C.UTF-8 +export SOCKET_PATH="test/db/redis.sock" +ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' +kill -INT `cat test/db/redis.pid` +popd + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ +rm -r %{buildroot}%{gem_instdir}/test + +%files +%dir %{gem_instdir} +%{gem_libdir} +%license %{gem_instdir}/LICENSE +%{gem_spec} +%exclude %{gem_cache} +%exclude %{gem_instdir}/.* + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/CHANGELOG.md +%doc %{gem_instdir}/README.md +%{gem_instdir}/%{gem_name}.gemspec +%{gem_instdir}/Gemfile +%{gem_instdir}/makefile +%{gem_instdir}/bors.toml +%{gem_instdir}/benchmarking/ +%{gem_instdir}/examples/ + +%changelog +* Tue Aug 18 2020 huangyangke - 4.0.1-1 +- package init diff --git a/rubygem-redis.yaml b/rubygem-redis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2d20b3958543c0e130ce02d61da28eca80f99278 --- /dev/null +++ b/rubygem-redis.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: redis/redis_rb +tag_prefix: "^v" +separator: "."