# Generated from loofah-2.12.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name loofah

Name: rubygem-%{gem_name}
Version: 2.12.0
Release: 1%{?dist}
Summary: Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri
License: MIT
URL: https://github.com/flavorjones/loofah
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
# BuildRequires: rubygem(hoe-markdown) >= 1.3
# BuildRequires: rubygem(hoe-markdown) < 2
# BuildRequires: rubygem(json) >= 2.2
# BuildRequires: rubygem(json) < 3
# BuildRequires: rubygem(minitest) >= 5.14
# BuildRequires: rubygem(minitest) < 6
# BuildRequires: rubygem(rr) >= 1.2.0
# BuildRequires: rubygem(rr) < 1.3
# BuildRequires: rubygem(rubocop) >= 1.1
# BuildRequires: rubygem(rubocop) < 2
BuildArch: noarch

%description
Loofah is a general library for manipulating and transforming HTML/XML
documents and fragments, built on top of Nokogiri.
Loofah excels at HTML sanitization (XSS prevention). It includes some nice
HTML sanitizers, which are based on HTML5lib's safelist, so it most likely
won't make your codes less secure. (These statements have not been evaluated
by Netexperts.)
ActiveRecord extensions for sanitization are available in the
[`loofah-activerecord`
gem](https://github.com/flavorjones/loofah-activerecord).


%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}
# ruby -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
popd

%files
%dir %{gem_instdir}
%license %{gem_instdir}/MIT-LICENSE.txt
%{gem_instdir}/SECURITY.md
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/README.md

%changelog
* Mon Sep 13 2021 mockbuilder - 2.12.0-1
- Initial package