summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Morsi <mmorsi@redhat.com>2010-08-24 16:51:57 -0400
committerMohammed Morsi <mmorsi@redhat.com>2010-08-24 16:51:57 -0400
commitb8007954bad5df50e3505cca6794203c8cd5a526 (patch)
tree58e20ec5e3dd5c4c77f68daf179c4e758dc46e17
parente5c5fef221bb302f95c7e16bac57d5761cbf3e7b (diff)
downloadrubygem-activerecord-b8007954bad5df50e3505cca6794203c8cd5a526.tar.gz
rubygem-activerecord-b8007954bad5df50e3505cca6794203c8cd5a526.tar.xz
rubygem-activerecord-b8007954bad5df50e3505cca6794203c8cd5a526.zip
updated to activerecord 2.3.8, added some upstream patches/fixes
-rw-r--r--.gitignore1
-rw-r--r--activerecord-2.3.8-postgres-fix.patch15
-rw-r--r--activerecord-2.3.8-sqlite3-compat.patch11
-rw-r--r--rubygem-activerecord.spec29
-rw-r--r--sources2
5 files changed, 55 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 7c8a0f6..1d4f9f7 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@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@redhat.com> - 1:2.3.8-2
+- Updated patch0 to correctly parse sqlite3 version
+
+* Wed Aug 04 2010 Mohammed Morsi <mmorsi@redhat.com> - 1:2.3.8-1
+- Update to 2.3.8
+
* Thu Jan 28 2010 Mamoru Tasaka <mtasaka@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