From f5349442ea566753e7986494039108d1741facc6 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Jan 03 2017 03:36:02 +0000 Subject: Update to Active Record 5.0.1. Fix warnings: Fixnum and Bignum are deprecated in Ruby trunk https://github.com/rails/rails/pull/26732 --- diff --git a/.gitignore b/.gitignore index a34165f..48e5010 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,5 @@ activerecord-2.3.8.gem /activerecord-5.0.0.gem /activerecord-5.0.0.1-tests.tgz /activerecord-5.0.0.1.gem +/activerecord-5.0.1-tests.tgz +/activerecord-5.0.1.gem diff --git a/rubygem-activerecord-5.0.1-Fixnum-and-Bignum-are-deprecated-in-Ruby-trunk.patch b/rubygem-activerecord-5.0.1-Fixnum-and-Bignum-are-deprecated-in-Ruby-trunk.patch new file mode 100644 index 0000000..85943fe --- /dev/null +++ b/rubygem-activerecord-5.0.1-Fixnum-and-Bignum-are-deprecated-in-Ruby-trunk.patch @@ -0,0 +1,23 @@ +From b552b5edaffe5dae183ece4d8475a0e7005da6c7 Mon Sep 17 00:00:00 2001 +From: Matthew Draper +Date: Sat, 8 Oct 2016 10:50:36 +1030 +Subject: [PATCH] Merge pull request #26732 from matthewd/fixnum-warning + +Fixnum and Bignum are deprecated in Ruby trunk +--- + activerecord/test/cases/query_cache_test.rb | 2 +- + 1 file changed, 1 insertions(+), 1 deletions(-) + +diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb +index 358c07a..764d8a6 100644 +--- a/activerecord/test/cases/query_cache_test.rb ++++ b/activerecord/test/cases/query_cache_test.rb +@@ -196,7 +196,7 @@ def test_cache_does_not_wrap_string_results_in_arrays + assert_kind_of Numeric, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks") + elsif current_adapter?(:SQLite3Adapter, :Mysql2Adapter, :PostgreSQLAdapter) + # Future versions of the sqlite3 adapter will return numeric +- assert_instance_of Fixnum, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks") ++ assert_instance_of 0.class, 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") + end diff --git a/rubygem-activerecord.spec b/rubygem-activerecord.spec index f38fbb3..4dc10be 100644 --- a/rubygem-activerecord.spec +++ b/rubygem-activerecord.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Epoch: 1 -Version: 5.0.0.1 +Version: 5.0.1 Release: 1%{?dist} Summary: Object-relational mapper framework (part of Rails) Group: Development/Languages @@ -12,8 +12,13 @@ URL: http://rubyonrails.org Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone http://github.com/rails/rails.git # cd rails/activerecord/ -# git checkout v5.0.0.1 && tar czvf activerecord-5.0.0.1-tests.tgz test/ +# git checkout v5.0.1 && tar czvf activerecord-5.0.1-tests.tgz test/ Source1: activerecord-%{version}-tests.tgz + +# Fixnum and Bignum are deprecated in Ruby trunk +# https://github.com/rails/rails/pull/26732 +Patch0: rubygem-activerecord-5.0.1-Fixnum-and-Bignum-are-deprecated-in-Ruby-trunk.patch + # Database dump/load reuires the executable. Suggests: %{_bindir}/sqlite3 BuildRequires: rubygems-devel @@ -66,6 +71,8 @@ pushd .%{gem_instdir} tar xzvf %{SOURCE1} +patch -p2 < %{PATCH0} + # Disable unstable tests. # https://github.com/rails/rails/issues/25774 sed -i '/^ def test_preconfigured_includes_with_has_many_and_habtm$/,/^ end$/ s/^/#/' \ @@ -115,6 +122,10 @@ popd %{gem_instdir}/examples %changelog +* Mon Jan 02 2017 Pavel Valena - 1:5.0.1-1 +- Update to Active Record 5.0.1. +- Fix warnings: Fixnum and Bignum are deprecated in Ruby trunk + * Mon Aug 15 2016 Pavel Valena - 1:5.0.0.1-1 - Update to Activerecord 5.0.0.1 diff --git a/sources b/sources index 1819906..b67ae85 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -9462a405005b26f8bb5466a42c0f2426 activerecord-5.0.0.1-tests.tgz -4f607acaed6d4e0f508b2bb196598041 activerecord-5.0.0.1.gem +SHA512 (activerecord-5.0.1-tests.tgz) = 24e5e38fa5a6391024d75b4dbdfe904c6ac9879f7b33cc53ddf40eb8187a69dd248e3a971c1c506083a8c3e6d42366f24d4e648f2a05bd52e4f1019dcad41396 +SHA512 (activerecord-5.0.1.gem) = 3dc13db8d4c3f8a1372a5e1437ca5359c8bfb2cdf35007efada4828f8bbb48482e10020bd61ebc579ffe7c34fcf8410c7d1944519e9b1a8b81cd386dc1b676fc