From 27692c1a1daba06093bba9f0c0a43f7e2289f86e Mon Sep 17 00:00:00 2001 From: Mohammed Morsi Date: Fri, 4 Feb 2011 11:46:02 -0500 Subject: update to actionpack 3.0.3 --- rubygem-actionpack.spec | 101 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 29 deletions(-) (limited to 'rubygem-actionpack.spec') diff --git a/rubygem-actionpack.spec b/rubygem-actionpack.spec index e8ba364..f404c8f 100644 --- a/rubygem-actionpack.spec +++ b/rubygem-actionpack.spec @@ -1,5 +1,4 @@ # Generated from actionpack-1.13.5.gem by gem2rpm -*- rpm-spec -*- -%define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']") %define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %define gemname actionpack %define geminstdir %{gemdir}/gems/%{gemname}-%{version} @@ -9,28 +8,68 @@ Summary: Web-flow and rendering framework putting the VC in MVC Name: rubygem-%{gemname} Epoch: 1 -Version: 2.3.8 -Release: 2%{?dist} +Version: 3.0.3 +Release: 1%{?dist} Group: Development/Languages License: MIT URL: http://www.rubyonrails.org -Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem -Patch0: rubygem-actionpack-2.3.8-enable-test.patch +Source0: http://rubygems.org/downloads/actionpack-%{version}.gem + +# The actionpack gem doesn't ship with the upstream Rakefile +Source1: http://github.com/rails/rails/raw/v%{version}/%{gemname}/Rakefile + +# Also the actionpack gem doesn't ship with the test suite. +# You may check it out like so +# git clone http://github.com/rails/rails.git +# cd rails/actionpack/ +# git checkout v3.0.3 +# tar czvf actionpack-tests.tgz test/ +Source2: actionpack-tests.tgz + +Patch0: rubygem-actionpack-enable-test.patch + +# Remove a task which breaks the Rakefile due to the gemspec +# not being present in the gem +Patch1: actionpack-rakefile-fix.patch + +# Removes code which breaks the test suite due to a +# dependency on a file in the greater rails proj +Patch2: actionpack-tests-fix.patch + +Patch3: actionpack-downgrade-dependencies.patch + +Patch4: actionpack-add-rack-mount-deps.patch + # # Please someone fix the following Patch2!! (mtasaka) # -#Patch2: rubygem-actionpack-2.3.8-rack-compat.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +#Patch2: rubygem-actionpack-2.3.5-rack-compat.patch + Requires: rubygems Requires: rubygem(activesupport) = %{version} -Requires: rubygem(rack) >= 1.1.0 +Requires: rubygem(activemodel) = %{version} +Requires: rubygem(builder) = 2.1.2 +Requires: rubygem(i18n) = 0.4.2 +Requires: rubygem(rack) >= 1.0.0 +Requires: rubygem(rack-test) +Requires: rubygem(rack-mount) +Requires: rubygem(tzinfo) >= 0.3.23 +Requires: rubygem(erubis) = 2.6.5 Requires: ruby(abi) = %{rubyabi} BuildRequires: rubygems -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) +BuildRequires: rubygem(rake) +BuildRequires: rubygem(mocha) >= 0.9.7 +BuildRequires: rubygem(activesupport) = %{version} +BuildRequires: rubygem(activemodel) = %{version} +BuildRequires: rubygem(activerecord) = %{version} +BuildRequires: rubygem(sqlite3) +BuildRequires: rubygem(builder) = 2.1.2 +BuildRequires: rubygem(i18n) = 0.4.2 +BuildRequires: rubygem(rack) >= 1.0.0 +BuildRequires: rubygem(rack-test) +BuildRequires: rubygem(rack-mount) +BuildRequires: rubygem(tzinfo) >= 0.3.23 +BuildRequires: rubygem(erubis) = 2.6.5 BuildArch: noarch Provides: rubygem(%{gemname}) = %{version} @@ -49,10 +88,18 @@ gem install --local --install-dir .%{gemdir} \ # forcely modify gemspec for rack dependency sed -i -e '/rack/s|~>|>=|' \ - ./%{gemdir}/specifications/*gemspec + ./%{gemdir}/specifications/*gemspec + +# move the Rakefile in place +cp %{SOURCE1} .%{geminstdir} + +# move the tests into place +tar xzvf %{SOURCE2} -C .%{geminstdir} pushd .%{geminstdir} -%patch0 -p1 +%patch0 -p0 +#%patch1 -p0 +%patch2 -p0 # create missing symlink pushd test/fixtures/layout_tests/layouts/ @@ -61,6 +108,10 @@ popd popd +pushd .%{gemdir} +%patch3 -p0 +%patch4 -p0 + # Remove backup files # No! these are needed for rake test # find ./%{geminstdir} -type f -name "*~" -delete @@ -69,12 +120,6 @@ popd # No! these are also needed for rake test # find ./%{geminstdir} -type f -size 0c -exec rm -rvf {} \; -# Fix wrong-file-end-of-line-encoding errors -# No! these are also needed for rake test -#for file in test/fixtures/multipart/* ; do -# sed -i 's/\r//' $file -#done - # Fix anything executable that does not have a shebang for file in `find ./%{geminstdir} -type f -perm /a+x`; do [ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file @@ -88,7 +133,6 @@ done %build %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{gemdir} cp -a .%{gemdir}/* %{buildroot}%{gemdir} @@ -118,10 +162,8 @@ rake test --trace %doc %{geminstdir}/CHANGELOG %{geminstdir}/lib %doc %{geminstdir}/MIT-LICENSE -%doc %{geminstdir}/README -%doc %{geminstdir}/install.rb %{geminstdir}/Rakefile -%doc %{geminstdir}/RUNNING_UNIT_TESTS +%doc %{geminstdir}/README.rdoc %doc %{geminstdir}/test/ %doc %{gemdir}/doc/%{gemname}-%{version} %{gemdir}/cache/%{gemname}-%{version}.gem @@ -129,11 +171,12 @@ rake test --trace %changelog -* Thu Aug 12 2010 Mohammed Morsi - 1:2.3.8-2 -- Bumped actionpack rack dependency to version 1.1.0 +* 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 +* Wed Sep 15 2010 Mohammed Morsi - 1:2.3.5-3 +- additional rack compat fix (in patch2) +- https://bugzilla.redhat.com/show_bug.cgi?id=617803 * Mon May 17 2010 Mamoru Tasaka - 1:2.3.5-2 - Set TMPDIR environment at %%check to make it sure all files created -- cgit