[rubygem-activerecord] Update to ActiveRecord 3.2.6.
Vít Ondruch
vondruch at fedoraproject.org
Thu Jul 19 11:43:49 UTC 2012
commit 4769679a503306f6ed513f629081630ae5676dec
Author: Vít Ondruch <vondruch at redhat.com>
Date: Thu Jul 19 13:43:19 2012 +0200
Update to ActiveRecord 3.2.6.
.gitignore | 2 +
Rakefile | 201 -----------------------------
activerecord-downgrade-dependencies.patch | 24 ----
activerecord-rakefile-fix.patch | 15 --
rubygem-activerecord.spec | 131 +++++++------------
sources | 4 +-
6 files changed, 51 insertions(+), 326 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8614831..6a35a38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,5 @@ activerecord-2.3.8.gem
/activerecord-3.0.13.gem
/activerecord-3.0.15-tests.tgz
/activerecord-3.0.15.gem
+/activerecord-3.2.6-tests.tgz
+/activerecord-3.2.6.gem
diff --git a/rubygem-activerecord.spec b/rubygem-activerecord.spec
index 7e6649b..a467c0c 100644
--- a/rubygem-activerecord.spec
+++ b/rubygem-activerecord.spec
@@ -1,50 +1,34 @@
# 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.0.15
+Version: 3.2.6
Release: 1%{?dist}
Group: Development/Languages
License: MIT
URL: http://www.rubyonrails.org
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}/%{gem_name}/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.15
-# tar czvf activerecord-3.0.15-tests.tgz test/
-Source2: activerecord-%{version}-tests.tgz
-
-# Remove a task which breaks the Rakefile due to the gemspec
-# not being present in the gem
-Patch0: activerecord-rakefile-fix.patch
-
-Patch2: activerecord-downgrade-dependencies.patch
-
+# git checkout v3.2.6
+# tar czvf activerecord-3.2.6-tests.tgz test/
+Source1: activerecord-%{version}-tests.tgz
Requires: ruby(abi) = %{rubyabi}
Requires: ruby(rubygems)
Requires: rubygem(activesupport) = %{version}
Requires: rubygem(activemodel) = %{version}
Requires: rubygem(arel)
Requires: rubygem(tzinfo) >= 0.3.23
-Requires: rubygem(i18n)
BuildRequires: rubygems-devel
-BuildRequires: rubygem(rake)
+BuildRequires: rubygem(bcrypt-ruby)
BuildRequires: rubygem(activesupport) = %{version}
BuildRequires: rubygem(activemodel) = %{version}
BuildRequires: rubygem(sqlite3)
BuildRequires: rubygem(erubis)
BuildRequires: rubygem(mocha)
-BuildRequires: rubygem(i18n)
BuildRequires: rubygem(arel)
BuildRequires: rubygem(tzinfo) >= 0.3.23
BuildRequires: rubygem(minitest)
@@ -57,96 +41,75 @@ tables and classes together for business objects, like Customer or
Subscription, that can find, save, and destroy themselves without resorting to
manual SQL.
-%prep
-%setup -q -c -T
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
-# rake test creates debug.log under %%{gem_instdir},
-# so let's install gem file under %%{_builddir} first
+%description doc
+Documentation for %{name}
-mkdir -p ./%{gem_dir}
-gem install --local --install-dir ./%{gem_dir} \
+%prep
+%setup -q -c -T
+mkdir -p .%{gem_dir}
+gem install --local --install-dir .%{gem_dir} \
--force --rdoc %{SOURCE0}
-# move the Rakefile in place
-cp %{SOURCE1} .%{gem_instdir}
-
-# move the tests into place
-tar xzvf %{SOURCE2} -C .%{gem_instdir}
-
-pushd ./%{gem_instdir}
-%patch0 -p0
-popd
-
-pushd .%{gem_dir}
-%patch2 -p0
-popd
-
-# Remove backup files
-find ./%{gem_instdir} -type f -name "*~" -delete
-
-# Delete zero-length files
-# No! These are needed for rake test
-# find ./%{gem_instdir} -type f -size 0c -exec rm -rvf {} \;
-
-# Fix anything executable that does not have a shebang
-for file in `find ./%{gem_instdir} -type f -perm /a+x`; do
- [ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file
-done
-
-# Find files with a shebang that do not have executable permissions
-for file in `find ./%{gem_instdir} -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//' ./%{gem_instdir}/examples/performance.rb
-chmod 0644 ./%{gem_instdir}/examples/performance.rb
-
%build
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}
-%clean
-rm -rf %{buildroot}
-
%check
pushd .%{gem_instdir}
+tar xzvf %{SOURCE1}
+
# load_path is not available, remove its require.
sed -i '1,2d' test/cases/helper.rb
-# Test fails with newer mocha. Keep with older one is not solution.
-# https://github.com/rails/rails/pull/6046
-# https://github.com/rails/rails/commit/2aa7c6d065802cd230a812b8331ee293e4aae0e8
-sed -i '592,597 s|^|#|' test/cases/autosave_association_test.rb
-sed -i '637,642 s|^|#|' test/cases/autosave_association_test.rb
-sed -i '702,710 s|^|#|' test/cases/autosave_association_test.rb
+ruby -I.:test:lib << EOF
+ require "test/config"
+ require "test/support/config"
-# to prevent a circular dependency w/ actionpack
-mv test/cases/session_store/session_test.rb \
- test/cases/session_store/session_test.rb.norun
+ test_files = Dir.glob( "test/cases/**/*_test.rb" )
+ test_files.reject! { |x| x =~ %r|/adapters/| }
+
+ # Only test sqlite3 backend
+ test_files += Dir.glob("test/cases/adapters/sqlite3/*_test.rb")
+
+ # To prevent a circular dependency w/ actionpack.
+ test_files.delete('test/cases/session_store/session_test.rb')
+
+ # Test dependes on mysql adapter
+ # https://github.com/rails/rails/issues/7103
+ test_files.delete('test/cases/connection_specification/resolver_test.rb')
+
+ test_files.each { |f| require f }
+EOF
-# Only test sqlite3 backend
-rake test_sqlite3 --trace
popd
%files
%dir %{gem_instdir}
-%doc %{gem_instdir}/CHANGELOG
-%doc %{gem_instdir}/examples
%{gem_libdir}
-%{gem_instdir}/Rakefile
-%doc %{gem_instdir}/README.rdoc
-%{gem_instdir}/test
-
-%doc %{gem_docdir}
+%doc %{gem_instdir}/MIT-LICENSE
%exclude %{gem_cache}
%{gem_spec}
+%files doc
+%doc %{gem_docdir}
+%doc %{gem_instdir}/CHANGELOG.md
+%doc %{gem_instdir}/README.rdoc
+%doc %{gem_instdir}/examples
+
+
%changelog
+* Thu Jul 19 2012 Vít Ondruch <vondruch at redhat.com> - 1:3.2.6-1
+- Update to ActiveRecord 3.2.6.
+
* Fri Jun 15 2012 Vít Ondruch <vondruch at redhat.com> - 1:3.0.15-1
- Update to ActiveRecord 3.0.15.
diff --git a/sources b/sources
index cd7f9d3..bc2b6f2 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-541f289b4e6c0502e13782f9552a5d99 activerecord-3.0.15-tests.tgz
-d5ca4d34b412b42139ec3ca00420ed48 activerecord-3.0.15.gem
+d9c840441f9ece344e81f1229b5fc976 activerecord-3.2.6-tests.tgz
+00c29000e63fc7790198488c8550b742 activerecord-3.2.6.gem
More information about the scm-commits
mailing list