rubygem-liquid/rubygem-liquid.spec

74 lines
2.3 KiB
RPMSpec
Raw Normal View History

2020-08-18 16:32:37 +08:00
%global gem_name liquid
Name: rubygem-%{gem_name}
Summary: Secure, non-evaling end user template engine
Version: 4.0.3
Release: 2
2020-08-18 16:32:37 +08:00
License: MIT
URL: http://www.liquidmarkup.org
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Patch1: 01-test-unit-context-disable-stack-profiler.patch
Patch2: 02-test-helper-remove-shebang-and-executable-bit.patch
Patch3: 03-tests-integration-drop_test-disable-tests-broken-wit.patch
Patch4: 04-fix-parse-tree-visitor-test-for-ruby-head.patch
2020-08-18 16:32:37 +08:00
BuildArch: noarch
BuildRequires: ruby(release) ruby >= 2.1.0 rubygems-devel >= 1.3.7
BuildRequires: rubygem(bigdecimal) rubygem(minitest)
Requires: rubygem(bigdecimal)
%description
Liquid is a template engine which was written with very specific requirements:
* It has to have beautiful and simple markup. Template engines which don't
produce good looking markup are no fun to use.
* It needs to be non evaling and secure. Liquid templates are made so that
users can edit them. You don't want to run code on your server which your
users wrote.
* It has to be stateless. Compile and render steps have to be separate so that
the expensive parsing and compiling can be done once and later on you can
just render it passing in a hash with local variables and objects.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
2020-08-18 16:32:37 +08:00
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
ruby -I"lib:test" -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
popd
%files
%license %{gem_instdir}/LICENSE
%dir %{gem_instdir}
%{gem_libdir}
%{gem_spec}
%exclude %{gem_cache}
%files doc
%doc %{gem_instdir}/History.md
%doc %{gem_instdir}/README.md
%doc %{gem_docdir}
%{gem_instdir}/test
%changelog
* Thu Feb 10 2022 xu_ping <xuping33@huawei.com> - 4.0.3-2
- Fix ParseTreeVisitor error and DropsTest failure
2020-08-18 16:32:37 +08:00
* Thu Jul 30 2020 wutao <wutao61@huawei.com> - 4.0.3-1
- package init