Blame SPECS/rubygem-rails-deprecated_sanitizer.spec

93d4fc
%{?scl:%scl_package rubygem-%{gem_name}}
93d4fc
%{!?scl:%global pkg_name %{name}}
93d4fc
93d4fc
# Generated from rails-deprecated_sanitizer-1.0.3.gem by gem2rpm -*- rpm-spec -*-
93d4fc
%global gem_name rails-deprecated_sanitizer
93d4fc
93d4fc
# Tests require rails-dom-testing, which depends on rails-deprecated_sanitizer
93d4fc
%global bootstrap 0
93d4fc
93d4fc
Name: %{?scl_prefix}rubygem-%{gem_name}
93d4fc
Version: 1.0.3
93d4fc
Release: 6%{?dist}
93d4fc
Summary: Deprecated sanitizer API extracted from Action View
93d4fc
Group: Development/Languages
93d4fc
License: MIT
93d4fc
URL: https://github.com/rails/rails-deprecated_sanitizer
93d4fc
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
93d4fc
93d4fc
Requires: %{?scl_prefix_ruby}ruby(release)
93d4fc
Requires: %{?scl_prefix_ruby}ruby(rubygems)
93d4fc
Requires: %{?scl_prefix}rubygem(activesupport)
93d4fc
BuildRequires: %{?scl_prefix_ruby}ruby(release)
93d4fc
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
93d4fc
BuildRequires: %{?scl_prefix_ruby}ruby
93d4fc
BuildRequires: %{?scl_prefix}rubygem(activesupport)
93d4fc
%if 0%{bootstrap} < 1
93d4fc
BuildRequires: %{?scl_prefix}rubygem(actionview)
93d4fc
%endif
93d4fc
BuildRequires: %{?scl_prefix_ruby}rubygem(minitest)
93d4fc
BuildArch: noarch
93d4fc
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
93d4fc
93d4fc
%description
93d4fc
In Rails 4.2 HTML sanitization has been rewritten using a more secure library.
93d4fc
93d4fc
This gem includes the old behavior shipping with Rails 4.2 and before. It is
93d4fc
strictly provided to ease migration. It will be supported until Rails 5.
93d4fc
93d4fc
%package doc
93d4fc
Summary: Documentation for %{pkg_name}
93d4fc
Group: Documentation
93d4fc
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
93d4fc
BuildArch: noarch
93d4fc
93d4fc
%description doc
93d4fc
Documentation for %{pkg_name}.
93d4fc
93d4fc
%prep
93d4fc
%{?scl:scl enable %{scl} - << \EOF}
93d4fc
gem unpack %{SOURCE0}
93d4fc
%{?scl:EOF}
93d4fc
93d4fc
%setup -q -D -T -n  %{gem_name}-%{version}
93d4fc
93d4fc
%{?scl:scl enable %{scl} - << \EOF}
93d4fc
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
93d4fc
%{?scl:EOF}
93d4fc
93d4fc
# Relax AS dependency.
93d4fc
sed -i '/activesupport/ s/4.2.0/4.1.0/' %{gem_name}.gemspec
93d4fc
93d4fc
%build
93d4fc
# Create the gem as gem install only works on a gem file
93d4fc
%{?scl:scl enable %{scl} - << \EOF}
93d4fc
gem build %{gem_name}.gemspec
93d4fc
%{?scl:EOF}
93d4fc
93d4fc
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
93d4fc
# by default, so that we can move it into the buildroot in %%install
93d4fc
%{?scl:scl enable %{scl} - << \EOF}
93d4fc
%gem_install
93d4fc
%{?scl:EOF}
93d4fc
93d4fc
%install
93d4fc
mkdir -p %{buildroot}%{gem_dir}
93d4fc
cp -a .%{gem_dir}/* \
93d4fc
        %{buildroot}%{gem_dir}/
93d4fc
93d4fc
# Run the test suite
93d4fc
%check
93d4fc
%if 0%{bootstrap} < 1
93d4fc
pushd .%{gem_instdir}
93d4fc
# Don't use Bundler.
93d4fc
sed -i "/require 'bundler\/setup'/ s/^/#/" test/test_helper.rb
93d4fc
93d4fc
# ActiveSupport::TestCase.test_order is not available in AS 4.1.
93d4fc
sed -i "/\.test_order/ s/^/#/" test/test_helper.rb
93d4fc
93d4fc
%{?scl:scl enable %{scl} - << \EOF}
93d4fc
ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
93d4fc
%{?scl:EOF}
93d4fc
popd
93d4fc
%endif
93d4fc
93d4fc
%files
93d4fc
%dir %{gem_instdir}
93d4fc
%{gem_libdir}
93d4fc
%exclude %{gem_cache}
93d4fc
%{gem_spec}
93d4fc
93d4fc
%files doc
93d4fc
%doc %{gem_docdir}
93d4fc
%doc %{gem_instdir}/CHANGELOG.md
93d4fc
%doc %{gem_instdir}/README.md
93d4fc
%{gem_instdir}/test
93d4fc
93d4fc
%changelog
93d4fc
* Sat Feb 20 2016 Pavel Valena <pvalena@redhat.com> - 1.0.3-6
93d4fc
- Add scl macros
93d4fc
93d4fc
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-4
93d4fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
93d4fc
93d4fc
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-3
93d4fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
93d4fc
93d4fc
* Thu Jan 22 2015 Vít Ondruch <vondruch@redhat.com> - 1.0.3-2
93d4fc
- Relax ActiveSupport dependency.
93d4fc
93d4fc
* Tue Jan 20 2015 Vít Ondruch <vondruch@redhat.com> - 1.0.3-1
93d4fc
- Initial package