%{?scl:%scl_package rubygem-%{gem_name}} %{!?scl:%global pkg_name %{name}} # Generated from activeresource-2.0.1.gem by gem2rpm -*- rpm-spec -*- %global gem_name activeresource Name: %{?scl_prefix}rubygem-%{gem_name} Epoch: 1 Version: 4.0.0 Release: 9%{?dist} Summary: REST modeling framework (part of Rails) Group: Development/Languages License: MIT URL: http://www.rubyonrails.org Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # Also the activeresource gem doesn't ship with the test suite. # You may check it out like so # git clone https://github.com/rails/activeresource.git # cd activeresource/ # git checkout v4.0.0 # tar czvf activeresource-4.0.0-tests.tgz test/ Source1: activeresource-%{version}-tests.tgz # License file from the git repo Source2: MIT-LICENSE # Include the root element in JSON responses for all tests. # https://github.com/packagethief/activeresource/commit/bbb60aede4930068d8cb6870032543bcc34c6b55 Patch0: rubygem-activeresource-4.0.0-Include-the-root-element-in-JSON-responses-for-all-tests.patch Requires: %{?scl_prefix_ruby}ruby(release) Requires: %{?scl_prefix_ruby}ruby(rubygems) Requires: %{?scl_prefix}rubygem(activesupport) => 4.0 Requires: %{?scl_prefix}rubygem(activesupport) < 5 Requires: %{?scl_prefix}rubygem(activemodel) => 4.0 Requires: %{?scl_prefix}rubygem(activemodel) < 5 Requires: %{?scl_prefix}rubygem(rails-observers) => 0.1.1 Requires: %{?scl_prefix}rubygem(rails-observers) < 0.2 BuildRequires: %{?scl_prefix_ruby}ruby(release) BuildRequires: %{?scl_prefix_ruby}rubygems-devel BuildRequires: %{?scl_prefix_ruby}ruby BuildRequires: %{?scl_prefix_ruby}rubygem(minitest) BuildRequires: %{?scl_prefix}rubygem(activemodel) >= 4.0 BuildRequires: %{?scl_prefix}rubygem(activemodel) < 5.0 BuildRequires: %{?scl_prefix}rubygem(activesupport) >= 4.0 BuildRequires: %{?scl_prefix}rubygem(activesupport) < 5.0 BuildRequires: %{?scl_prefix}rubygem(rails-observers) >= 0.1.1 BuildRequires: %{?scl_prefix}rubygem(rails-observers) < 0.2.0 BuildRequires: %{?scl_prefix}rubygem(mocha) BuildArch: noarch Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} %description REST on Rails. Wrap your RESTful web app with Ruby classes and work with them like Active Record models. %package doc Summary: Documentation for %{pkg_name} Group: Documentation Requires: %{?scl_prefix}%{pkg_name} = %{epoch}:%{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} # Move license into place cp %{SOURCE2} .%{gem_instdir}/MIT-LICENSE %build %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* %{buildroot}%{gem_dir} # Remove backup files find %{buildroot}/%{gem_instdir} -type f -name "*~" -delete # Delete zero-length files find %{buildroot}/%{gem_instdir} -type f -size 0c -exec rm -rvf {} \; # Fix anything executable that does not have a shebang for file in `find %{buildroot}/%{gem_instdir} -type f -perm /a+x`; do [ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file done # Find files with a shebang that do not have executable permissions for file in `find %{buildroot}/%{gem_instdir} -type f ! -perm /a+x -name "*.rb"`; do [ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 755 $file done %check %{?scl:scl enable %{scl} - << \EOF} set -e pushd .%{gem_instdir} tar xzvf %{SOURCE1} cat %{PATCH0} | patch -p1 # load_path is not available, remove its require. sed -i '1,+1d' test/abstract_unit.rb ruby -Ilib:test -e "Dir.glob('./test/**/*_test.rb').sort{ |x,y| y <=> x }.each {|t| require t}" popd %{?scl:EOF} %files %dir %{gem_instdir} %license %{gem_instdir}/MIT-LICENSE %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/README.rdoc %changelog * Wed Apr 06 2016 Pavel Valena - 1:4.0.0-9 - Add scl macros * Thu Feb 04 2016 Fedora Release Engineering - 1:4.0.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Jul 14 2015 Vít Ondruch - 1:4.0.0-7 - Return back the missing epoch from require. * Wed Jul 08 2015 Vít Ondruch - 1:4.0.0-6 - Requires and Provides are autogenerated now. * Thu Jun 18 2015 Fedora Release Engineering - 1:4.0.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Jun 10 2014 Josef Stribny - 1:4.0.0-4 - Stabilize test suite * Sun Jun 08 2014 Fedora Release Engineering - 1:4.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Nov 21 2013 Josef Stribny - 1:4.0.0-2 - Adjust deps * Tue Jul 30 2013 Josef Stribny - 1:4.0.0-1 - Update to ActiveResource 4.0.0. * Tue Mar 19 2013 Vít Ondruch - 1:3.2.13-1 - Update to ActiveResource 3.2.13. * Mon Mar 04 2013 Vít Ondruch - 1:3.2.12-2 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 * Tue Feb 12 2013 Vít Ondruch - 1:3.2.12-1 - Update to ActiveResource 3.2.12. * Wed Jan 09 2013 Vít Ondruch - 1:3.2.11-1 - Update to ActiveResource 3.2.11. * Thu Jan 03 2013 Vít Ondruch - 1:3.2.10-1 - Update to ActiveResource 3.2.10. * Mon Aug 13 2012 Vít Ondruch - 1:3.2.8-1 - Update to ActiveResource 3.2.8. * Mon Jul 30 2012 Vít Ondruch - 1:3.2.7-1 - Update to ActiveResource 3.2.7. * Tue Jul 24 2012 Vít Ondruch - 1:3.2.6-2 - Fixed missing epoch in -doc subpackage. * Thu Jul 19 2012 Bohuslav Kabrda - 1:3.2.6-1 - Update to ActiveResource 3.2.6. - Removed no longer needed BuildRoot tag. - Run tests without Rake. - Introduce -doc subpackage. * Fri Jun 15 2012 Vít Ondruch - 1:3.0.15-1 - Update to ActiveResource 3.0.15. * Fri Jun 01 2012 Vít Ondruch - 1:3.0.13-1 - Update to ActiveResource 3.0.13. * Wed Jan 25 2012 Bohuslav Kabrda - 1:3.0.11-1 - Rebuilt for Ruby 1.9.3. - Update to ActiveResource 3.0.11 * Sat Jan 14 2012 Fedora Release Engineering - 1:3.0.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Mon Aug 22 2011 Vít Ondruch - 1:3.0.10-1 - Update to ActiveResource 3.0.10 * Thu Jul 07 2011 Vít Ondruch - 1:3.0.9-1 - Update to ActiveResource 3.0.9 * Mon Mar 28 2011 Vít Ondruch - 1:3.0.5-1 - Updated to ActiveResource 3.0.5 * Wed Feb 09 2011 Fedora Release Engineering - 1:3.0.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Mon Jan 10 2011 Mohammed Morsi - 1:3.0.3-1 - Update to rails 3 * Mon Aug 09 2010 Mohammed Morsi - 1:2.3.8-1 - Update to 2.3.8 * Thu Jan 28 2010 Mamoru Tasaka - 1:2.3.5-1 - Update to 2.3.5 * Wed Oct 7 2009 David Lutterkort - 1:2.3.4-2 - Bump Epoch to ensure upgrade path from F-11 * Fri Sep 18 2009 Mamoru Tasaka - 2.3.4-1 - Update to 2.3.4 - Enable test * Sun Jul 26 2009 Jeroen van Meeuwen - 2.3.3-1 - New upstream version * Mon Mar 16 2009 Jeroen van Meeuwen - 2.3.2-1 - New upstream version * Wed Feb 25 2009 Fedora Release Engineering - 2.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Tue Dec 23 2008 David Lutterkort - 2.2.2-1 - New version * Tue Sep 16 2008 David Lutterkort - 2.1.1-1 - New version (fixes CVE-2008-4094) * Thu Jul 31 2008 Michael Stahnke - 2.1.0-1 - New Upstream * Tue Apr 8 2008 David Lutterkort - 2.0.2-2 - Fix dependency * Mon Apr 07 2008 David Lutterkort - 2.0.2-1 - New version * Mon Dec 10 2007 David Lutterkort - 2.0.1-1 - Initial package