diff options
Diffstat (limited to 'rubygem-actionpack.spec')
-rw-r--r-- | rubygem-actionpack.spec | 96 |
1 files changed, 44 insertions, 52 deletions
diff --git a/rubygem-actionpack.spec b/rubygem-actionpack.spec index c87fbd8..7bce998 100644 --- a/rubygem-actionpack.spec +++ b/rubygem-actionpack.spec @@ -1,12 +1,16 @@ # Generated from actionpack-1.13.5.gem by gem2rpm -*- rpm-spec -*- %global gem_name actionpack +%if 0%{?el6} +%global rubyabi 1.8 +%else %global rubyabi 1.9.1 +%endif Summary: Web-flow and rendering framework putting the VC in MVC Name: rubygem-%{gem_name} Epoch: 1 -Version: 3.2.11 +Version: 2.3.16 Release: 1%{?dist} Group: Development/Languages License: MIT @@ -17,60 +21,41 @@ Source0: http://rubygems.org/downloads/actionpack-%{version}.gem # You may check it out like so # git clone http://github.com/rails/rails.git # cd rails/actionpack/ -# git checkout v3.2.11 -# tar czvf actionpack-3.2.11-tests.tgz test/ +# git checkout v2.3.16 +# tar czvf actionpack-2.3.16-tests.tgz test/ Source2: actionpack-%{version}-tests.tgz Patch0: rubygem-actionpack-enable-test.patch -Patch1: rubygem-actionpack-relax-sprockets-dependency.patch -Patch2: rubygem-actionpack-3.2.8-relax-builder-dependency.patch -# Fixes "warning: assigned but unused variable - customer_greeting_counter" warning. -# https://github.com/rails/rails/pull/8546 -Patch3: rubygem-actionpack-4.0.0-change-spy-of-after-invoked-controller-action.-becau.patch # Let's keep Requires and BuildRequires sorted alphabeticaly Requires: ruby(rubygems) -Requires: rubygem(activemodel) = %{version} Requires: rubygem(activesupport) = %{version} -Requires: rubygem(builder) >= 3.0.0 -Requires: rubygem(builder) < 3.2 -Requires: rubygem(erubis) >= 2.7.0 -Requires: rubygem(erubis) < 2.8 -Requires: rubygem(journey) >= 1.0.4 -Requires: rubygem(journey) < 1.1 -Requires: rubygem(rack) >= 1.4.0 -Requires: rubygem(rack) < 1.5 -Requires: rubygem(rack-cache) >= 1.2 -Requires: rubygem(rack-cache) < 2 -Requires: rubygem(rack-test) >= 0.6.1 -Requires: rubygem(rack-test) < 0.7 -Requires: rubygem(sprockets) >= 2.1.3 +Requires: rubygem(rack) >= 1.1.0 Requires: ruby(abi) = %{rubyabi} +%if 0%{?fedora} BuildRequires: rubygems-devel -BuildRequires: rubygem(activemodel) = %{version} -BuildRequires: rubygem(activerecord) = %{version} -BuildRequires: rubygem(activesupport) = %{version} -BuildRequires: rubygem(erubis) >= 2.7.0 -BuildRequires: rubygem(erubis) < 2.8 -BuildRequires: rubygem(journey) >= 1.0.4 -BuildRequires: rubygem(journey) < 1.1 -BuildRequires: rubygem(minitest) -BuildRequires: rubygem(mocha) >= 0.9.8 -BuildRequires: rubygem(rack) >= 1.4.0 -BuildRequires: rubygem(rack) < 1.5 -BuildRequires: rubygem(rack-cache) >= 1.2 -BuildRequires: rubygem(rack-cache) < 2 -BuildRequires: rubygem(rack-test) >= 0.6.1 -BuildRequires: rubygem(rack-test) < 0.7 -BuildRequires: rubygem(sprockets) >= 2.1.3 -BuildRequires: rubygem(sqlite3) -BuildRequires: rubygem(therubyracer) -BuildRequires: rubygem(tzinfo) >= 0.3.29 -BuildRequires: rubygem(tzinfo) < 0.4 -BuildRequires: rubygem(uglifier) +%else +BuildRequires: ruby(rubygems) +%endif +BuildRequires(check): rubygem(rake) +BuildRequires(check): rubygem(rack) >= 1.1.0 +BuildRequires(check): rubygem(mocha) >= 0.9.7 +BuildRequires(check): rubygem(activerecord) = %{version} +BuildRequires(check): rubygem(sqlite3-ruby) BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} +# macros for RHEL6 compatibility: +%{!?gem_dir: %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)} +%{!?gem_instdir: %global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}} +%{!?gem_libdir: %global gem_libdir %{gem_instdir}/lib} +%{!?gem_cache: %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem} +%{!?gem_spec: %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec} +%{!?gem_docdir: %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}} +%{!?gem_extdir: %global gem_extdir %{_libdir}/gems/exts/%{gem_name}-%{version}} +%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')} + + %description Eases web-request routing, handling, and response as a half-way front, half-way page controller. Implemented with specific emphasis on enabling easy @@ -91,17 +76,15 @@ gem install --local --install-dir .%{gem_dir} \ -V \ --force --no-rdoc %{SOURCE0} +# forcely modify gemspec for rack dependency +sed -i -e '/rack/s|~>|>=|' \ + ./%{gem_dir}/specifications/*gemspec + # move the tests into place tar xzvf %{SOURCE2} -C .%{gem_instdir} pushd .%{gem_instdir} -%patch0 -p0 -%patch3 -p2 -popd - -pushd .%{gem_dir} -%patch1 -p0 -%patch2 -p1 +%patch0 -p1 popd # Remove backup files @@ -143,10 +126,13 @@ sed -i '1,2d' test/abstract_unit.rb mv test/controller/assert_select_test.rb \ test/controller/assert_select_test.rb.skip +# The test suite fails with many errors on EL 6. +%if 0%{?fedora} ruby -w -I.:lib:test -e 'Dir.glob("test/{abstract,controller,dispatch,template}/**/*_test.rb").each {|t| require t}' # activerecord tests must be run separately, otherwise we get superclass mismatch error # due to test classes that have same names in activerecord and other tests ruby -w -I.:lib:test -e 'Dir.glob("test/activerecord/**/*_test.rb").each {|t| require t}' +%endif popd %files @@ -158,11 +144,17 @@ popd %files doc %doc %{gem_docdir} -%doc %{gem_instdir}/CHANGELOG.md -%doc %{gem_instdir}/README.rdoc +%doc %{gem_instdir}/CHANGELOG +%doc %{gem_instdir}/README +%doc %{gem_instdir}/install.rb +%{gem_instdir}/Rakefile +%doc %{gem_instdir}/RUNNING_UNIT_TESTS %{gem_instdir}/test/ %changelog +* Wed Feb 06 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 1:2.3.16-1 +- Downgrade to ActionPack 2.3.16. + * Wed Jan 09 2013 Vít Ondruch <vondruch@redhat.com> - 1:3.2.11-1 - Update to the ActionPack 3.2.11. |