rubygem-actionview/rubygem-actionview.spec

119 lines
3.1 KiB
RPMSpec
Raw Normal View History

%global gem_name actionview
%bcond_with bootstrap
Name: rubygem-%{gem_name}
2023-01-19 16:20:52 +08:00
Version: 7.0.4
Release: 1
Summary: Rendering framework putting the V in MVC (part of Rails)
License: MIT
URL: http://rubyonrails.org
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
2023-01-19 16:20:52 +08:00
# The gem doesn't ship with the test suite.
# You may check it out like so
# git clone http://github.com/rails/rails.git
# cd rails/actionview && git archive -v -o actionview-7.0.4-tests.txz v7.0.4 test/
Source1: %{gem_name}-%{version}-tests.txz
2023-01-19 16:20:52 +08:00
# The tools are needed for the test suite, are however unpackaged in gem file.
# You may get them like so
# git clone http://github.com/rails/rails.git --no-checkout
# cd rails && git archive -v -o rails-7.0.4-tools.txz v7.0.4 tools/
Source2: rails-%{version}-tools.txz
2023-01-19 16:20:52 +08:00
# Fixes for Minitest 5.16+
# https://github.com/rails/rails/pull/45380
Patch0: rubygem-actionview-7.0.2.3-Remove-the-multi-call-form-of-assert_called_with.patch
# https://github.com/rails/rails/pull/45370
Patch1: rubygem-actionview-7.0.2.3-Fix-tests-for-minitest-5.16.patch
BuildRequires: ruby(release)
2023-01-19 16:20:52 +08:00
BuildRequires: rubygems-devel rubygem(did_you_mean)
%if %{without bootstrap}
BuildRequires: rubygem(activesupport) = %{version}
BuildRequires: rubygem(activerecord) = %{version}
BuildRequires: rubygem(actionpack) = %{version}
BuildRequires: rubygem(railties) = %{version}
BuildRequires: rubygem(sqlite3)
2021-08-04 10:14:21 +08:00
%endif
BuildArch: noarch
2020-08-28 15:46:57 +08:00
%description
Simple, battle-tested conventions and helpers for building web pages.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
2021-08-04 10:14:21 +08:00
Documentation for %{name}.
2020-08-28 15:46:57 +08:00
%prep
%setup -q -n %{gem_name}-%{version} -b1 -b2
2020-08-28 15:46:57 +08:00
2023-01-19 16:20:52 +08:00
pushd %{_builddir}
%patch0 -p2
%patch1 -p2
popd
2020-08-28 15:46:57 +08:00
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
2020-08-28 15:46:57 +08:00
%install
mkdir -p %{buildroot}%{gem_dir}
2021-08-04 10:14:21 +08:00
cp -pa .%{gem_dir}/* \
2020-08-28 15:46:57 +08:00
%{buildroot}%{gem_dir}/
%if %{without bootstrap}
2021-06-25 16:03:04 +08:00
%check
ln -s %{gem_dir}/gems/activerecord-%{version}/ .%{gem_dir}/gems/activerecord
2021-06-25 16:03:04 +08:00
pushd .%{gem_instdir}
ln -s %{_builddir}/tools ..
mv %{_builddir}/test .
2023-01-19 16:20:52 +08:00
# Test failure
# https://github.com/rails/rails/issues/46130
mv test/template/date_helper_i18n_test.rb{,.disable}
find test -type f -name '*_test.rb' -print0 | \
sort -z | \
xargs -0 -n1 -i sh -c "echo '* Test file: {}'; ruby -Itest -- '{}' || exit 255"
2021-06-25 16:03:04 +08:00
popd
2021-08-04 10:14:21 +08:00
%endif
2021-06-25 16:03:04 +08:00
2020-08-28 15:46:57 +08:00
%files
%dir %{gem_instdir}
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
2021-08-04 10:14:21 +08:00
%license %{gem_instdir}/MIT-LICENSE
2020-08-28 15:46:57 +08:00
%files doc
%doc %{gem_docdir}
2021-06-07 16:49:21 +08:00
%doc %{gem_instdir}/README.rdoc
2021-08-04 10:14:21 +08:00
%doc %{gem_instdir}/CHANGELOG.md
2020-08-28 15:46:57 +08:00
%changelog
2023-01-19 16:20:52 +08:00
* Thu Jan 19 2023 yanxiaobing <yanxiaobing@huawei.com> - 7.0.4-1
- Upgrade to version 7.0.4
2022-06-08 14:36:23 +08:00
* Mon May 02 2022 wangkerong <wangkerong@h-partners.com>- 6.1.4.1-1
- Upgrade to 6.1.4.1
2021-08-04 10:14:21 +08:00
* Wed Aug 04 2021 wangyue <wangyue92@huawei.com> - 5.2.4.4-2
- revert to 5.2.4.4
2021-06-25 16:03:04 +08:00
* Fri Jun 25 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 6.0.3.4-2
- Add code testing
2021-06-07 16:49:21 +08:00
* Mon Jun 07 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 6.0.3.4-1
- Update to 6.0.3.4
2022-06-17 06:19:45 +00:00
* Mon Feb 8 2021 sunguoshuai<sunguoshuai@huawei.com>- 5.2.4.4-1
- Upgrade to 5.2.4.4
2020-08-28 15:46:57 +08:00
* Sat Aug 8 2020 chengzihan <chengzihan2@huawei.com> - 5.2.3-1
- Package init