diff --git a/rr-1.2.1-tests.tgz b/rr-1.2.1-tests.tgz new file mode 100644 index 0000000..86860b4 Binary files /dev/null and b/rr-1.2.1-tests.tgz differ diff --git a/rr-1.2.1.gem b/rr-1.2.1.gem new file mode 100644 index 0000000..6158744 Binary files /dev/null and b/rr-1.2.1.gem differ diff --git a/rubygem-rr.spec b/rubygem-rr.spec new file mode 100644 index 0000000..e463d88 --- /dev/null +++ b/rubygem-rr.spec @@ -0,0 +1,77 @@ +%global gem_name rr + +Name: rubygem-%{gem_name} +Version: 1.2.1 +Release: 1 +Summary: RR is a test double framework with a terse syntax +License: MIT +URL: https://rr.github.io/rr +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# git clone https://github.com/rr/rr.git && cd rr +# git checkout v1.2.1 && tar czvf rr-1.2.1-tests.tgz test/ +Source1: %{gem_name}-%{version}-tests.tgz +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: ruby +# The following are for running test suite +BuildRequires: rubygem(test-unit) +BuildRequires: rubygem(test-unit-rr) +BuildArch: noarch + +%description +RR is a test double framework that features a rich selection of double +techniques and a terse syntax. + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name}. + +%prep +%setup -q -n %{gem_name}-%{version} + +%build +# Create the gem as gem install only works on a gem file +gem build ../%{gem_name}-%{version}.gemspec + +# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir +# by default, so that we can move it into the buildroot in %%install +%gem_install + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +pushd .%{gem_instdir} +tar xvzf %{SOURCE1} +ruby test/run-test.rb +popd + +%files +%dir %{gem_instdir} +%license %{gem_instdir}/LICENSE +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} +%{gem_instdir}/Appraisals +%{gem_instdir}/CHANGES.md +%{gem_instdir}/CREDITS.md +%{gem_instdir}/Gemfile +%doc %{gem_instdir}/README.md +%{gem_instdir}/Rakefile +%doc %{gem_instdir}/doc +%{gem_instdir}/gemfiles +%{gem_instdir}/rr.gemspec +%{gem_instdir}/spec + +%changelog +* Thu Mar 3 2022 caodongxia - 1.2.1-1 +- Init package