%{?scl:%scl_package rubygem-%{gem_name}} %{!?scl:%global pkg_name %{name}} %global gem_name actionview %global bootstrap 0 Name: %{?scl_prefix}rubygem-%{gem_name} Version: 5.0.1 Release: 3%{?dist} Summary: Rendering framework putting the V in MVC (part of Rails) Group: Development/Languages License: MIT URL: http://rubyonrails.org Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone http://github.com/rails/rails.git && cd rails/actionview/ # git checkout v5.0.1 && tar czvf actionview-5.0.1-tests.tgz test/ Source1: %{gem_name}-%{version}-tests.tgz Requires: %{?scl_prefix_ruby}ruby(release) Requires: %{?scl_prefix_ruby}ruby(rubygems) Requires: %{?scl_prefix}rubygem(activesupport) = %{version} Requires: %{?scl_prefix}rubygem(builder) >= 3.1 Requires: %{?scl_prefix}rubygem(builder) < 4 Requires: %{?scl_prefix}rubygem(erubis) >= 2.7.0 Requires: %{?scl_prefix}rubygem(erubis) < 2.8 Requires: %{?scl_prefix}rubygem(rails-dom-testing) >= 2.0 Requires: %{?scl_prefix}rubygem(rails-dom-testing) < 3 Requires: %{?scl_prefix}rubygem(rails-html-sanitizer) >= 1.0.2 Requires: %{?scl_prefix}rubygem(rails-html-sanitizer) < 2 BuildRequires: %{?scl_prefix_ruby}ruby(release) BuildRequires: %{?scl_prefix_ruby}rubygems-devel %if ! 0%{?bootstrap} BuildRequires: %{?scl_prefix}rubygem(activesupport) = %{version} BuildRequires: %{?scl_prefix}rubygem(activerecord) = %{version} BuildRequires: %{?scl_prefix}rubygem(actionpack) = %{version} BuildRequires: %{?scl_prefix}rubygem(railties) = %{version} BuildRequires: %{?scl_prefix}rubygem(sqlite3) %endif BuildArch: noarch Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} # Explicitly require runtime subpackage, as long as older scl-utils do not generate it %{?scl:Requires: %{?scl_prefix}runtime} %description Simple, battle-tested conventions and helpers for building web pages. %package doc Summary: Documentation for %{pkg_name} Group: Documentation Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{pkg_name}. %prep %setup -n %{pkg_name}-%{version} -q -c -T %{?scl:scl enable %{scl} - << \EOF} %gem_install -n %{SOURCE0} %{?scl:EOF} %build %install mkdir -p %{buildroot}%{gem_dir} cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %if ! 0%{?bootstrap} %check pushd .%{gem_instdir} tar xzvf %{SOURCE1} -C . # This requires rails git structure and only requires bundler in the end sed -i '16,18 s/^/#/' ./test/active_record_unit.rb # NoMethodError: undefined method `info?' for nil:NilClass # This should be likely fixed in ActiveRecord by this commit: # https://github.com/rails/rails/commit/9d0491937e520ac968919f7765b1209912d882a2 mv test/activerecord/render_partial_with_record_identification_test.rb{,.disable} # rails-html-sanitizer sanitize method's behavior is different for old libxml2. # The spaces are trimed. # require 'rails-html-sanitizer' # sanitizer = Rails::Html::WhiteListSanitizer.new # sanitizer.sanitize(' ') => ""(el6) / " "(el7) %if 0%{?rhel} < 7 sed -i '/^ def test_highlight_pending$/,/^ end$/ s/^/#/' \ test/template/text_helper_test.rb %endif %{?scl:scl enable %{scl} - << \EOF} set -e # Run separately as we need to avoid superclass mismatch errors for t in {actionpack,activerecord,template}; do ruby -Ilib:test -e "Dir.glob('./test/$t/**/*_test.rb').each {|t| require t}" done %{?scl:EOF} popd %endif %files # There is no %%license macro on RHEL6. # https://bugzilla.redhat.com/show_bug.cgi?id=1386246 %{!?_licensedir:%global license %%doc} %dir %{gem_instdir} %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %license %{gem_instdir}/MIT-LICENSE %files doc %doc %{gem_docdir} %doc %{gem_instdir}/README.rdoc %doc %{gem_instdir}/CHANGELOG.md %changelog * Mon Feb 06 2017 Jun Aruga - 5.0.1-3 - Improve tests. * Tue Jan 17 2017 Jun Aruga - 5.0.1-2 - Update to Action View 5.0.1. * Tue Aug 16 2016 Jun Aruga - 4.2.6-3 - Fix for CVE-2016-6316 Resolves: rhbz#1365008 * Tue Apr 05 2016 Pavel Valena - 4.2.6-2 - Enable tests - Fix build to be RHEL-6 compatible * Mon Apr 04 2016 Pavel Valena - 4.2.6-1 - Update to 4.2.6 * Wed Feb 17 2016 Pavel Valena - 4.2.5.1-5 - Update to actionview 4.2.5.1 * Thu Feb 11 2016 Pavel Valena - 4.1.5-4 - Fix Possible Information Leak Vulnerability - rhbz#1301963 - Resolves: CVE-2016-0752 * Tue Jan 27 2015 Josef Stribny - 4.1.5-3 - Enable tests * Thu Jan 22 2015 Josef Stribny - 4.1.5-2 - Convert to SCL * Mon Aug 25 2014 Josef Stribny - 4.1.5-1 - Update to actionview 4.1.5 * Fri Jul 04 2014 Josef Stribny - 4.1.4-1 - Update to actionview 4.1.4 * Sun Jun 08 2014 Fedora Release Engineering - 4.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu May 22 2014 Josef Stribny - 4.1.1-1 - Update to ActionView 4.1.1 * Tue Apr 15 2014 Josef Stribny - 4.1.0-2 - Unpack test suite in %%check - Adjust tests to run with all dependencies * Thu Apr 10 2014 Josef Stribny - 4.1.0-1 - Initial package