From ac4483f255b1ee0f0f720d5cf06873d8d8a812d9 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: May 22 2017 16:09:21 +0000 Subject: Update to Active Record 5.1.1. --- diff --git a/.gitignore b/.gitignore index bbcbefd..b43de42 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,5 @@ activerecord-2.3.8.gem /activerecord-5.0.1.gem /activerecord-5.0.2-tests.tgz /activerecord-5.0.2.gem +/activerecord-5.1.1-tests.tgz +/activerecord-5.1.1.gem diff --git a/activerecord-5.0.1-Creating-a-new-Topic-class-instead-of-class_eval.patch b/activerecord-5.0.1-Creating-a-new-Topic-class-instead-of-class_eval.patch deleted file mode 100644 index 5e6d5a5..0000000 --- a/activerecord-5.0.1-Creating-a-new-Topic-class-instead-of-class_eval.patch +++ /dev/null @@ -1,36 +0,0 @@ -From be9dc78fccc80bb5045c67b435b5c7e36ea8a296 Mon Sep 17 00:00:00 2001 -From: Yasuo Honda -Date: Thu, 11 Aug 2016 11:26:20 +0000 -Subject: [PATCH] Creating a new Topic class instead of class_eval for the - existing one since it affects another test - `ReflectionTest#test_read_attribute_names` - -Address #26099 ---- - activerecord/test/cases/validations_test.rb | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb -index 76510cb..5d9aa99 100644 ---- a/activerecord/test/cases/validations_test.rb -+++ b/activerecord/test/cases/validations_test.rb -@@ -156,17 +156,15 @@ def test_validators - end - - def test_numericality_validation_with_mutation -- Topic.class_eval do -+ klass = Class.new(Topic) do - attribute :wibble, :string - validates_numericality_of :wibble, only_integer: true - end - -- topic = Topic.new(wibble: '123-4567') -+ topic = klass.new(wibble: "123-4567") - topic.wibble.gsub!('-', '') - - assert topic.valid? -- ensure -- Topic.reset_column_information - end - - def test_acceptance_validator_doesnt_require_db_connection diff --git a/rubygem-activerecord-5.1.1-Fix-MigratorTest-test_migrator_verbosity.patch b/rubygem-activerecord-5.1.1-Fix-MigratorTest-test_migrator_verbosity.patch new file mode 100644 index 0000000..b6e26f2 --- /dev/null +++ b/rubygem-activerecord-5.1.1-Fix-MigratorTest-test_migrator_verbosity.patch @@ -0,0 +1,33 @@ +From 09c5236e5b620766c0be14fa4b76a3186215a7b1 Mon Sep 17 00:00:00 2001 +From: bogdanvlviv +Date: Wed, 26 Apr 2017 01:01:53 +0300 +Subject: [PATCH] Fix MigratorTest#test_migrator_verbosity + +Add `ActiveRecord::Migration.verbose = true` +to be sure that verbose is turned on in the test. + +Related to #28865 +--- + activerecord/test/cases/migrator_test.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/activerecord/test/cases/migrator_test.rb b/activerecord/test/cases/migrator_test.rb +index aadbc375af45..2e4b454a86ed 100644 +--- a/activerecord/test/cases/migrator_test.rb ++++ b/activerecord/test/cases/migrator_test.rb +@@ -299,6 +299,7 @@ def test_migrator_double_down + def test_migrator_verbosity + _, migrations = sensors(3) + ++ ActiveRecord::Migration.verbose = true + ActiveRecord::Migrator.new(:up, migrations, 1).migrate + assert_not_equal 0, ActiveRecord::Migration.message_count + +@@ -311,7 +312,6 @@ def test_migrator_verbosity + def test_migrator_verbosity_off + _, migrations = sensors(3) + +- ActiveRecord::Migration.message_count = 0 + ActiveRecord::Migration.verbose = false + ActiveRecord::Migrator.new(:up, migrations, 1).migrate + assert_equal 0, ActiveRecord::Migration.message_count diff --git a/rubygem-activerecord.spec b/rubygem-activerecord.spec index b958266..9de45da 100644 --- a/rubygem-activerecord.spec +++ b/rubygem-activerecord.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Epoch: 1 -Version: 5.0.2 +Version: 5.1.1 Release: 1%{?dist} Summary: Object-relational mapper framework (part of Rails) Group: Development/Languages @@ -12,12 +12,12 @@ 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.2 && tar czvf activerecord-5.0.2-tests.tgz test/ +# git checkout v5.1.1 && tar czvf activerecord-5.1.1-tests.tgz test/ Source1: activerecord-%{version}-tests.tgz -# Fix unstable ReflectionTest#test_read_attribute_names test. -# https://github.com/rails/rails/pull/26124 -Patch1: activerecord-5.0.1-Creating-a-new-Topic-class-instead-of-class_eval.patch +# Fix MigratorTest#test_migrator_verbosity +# https://github.com/rails/rails/commit/09c5236e5b620766c0be14fa4b76a3186215a7b1 +Patch0: rubygem-activerecord-5.1.1-Fix-MigratorTest-test_migrator_verbosity.patch # Database dump/load reuires the executable. Suggests: %{_bindir}/sqlite3 @@ -29,8 +29,8 @@ BuildRequires: rubygem(builder) BuildRequires: rubygem(sqlite3) BuildRequires: rubygem(erubis) BuildRequires: rubygem(mocha) -BuildRequires: rubygem(arel) >= 7.0.0 -BuildRequires: rubygem(arel) < 8.0.0 +BuildRequires: rubygem(arel) >= 8.0.0 +BuildRequires: rubygem(arel) < 9.0.0 BuildRequires: rubygem(rack) BuildRequires: %{_bindir}/sqlite3 BuildArch: noarch @@ -71,7 +71,7 @@ pushd .%{gem_instdir} tar xzvf %{SOURCE1} -patch -p2 < %{PATCH1} +cat %{PATCH0} | patch -p2 -F 0 # Disable unstable tests. # https://github.com/rails/rails/issues/25774 @@ -122,6 +122,9 @@ popd %{gem_instdir}/examples %changelog +* Mon May 22 2017 Pavel Valena - 1:5.1.1-1 +- Update to Active Record 5.1.1. + * Thu Mar 02 2017 Pavel Valena - 1:5.0.2-1 - Update to Active Record 5.0.2. diff --git a/sources b/sources index 4a19123..88005bd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (activerecord-5.0.2-tests.tgz) = 582bbb49bb9b90a6ab4003b7e4d6f1c815382982544a2e098dcc2c6f4f1f22a68a79ec3f2c8d7d474f81f7a41e8fbb61850672c85e441cabad6aaf12c8ac43d0 -SHA512 (activerecord-5.0.2.gem) = 2b0cc3825255de29a294aed61e4ba5ae76def5c1abffa2f70e67491b20ef70aaa93d0d6f233eb89d048a2788eea5b52c3dd795625f1ac3b5641f36673fa82292 +SHA512 (activerecord-5.1.1-tests.tgz) = 157de7e61b2a0ed0da13a15b3e840ae8273e662e2dae7c7660f795c20ce190190f1727887588224c6d053264ba270d08b52d48f355ade310df416aa7b7fae5c5 +SHA512 (activerecord-5.1.1.gem) = a29d58ce8f66c596ca33ae1e81768c8ab379b503c3721648db8e28411d38bb7dd6fe9dc504451a0189ea2f186aac5aff5b18b8cc78319fe261847cfd5cb23e86