Blame SPECS/rubygem-actionview.spec

c1a36c
%{?scl:%scl_package rubygem-%{gem_name}}
c1a36c
%{!?scl:%global pkg_name %{name}}
c1a36c
c1a36c
%global gem_name actionview
c1a36c
%global bootstrap 0
c1a36c
c1a36c
Name: %{?scl_prefix}rubygem-%{gem_name}
c1a36c
Version: 4.1.5
12d00a
Release: 4%{?dist}
c1a36c
Summary: Rendering framework putting the V in MVC (part of Rails)
c1a36c
Group: Development/Languages
c1a36c
License: MIT
c1a36c
URL: http://www.rubyonrails.org
c1a36c
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
c1a36c
# git clone http://github.com/rails/rails.git
c1a36c
# cd rails/actionview/
c1a36c
# git checkout v4.1.5
c1a36c
# tar czvf activesupport-4.1.5-tests.tgz test/
c1a36c
Source1: %{gem_name}-%{version}-tests.tgz
12d00a
12d00a
# Fix CVE-2016-0752 Possible Information Leak Vulnerability
12d00a
# https://bugzilla.redhat.com/show_bug.cgi?id=1301963
12d00a
Patch0: rubygem-actionview-4.1.14.1-CVE-2016-0752-fix-possible-information-leak-vulnerability.patch
12d00a
Patch1: rubygem-actionview-4.1.14.1-CVE-2016-0752-fix-possible-information-leak-vulnerability-tests.patch
12d00a
c1a36c
Requires: %{?scl_prefix_ruby}ruby(release)
c1a36c
Requires: %{?scl_prefix_ruby}ruby(rubygems)
c1a36c
Requires: %{?scl_prefix}rubygem(builder) >= 3.1
c1a36c
Requires: %{?scl_prefix}rubygem(builder) < 4.0
c1a36c
Requires: %{?scl_prefix}rubygem(erubis) >= 2.7.0
c1a36c
Requires: %{?scl_prefix}rubygem(erubis) < 3.0
c1a36c
Requires: %{?scl_prefix}rubygem(activesupport) = %{version}
c1a36c
BuildRequires: %{?scl_prefix_ruby}ruby(release)
c1a36c
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
c1a36c
%if 0%{bootstrap} < 1
c1a36c
BuildRequires: %{?scl_prefix}rubygem(activesupport) = %{version}
c1a36c
BuildRequires: %{?scl_prefix}rubygem(activerecord) = %{version}
c1a36c
BuildRequires: %{?scl_prefix}rubygem(actionpack) = %{version}
c1a36c
BuildRequires: %{?scl_prefix}rubygem(sqlite3)
c1a36c
BuildRequires: %{?scl_prefix_ruby}rubygem(minitest)
c1a36c
BuildRequires: %{?scl_prefix}rubygem(mocha) >= 0.9.8
c1a36c
%endif
c1a36c
BuildArch: noarch
c1a36c
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
c1a36c
c1a36c
%description
c1a36c
Simple, battle-tested conventions and helpers for building web pages.
c1a36c
c1a36c
%package doc
c1a36c
Summary: Documentation for %{pkg_name}
c1a36c
Group: Documentation
c1a36c
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
c1a36c
BuildArch: noarch
c1a36c
c1a36c
%description doc
c1a36c
Documentation for %{pkg_name}.
c1a36c
c1a36c
%prep
c1a36c
%setup -n %{pkg_name}-%{version} -q -c -T
c1a36c
%{?scl:scl enable %{scl} - << \EOF}
c1a36c
%gem_install -n %{SOURCE0}
c1a36c
%{?scl:EOF}
c1a36c
12d00a
pushd .%{gem_instdir}
12d00a
%patch0 -p2
12d00a
popd
12d00a
c1a36c
%build
c1a36c
c1a36c
%install
c1a36c
mkdir -p %{buildroot}%{gem_dir}
c1a36c
cp -pa .%{gem_dir}/* \
c1a36c
        %{buildroot}%{gem_dir}/
c1a36c
c1a36c
%if 0%{bootstrap} < 1
c1a36c
c1a36c
%check
c1a36c
pushd .%{gem_instdir}
c1a36c
c1a36c
tar xzvf %{SOURCE1} -C .
c1a36c
12d00a
patch -F 0 -p2 < %{PATCH1}
12d00a
c1a36c
# This requires rails git structure and only requires bundler in the end
c1a36c
sed -i "s|require File.expand_path('../../../load_paths', __FILE__)||" ./test/abstract_unit.rb
c1a36c
sed -i '16,18d' ./test/active_record_unit.rb
c1a36c
c1a36c
# Run separately as we need to avoid superclass mismatch errors
c1a36c
%{?scl:scl enable %{scl} - << \EOF}
c1a36c
ruby -Ilib:test -e "Dir.glob('./test/{actionpack,activerecord,lib}/*_test.rb').each {|t| require t}"
c1a36c
%{?scl:EOF}
c1a36c
%{?scl:scl enable %{scl} - << \EOF}
c1a36c
ruby -Ilib:test -e "Dir.glob('./test/template/*_test.rb').each {|t| require t}"
c1a36c
%{?scl:EOF}
c1a36c
c1a36c
popd
c1a36c
%endif
c1a36c
c1a36c
%files
c1a36c
%dir %{gem_instdir}
c1a36c
%{gem_libdir}
c1a36c
%exclude %{gem_cache}
c1a36c
%{gem_spec}
c1a36c
%doc %{gem_instdir}/MIT-LICENSE
c1a36c
c1a36c
%files doc
c1a36c
%doc %{gem_docdir}
c1a36c
%doc %{gem_instdir}/README.rdoc
c1a36c
%doc %{gem_instdir}/CHANGELOG.md
c1a36c
c1a36c
%changelog
12d00a
* Thu Feb 11 2016 Pavel Valena <pvalena@redhat.com> - 4.1.5-4
12d00a
- Fix Possible Information Leak Vulnerability - rhbz#1301963
12d00a
  - Resolves: CVE-2016-0752
12d00a
c1a36c
* Tue Jan 27 2015 Josef Stribny <jstribny@redhat.com> - 4.1.5-3
c1a36c
- Enable tests
c1a36c
c1a36c
* Thu Jan 22 2015 Josef Stribny <jstribny@redhat.com> - 4.1.5-2
c1a36c
- Convert to SCL
c1a36c
c1a36c
* Mon Aug 25 2014 Josef Stribny <jstribny@redhat.com> - 4.1.5-1
c1a36c
- Update to actionview 4.1.5
c1a36c
c1a36c
* Fri Jul 04 2014 Josef Stribny <jstribny@redhat.com> - 4.1.4-1
c1a36c
- Update to actionview 4.1.4
c1a36c
c1a36c
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-2
c1a36c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c1a36c
c1a36c
* Thu May 22 2014 Josef Stribny <jstribny@redhat.com> - 4.1.1-1
c1a36c
- Update to ActionView 4.1.1
c1a36c
c1a36c
* Tue Apr 15 2014 Josef Stribny <jstribny@redhat.com> - 4.1.0-2
c1a36c
- Unpack test suite in %%check
c1a36c
- Adjust tests to run with all dependencies
c1a36c
c1a36c
* Thu Apr 10 2014 Josef Stribny <jstribny@redhat.com> - 4.1.0-1
c1a36c
- Initial package