[rubygem-activerecord] Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
Vít Ondruch
vondruch at fedoraproject.org
Tue Mar 5 12:07:37 UTC 2013
commit fce32bbca19daad2f23a4a5c56c6757e19c02352
Author: Vít Ondruch <vondruch at redhat.com>
Date: Mon Mar 4 13:17:08 2013 +0100
Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
...3-handled-respond_to-with-private-methods.patch | 25 ++++++++++++++++++++
rubygem-activerecord.spec | 19 ++++++++++----
2 files changed, 38 insertions(+), 6 deletions(-)
---
diff --git a/rubygem-activerecord-3.2.13-handled-respond_to-with-private-methods.patch b/rubygem-activerecord-3.2.13-handled-respond_to-with-private-methods.patch
new file mode 100644
index 0000000..f2d5de4
--- /dev/null
+++ b/rubygem-activerecord-3.2.13-handled-respond_to-with-private-methods.patch
@@ -0,0 +1,25 @@
+From 127411fdf3a3470e8830abf0c7876db67c0c344a Mon Sep 17 00:00:00 2001
+From: SHIBATA Hiroshi <shibata.hiroshi at gmail.com>
+Date: Mon, 3 Dec 2012 22:07:14 +0900
+Subject: [PATCH] handled respond_to? with private methods
+
+---
+ activerecord/lib/active_record/base.rb | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
+index 62c8110..612114b 100644
+--- a/activerecord/lib/active_record/base.rb
++++ b/activerecord/lib/active_record/base.rb
+@@ -557,7 +557,7 @@ module ActiveRecord #:nodoc:
+ end
+
+ # Backport dup from 1.9 so that initialize_dup() gets called
+- unless Object.respond_to?(:initialize_dup)
++ unless Object.respond_to?(:initialize_dup, true)
+ def dup # :nodoc:
+ copy = super
+ copy.initialize_dup(self)
+--
+1.8.1.4
+
diff --git a/rubygem-activerecord.spec b/rubygem-activerecord.spec
index fd95995..54f4812 100644
--- a/rubygem-activerecord.spec
+++ b/rubygem-activerecord.spec
@@ -1,12 +1,11 @@
# Generated from activerecord-1.15.5.gem by gem2rpm -*- rpm-spec -*-
%global gem_name activerecord
-%global rubyabi 1.9.1
Summary: Implements the ActiveRecord pattern for ORM
Name: rubygem-%{gem_name}
Epoch: 1
Version: 3.2.12
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: Development/Languages
License: MIT
URL: http://www.rubyonrails.org
@@ -16,7 +15,10 @@ Source0: http://rubygems.org/downloads/activerecord-%{version}.gem
# git checkout v3.2.12
# tar czvf activerecord-3.2.12-tests.tgz test/
Source1: activerecord-%{version}-tests.tgz
-Requires: ruby(abi) = %{rubyabi}
+# Fixes "NoMethodError: private method `initialize_dup' called" error.
+# https://github.com/rails/rails/commit/127411fdf3a3470e8830abf0c7876db67c0c344a
+Patch0: rubygem-activerecord-3.2.13-handled-respond_to-with-private-methods.patch
+Requires: ruby(release)
Requires: ruby(rubygems)
Requires: rubygem(activesupport) = %{version}
Requires: rubygem(activemodel) = %{version}
@@ -52,9 +54,11 @@ Documentation for %{name}
%prep
%setup -q -c -T
-mkdir -p .%{gem_dir}
-gem install --local --install-dir .%{gem_dir} \
- --force --rdoc %{SOURCE0}
+%gem_install -n %{SOURCE0}
+
+pushd .%{gem_instdir}
+%patch0 -p2
+popd
%build
@@ -100,6 +104,9 @@ popd
%changelog
+* Mon Mar 04 2013 Vít Ondruch <vondruch at redhat.com> - 1:3.2.12-2
+- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
+
* Tue Feb 12 2013 Vít Ondruch <vondruch at redhat.com> - 1:3.2.12-1
- Update to ActiveRecord 3.2.12.
More information about the scm-commits
mailing list