rubygem-power_assert/rubygem-power_assert.spec

82 lines
2.0 KiB
RPMSpec
Raw Normal View History

2020-09-04 23:10:49 +08:00
%global gem_name power_assert
Name: rubygem-%{gem_name}
Version: 2.0.3
2020-09-04 23:10:49 +08:00
Release: 1
Summary: Power Assert for Ruby
License: Ruby or BSD
URL: https://github.com/k-tsj/power_assert
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: %{gem_name}-tests-%{version}.tar.gz
Source2: create-power_assert-test-files.sh
2020-09-04 23:10:49 +08:00
BuildRequires: rubygems-devel rubygem(test-unit) rubygem(byebug) rubygem(pry) ruby-irb
2020-09-04 23:10:49 +08:00
BuildArch: noarch
%description
Power Assert for Ruby. Power Assert shows each value of variables and method
calls in the expression. It is useful for testing, providing which value
wasn't correct when the condition is not satisfied.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -a 1
mv ../%{gem_name}-%{version}.gemspec .
2020-09-04 23:10:49 +08:00
%build
gem build %{gem_name}-%{version}.gemspec
2020-09-04 23:10:49 +08:00
%gem_install
cp -a ./test ./%{gem_instdir}/
2020-09-04 23:10:49 +08:00
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
rm -f %{buildroot}%{gem_cache}
2020-09-04 23:10:49 +08:00
pushd %{buildroot}%{gem_instdir}
rm -rf \
.gitignore .travis.yml \
.github/ \
Gemfile \
2020-09-04 23:10:49 +08:00
Rakefile \
*gemspec \
benchmarks \
bin/ \
test/ \
%{nil}
popd
%check
pushd .%{gem_instdir}
LANG=C.utf8
ruby -Ilib:. \
-e \
'Dir.glob("test/**/*_test.rb").each {|f| require f}'
popd
%files
%dir %{gem_instdir}
%license %{gem_instdir}/BSDL
%license %{gem_instdir}/COPYING
%license %{gem_instdir}/LEGAL
%doc %{gem_instdir}/README.md
2020-09-04 23:10:49 +08:00
%{gem_libdir}
%{gem_spec}
%exclude %{gem_cache}
%files doc
%doc %{gem_docdir}
%changelog
* Sat Sep 02 2023 wulei <wu_lei@hoperun.com> - 2.0.3-1
- Update to 2.0.3
2020-09-04 23:10:49 +08:00
* Thu Jul 30 2020 maminjie <maminjie1@huawei.com> - 1.1.6-1
- package init