summaryrefslogtreecommitdiffstats
path: root/rubygem-activerecord.spec
diff options
context:
space:
mode:
authorMohammed Morsi <mmorsi@redhat.com>2011-02-04 11:35:34 -0500
committerMohammed Morsi <mmorsi@redhat.com>2011-02-04 11:35:34 -0500
commit283a7cbab3e118080df6633f13eb4186f13f75b6 (patch)
treea6152f840c087bb7f5540e74a0ef16bb8cfe1df8 /rubygem-activerecord.spec
parent611b284cb95c54f4668dca1d31ff55552fec5fc3 (diff)
downloadrubygem-activerecord-283a7cbab3e118080df6633f13eb4186f13f75b6.tar.gz
rubygem-activerecord-283a7cbab3e118080df6633f13eb4186f13f75b6.tar.xz
rubygem-activerecord-283a7cbab3e118080df6633f13eb4186f13f75b6.zip
update activerecord to 3.0.3
Diffstat (limited to 'rubygem-activerecord.spec')
-rw-r--r--rubygem-activerecord.spec74
1 files changed, 56 insertions, 18 deletions
diff --git a/rubygem-activerecord.spec b/rubygem-activerecord.spec
index e493fb3..c13c7ec 100644
--- a/rubygem-activerecord.spec
+++ b/rubygem-activerecord.spec
@@ -1,5 +1,4 @@
# Generated from activerecord-1.15.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 activerecord
%define geminstdir %{gemdir}/gems/%{gemname}-%{version}
@@ -9,28 +8,54 @@
Summary: Implements the ActiveRecord pattern for ORM
Name: rubygem-%{gemname}
Epoch: 1
-Version: 2.3.8
-Release: 4%{?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
+Source0: http://rubygems.org/downloads/activerecord-%{version}.gem
+
+# The activerecord gem doesn't ship with the upstream Rakefile
+Source1: http://github.com/rails/rails/raw/v%{version}/%{gemname}/Rakefile
+
+# Also the activerecord 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/activerecord/
+# git checkout v3.0.3
+# tar czvf activerecord-tests.tgz test/
+Source2: activerecord-tests.tgz
+
+# Remove a task which breaks the Rakefile due to the gemspec
+# not being present in the gem
+Patch0: activerecord-rakefile-fix.patch
+
+# Removes code which breaks the test suite due to a
+# dependency on a file in the greater rails proj
+Patch1: activerecord-tests-fix.patch
# patch0 needed to make ar tests compatable w/ current sqlite3 version in fedora
-Patch0: activerecord-2.3.8-sqlite3-compat.patch
+Patch2: activerecord-3.0.3-sqlite3-compat.patch
# patch1 https://rails.lighthouseapp.com/projects/8994/tickets/3210-rails-postgres-issue
-Patch1: activerecord-2.3.8-postgres-fix.patch
+Patch3: activerecord-3.0.3-postgres-fix.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(abi) = %{rubyabi}
Requires: rubygems
Requires: rubygem(activesupport) = %{version}
+Requires: rubygem(activemodel) = %{version}
+Requires: rubygem(arel)
+Requires: rubygem(tzinfo) >= 0.3.23
+Requires: rubygem(i18n)
BuildRequires: rubygems
-BuildRequires(check): rubygem(rake)
-BuildRequires(check): rubygem(activesupport) = %{version}
-BuildRequires(check): rubygem(sqlite3-ruby)
-BuildRequires(check): rubygem(mocha)
+BuildRequires: rubygem(rake)
+BuildRequires: rubygem(activesupport) = %{version}
+BuildRequires: rubygem(activemodel) = %{version}
+BuildRequires: rubygem(sqlite3)
+BuildRequires: rubygem(mocha)
+BuildRequires: rubygem(i18n)
+BuildRequires: rubygem(arel)
+BuildRequires: rubygem(tzinfo) >= 0.3.23
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}
@@ -50,9 +75,17 @@ mkdir -p ./%{gemdir}
gem install --local --install-dir ./%{gemdir} \
--force --rdoc %{SOURCE0}
+# move the Rakefile in place
+cp %{SOURCE1} .%{geminstdir}
+
+# move the tests into place
+tar xzvf %{SOURCE2} -C .%{geminstdir}
+
pushd ./%{geminstdir}
-%patch0 -p1
-%patch1 -p1
+%patch0 -p0
+%patch1 -p0
+%patch2 -p0
+%patch3 -p0
popd
# Remove backup files
@@ -80,7 +113,6 @@ chmod 0644 ./%{geminstdir}/examples/performance.rb
%build
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
cp -a .%{gemdir}/* %{buildroot}%{gemdir}
@@ -88,8 +120,13 @@ cp -a .%{gemdir}/* %{buildroot}%{gemdir}
rm -rf %{buildroot}
%check
-# Only test sqlite3 backend
pushd .%{geminstdir}
+
+# to prevent a circular dependency w/ actionpack
+mv test/cases/session_store/session_test.rb \
+ test/cases/session_store/session_test.rb.norun
+
+# Only test sqlite3 backend
rake test_sqlite3 --trace
%files
@@ -97,11 +134,9 @@ rake test_sqlite3 --trace
%dir %{geminstdir}
%doc %{geminstdir}/CHANGELOG
%doc %{geminstdir}/examples
-%{geminstdir}/install.rb
%{geminstdir}/lib
%{geminstdir}/Rakefile
-%doc %{geminstdir}/README
-%doc %{geminstdir}/RUNNING_UNIT_TESTS
+%doc %{geminstdir}/README.rdoc
%{geminstdir}/test
%doc %{gemdir}/doc/%{gemname}-%{version}
@@ -109,6 +144,9 @@ rake test_sqlite3 --trace
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
%changelog
+* Mon Jan 10 2011 Mohammed Morsi <mmorsi@redhat.com> - 1:3.0.3-1
+- Update to rails 3
+
* Wed Sep 08 2010 Mohammed Morsi <mmorsi@redhat.com> - 1:2.3.8-4
- Updated postgres fix to resolve security issue