|
|
ea0ce7 |
%{?scl:%scl_package rubygem-%{gem_name}}
|
|
|
ea0ce7 |
%{!?scl:%global pkg_name %{name}}
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%global gem_name loofah
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
Name: %{?scl_prefix}rubygem-%{gem_name}
|
|
|
ea0ce7 |
Version: 2.0.3
|
|
|
ea0ce7 |
Release: 3%{?dist}
|
|
|
ea0ce7 |
Summary: Manipulate and transform HTML/XML documents and fragments
|
|
|
ea0ce7 |
Group: Development/Languages
|
|
|
ea0ce7 |
License: MIT
|
|
|
ea0ce7 |
URL: https://github.com/flavorjones/loofah
|
|
|
ea0ce7 |
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
ea0ce7 |
Patch0001: 0001-Updating-test-to-support-libxml-2.9.3-behavior.patch
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
Requires: %{?scl_prefix_ruby}ruby(release)
|
|
|
ea0ce7 |
Requires: %{?scl_prefix_ruby}ruby(rubygems)
|
|
|
ea0ce7 |
Requires: %{?scl_prefix}rubygem(nokogiri) >= 1.6.6.2
|
|
|
ea0ce7 |
BuildRequires: %{?scl_prefix_ruby}ruby(release)
|
|
|
ea0ce7 |
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
|
|
|
ea0ce7 |
BuildRequires: %{?scl_prefix}rubygem(nokogiri) >= 1.6.6.2
|
|
|
ea0ce7 |
BuildRequires: %{?scl_prefix_ruby}rubygem(minitest)
|
|
|
ea0ce7 |
BuildRequires: %{?scl_prefix}rubygem(rr)
|
|
|
ea0ce7 |
BuildArch: noarch
|
|
|
ea0ce7 |
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
# Explicitly require runtime subpackage, as long as older scl-utils do not generate it
|
|
|
ea0ce7 |
%{?scl:Requires: %{?scl_prefix}runtime}
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%description
|
|
|
ea0ce7 |
Loofah is a general library for manipulating and transforming HTML/XML
|
|
|
ea0ce7 |
documents and fragments. It's built on top of Nokogiri and libxml2, so
|
|
|
ea0ce7 |
it's fast and has a nice API.
|
|
|
ea0ce7 |
Loofah excels at HTML sanitization (XSS prevention). It includes some
|
|
|
ea0ce7 |
nice HTML sanitizers, which are based on HTML5lib's whitelist, so it
|
|
|
ea0ce7 |
most likely won't make your codes less secure.
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%package doc
|
|
|
ea0ce7 |
Summary: Documentation for %{pkg_name}
|
|
|
ea0ce7 |
Group: Documentation
|
|
|
ea0ce7 |
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
|
|
|
ea0ce7 |
BuildArch: noarch
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%description doc
|
|
|
ea0ce7 |
Documentation for %{pkg_name}
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%prep
|
|
|
ea0ce7 |
%setup -n %{pkg_name}-%{version} -q -c -T
|
|
|
ea0ce7 |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
ea0ce7 |
%gem_install -n %{SOURCE0}
|
|
|
ea0ce7 |
%{?scl:EOF}
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
pushd .%{gem_instdir}
|
|
|
ea0ce7 |
%patch0001 -p1
|
|
|
ea0ce7 |
popd
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%build
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%install
|
|
|
ea0ce7 |
mkdir -p %{buildroot}%{gem_dir}
|
|
|
ea0ce7 |
cp -a .%{gem_dir}/* \
|
|
|
ea0ce7 |
%{buildroot}%{gem_dir}/
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%check
|
|
|
ea0ce7 |
pushd .%{gem_instdir}
|
|
|
ea0ce7 |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
ea0ce7 |
ruby -I"lib:test" -e \
|
|
|
ea0ce7 |
'Dir.glob "./test/**/test_*.rb", &method(:require)'
|
|
|
ea0ce7 |
%{?scl:EOF}
|
|
|
ea0ce7 |
popd
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%files
|
|
|
ea0ce7 |
%dir %{gem_instdir}
|
|
|
ea0ce7 |
%{gem_instdir}/MIT-LICENSE.txt
|
|
|
ea0ce7 |
%doc %{gem_instdir}/README.rdoc
|
|
|
ea0ce7 |
%{gem_libdir}
|
|
|
ea0ce7 |
%exclude %{gem_cache}
|
|
|
ea0ce7 |
%{gem_spec}
|
|
|
ea0ce7 |
%exclude %{gem_instdir}/.*
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%files doc
|
|
|
ea0ce7 |
%doc %{gem_docdir}
|
|
|
ea0ce7 |
%doc %{gem_instdir}/Manifest.txt
|
|
|
ea0ce7 |
%doc %{gem_instdir}/CHANGELOG.rdoc
|
|
|
ea0ce7 |
%{gem_instdir}/Rakefile
|
|
|
ea0ce7 |
%{gem_instdir}/Gemfile
|
|
|
ea0ce7 |
%exclude %{gem_instdir}/benchmark
|
|
|
ea0ce7 |
%exclude %{gem_instdir}/test
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
%changelog
|
|
|
ea0ce7 |
* Thu Jul 28 2016 Pavel Valena <pvalena@redhat.com> - 2.0.3-3
|
|
|
ea0ce7 |
- Include Gemfile and Rakefile in -doc subpackage
|
|
|
ea0ce7 |
- Do not use %%license macro
|
|
|
ea0ce7 |
- Explicitly require runtime subpackage
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
* Mon Feb 22 2016 Pavel Valena <pvalena@redhat.com> - 2.0.3-3
|
|
|
ea0ce7 |
- Add scl macros
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-2
|
|
|
ea0ce7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
* Mon Jan 11 2016 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.0.3-1
|
|
|
ea0ce7 |
- Update to loofah 2.0.3 (rhbz#1256165)
|
|
|
ea0ce7 |
- Use %%autosetup macro
|
|
|
ea0ce7 |
- Drop macros for Fedora 20 (it is now EOL)
|
|
|
ea0ce7 |
- Drop unneeded %%license definition
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-2
|
|
|
ea0ce7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
* Mon May 25 2015 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.0.2-1
|
|
|
ea0ce7 |
- Update to loofah 2.0.2 (rhbz#1218819)
|
|
|
ea0ce7 |
- Drop patch to skip failing test (it works now, with Nokogiri 1.6.6.2)
|
|
|
ea0ce7 |
- Drop Fedora 19 support
|
|
|
ea0ce7 |
- Use %%license macro
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
* Thu Sep 11 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.0.1-1
|
|
|
ea0ce7 |
- Update to loofah 2.0.1 (RHBZ #1132898)
|
|
|
ea0ce7 |
- Drop upstreamed RR patch
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
|
|
|
ea0ce7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
* Mon May 12 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.0.0-1
|
|
|
ea0ce7 |
- Update to loofah 2.0.0 (RHBZ #1096760)
|
|
|
ea0ce7 |
- Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1
|
|
|
ea0ce7 |
|
|
|
ea0ce7 |
* Sat Dec 28 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.2.1-1
|
|
|
ea0ce7 |
- Initial package
|