[rubygem-activerecord/f14/master] updated to activerecord 2.3.8, added some upstream patches/fixes
Mohammed Morsi
mmorsi at fedoraproject.org
Wed Sep 1 04:19:12 UTC 2010
commit d8442f0a3d67f65a8a26dfd0a457dcdc5caff310
Author: Mohammed Morsi <mmorsi at redhat.com>
Date: Wed Sep 1 00:24:44 2010 -0400
updated to activerecord 2.3.8, added some upstream patches/fixes
.gitignore | 1 +
activerecord-2.3.8-postgres-fix.patch | 15 +++++++++++++++
activerecord-2.3.8-sqlite3-compat.patch | 11 +++++++++++
rubygem-activerecord.spec | 29 +++++++++++++++++++++++++++--
sources | 2 +-
5 files changed, 55 insertions(+), 3 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7c8a0f6..e3fc2ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
activerecord-2.3.5.gem
+/activerecord-2.3.8.gem
diff --git a/activerecord-2.3.8-postgres-fix.patch b/activerecord-2.3.8-postgres-fix.patch
new file mode 100644
index 0000000..9b300b4
--- /dev/null
+++ b/activerecord-2.3.8-postgres-fix.patch
@@ -0,0 +1,15 @@
+--- activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb.orig 2010-08-16 21:14:25.710395992 -0400
++++ activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb 2010-08-16 21:15:33.091702801 -0400
+@@ -407,7 +407,11 @@ module ActiveRecord
+
+ # Quotes column names for use in SQL queries.
+ def quote_column_name(name) #:nodoc:
+- PGconn.quote_ident(name.to_s)
++ if PGconn.respond_to?(:quote_ident)
++ PGconn.quote_ident(name.to_s)
++ else
++ %("#{name}")
++ end
+ end
+
+ # Quote date/time values for use in SQL input. Includes microseconds
diff --git a/activerecord-2.3.8-sqlite3-compat.patch b/activerecord-2.3.8-sqlite3-compat.patch
new file mode 100644
index 0000000..3ac2c9d
--- /dev/null
+++ b/activerecord-2.3.8-sqlite3-compat.patch
@@ -0,0 +1,11 @@
+--- activerecord-2.3.8/test/cases/query_cache_test.rb.orig 2010-06-29 14:39:50.000000000 -0400
++++ activerecord-2.3.8/test/cases/query_cache_test.rb 2010-06-29 14:39:57.000000000 -0400
+@@ -52,7 +52,7 @@ class QueryCacheTest < ActiveRecord::Tes
+ require 'sqlite3/version' if current_adapter?(:SQLite3Adapter)
+
+ Task.cache do
+- if current_adapter?(:SQLite3Adapter) && SQLite3::Version::VERSION > '1.2.5'
++ if current_adapter?(:SQLite3Adapter) && defined?(SQLite3::Version::VERSION) && SQLite3::Version::VERSION > '1.2.5'
+ assert_instance_of Fixnum, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
+ else
+ assert_instance_of String, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
diff --git a/rubygem-activerecord.spec b/rubygem-activerecord.spec
index dcc65c0..42a5ce9 100644
--- a/rubygem-activerecord.spec
+++ b/rubygem-activerecord.spec
@@ -9,12 +9,19 @@
Summary: Implements the ActiveRecord pattern for ORM
Name: rubygem-%{gemname}
Epoch: 1
-Version: 2.3.5
-Release: 1%{?dist}
+Version: 2.3.8
+Release: 3%{?dist}
Group: Development/Languages
License: MIT
URL: http://www.rubyonrails.org
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
+
+# patch0 needed to make ar tests compatable w/ current sqlite3 version in fedora
+Patch0: activerecord-2.3.8-sqlite3-compat.patch
+
+# patch1 https://rails.lighthouseapp.com/projects/8994/tickets/3210-rails-postgres-issue
+Patch1: activerecord-2.3.8-postgres-fix.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(abi) = %{rubyabi}
Requires: rubygems
@@ -43,6 +50,11 @@ mkdir -p ./%{gemdir}
gem install --local --install-dir ./%{gemdir} \
--force --rdoc %{SOURCE0}
+pushd ./%{geminstdir}
+%patch0 -p1
+%patch1 -p1
+popd
+
# Remove backup files
find ./%{geminstdir} -type f -name "*~" -delete
@@ -60,6 +72,10 @@ for file in `find ./%{geminstdir} -type f ! -perm /a+x -name "*.rb"`; do
[ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 755 $file
done
+# this file is being marked as a doc, need to remove ruby executable path
+# and mark as non-executable
+sed -i -e 's/^#!\/usr\/bin\/env ruby//' ./%{geminstdir}/examples/performance.rb
+chmod 0644 ./%{geminstdir}/examples/performance.rb
%build
@@ -93,6 +109,15 @@ rake test_sqlite3 --trace
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
%changelog
+* Mon Aug 16 2010 Mohammed Morsi <mmorsi at redhat.com> - 1:2.3.8-3
+- Included postgres fix (patch also pushed upstream, see rails issue tracker)
+
+* Thu Aug 12 2010 Mohammed Morsi <mmorsi at redhat.com> - 1:2.3.8-2
+- Updated patch0 to correctly parse sqlite3 version
+
+* Wed Aug 04 2010 Mohammed Morsi <mmorsi at redhat.com> - 1:2.3.8-1
+- Update to 2.3.8
+
* Thu Jan 28 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:2.3.5-1
- Update to 2.3.5
diff --git a/sources b/sources
index 2c317d8..4244fa6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-48a9ab7fbac97478fac9722fb5e14cda activerecord-2.3.5.gem
+16311c40a988bd9f8ffeb44799d9f488 activerecord-2.3.8.gem
More information about the scm-commits
mailing list