package init

This commit is contained in:
small_leek 2020-07-31 15:49:10 +08:00
parent bcf43b0645
commit acfb6444d1
3 changed files with 96 additions and 0 deletions

BIN
minitest-4.7.0.gem Normal file

Binary file not shown.

92
rubygem-minitest4.spec Normal file
View File

@ -0,0 +1,92 @@
%global gem_name minitest
# Use full EVR for provides
%global __provides_exclude_from %{gem_spec}
Summary: Small and fast replacement for ruby's huge and slow test/unit
Name: rubygem-%{gem_name}4
# With 4.7.5, some test fails, so for now use 4.7.0
Version: 4.7.0
Release: 1
License: MIT
URL: https://github.com/seattlerb/minitest
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: rubygems-devel ruby(release)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}-%{release}
# Also provide this
Provides: rubygem(%{gem_name}4) = %{version}-%{release}
Conflicts: rubygem-minitest < 4.7.0-3
%description
minitest/unit is a small and fast replacement for ruby's huge and slow
test/unit. This is meant to be clean and easy to use both as a regular
test writer and for language implementors that need a minimal set of
methods to bootstrap a working unit test suite.
miniunit/spec is a functionally complete spec engine.
miniunit/mock, by Steven Baker, is a beautifully tiny mock object framework.
This is a compatibitity package for minitest version 4.x.y.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
%description doc
This package contains documentation for %{name}.
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
gem build %{gem_name}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -pa .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
find %{buildroot}%{gem_instdir}/lib -type f | \
xargs -n 1 sed -i -e '/^#!\/usr\/bin\/ruby.*/d'
# Ships with extremely tight permissions, bring them inline with other gems
find %{buildroot}%{gem_instdir} -type f | \
xargs chmod 0644
# Cleanup
rm -f %{buildroot}%{gem_instdir}/{.autotest,.gemtest}
rm -f %{buildroot}%{gem_cache}
rm -rf %{buildroot}%{gem_instdir}/{Rakefile,test/}
%check
pushd .%{gem_instdir}
# spec test suite is unstable.
# https://github.com/seattlerb/minitest/issues/257
mv test/minitest/test_minitest_spec.rb{,.ignore}
for f in test/minitest/test_*.rb
do
ruby -Ilib:.:./test $f
done
%files
%doc %{gem_instdir}/History.txt
%doc %{gem_instdir}/Manifest.txt
%license %{gem_instdir}/README.txt
%dir %{gem_instdir}
%{gem_libdir}/
%{gem_spec}
%files doc
%{gem_instdir}/design_rationale.rb
%doc %{gem_docdir}/
%changelog
* Mon Jul 27 2020 wangxiao <wangxiao65@huawei.com> - 4.7.0-1
- package init

4
rubygem-minitest4.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: seattlerb/minitest
tag_prefix: "^v"
seperator: "."