Hello community,
here is the log from the commit of package rubygem-activerecord-6.0 for
openSUSE:Factory checked in at 2019-12-14 12:21:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-activerecord-6.0 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-activerecord-6.0.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-activerecord-6.0"
Sat Dec 14 12:21:29 2019 rev:3 rq:756929 version:6.0.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-activerecord-6.0/rubygem-activerecord-6.0.changes
2019-11-13 13:25:22.267512929 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-activerecord-6.0.new.4691/rubygem-activerecord-6.0.changes
2019-12-14 12:23:54.351194553 +0100
@@ -1,0 +2,42 @@
+Sat Dec 14 00:05:39 UTC 2019 - Manuel Schnitzer <[email protected]>
+
+- updated to version 6.0.2
+
+ * Share the same connection pool for primary and replica databases in the
+ transactional tests for the same database.
+
+ *Edouard Chin*
+
+ * Fix the preloader when one record is fetched using `after_initialize`
+ but not the entire collection.
+
+ *Bradley Price*
+
+ * Fix collection callbacks not terminating when `:abort` is thrown.
+
+ *Edouard Chin*, *Ryuta Kamizono*
+
+ * Correctly deprecate `where.not` working as NOR for relations.
+
+ 12a9664 deprecated where.not working as NOR, however
+ doing a relation query like `where.not(relation: { ... })`
+ wouldn't be properly deprecated and `where.not` would work as
+ NAND instead.
+
+ *Edouard Chin*
+
+ * Fix `db:migrate` task with multiple databases to restore the connection
+ to the previous database.
+
+ The migrate task iterates and establish a connection over each db
+ resulting in the last one to be used by subsequent rake tasks.
+ We should reestablish a connection to the connection that was
+ established before the migrate tasks was run
+
+ *Edouard Chin*
+
+ * Fix multi-threaded issue for `AcceptanceValidator`.
+
+ *Ryuta Kamizono*
+
+-------------------------------------------------------------------
Old:
----
activerecord-6.0.1.gem
New:
----
activerecord-6.0.2.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-activerecord-6.0.spec ++++++
--- /var/tmp/diff_new_pack.y8AklJ/_old 2019-12-14 12:23:54.899194471 +0100
+++ /var/tmp/diff_new_pack.y8AklJ/_new 2019-12-14 12:23:54.903194469 +0100
@@ -24,7 +24,7 @@
#
Name: rubygem-activerecord-6.0
-Version: 6.0.1
+Version: 6.0.2
Release: 0
%define mod_name activerecord
%define mod_full_name %{mod_name}-%{version}
++++++ activerecord-6.0.1.gem -> activerecord-6.0.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2019-11-05 15:37:41.000000000 +0100
+++ new/CHANGELOG.md 2019-12-13 19:07:43.000000000 +0100
@@ -1,3 +1,43 @@
+## Rails 6.0.2 (December 13, 2019) ##
+
+* Share the same connection pool for primary and replica databases in the
+ transactional tests for the same database.
+
+ *Edouard Chin*
+
+* Fix the preloader when one record is fetched using `after_initialize`
+ but not the entire collection.
+
+ *Bradley Price*
+
+* Fix collection callbacks not terminating when `:abort` is thrown.
+
+ *Edouard Chin*, *Ryuta Kamizono*
+
+* Correctly deprecate `where.not` working as NOR for relations.
+
+ 12a9664 deprecated where.not working as NOR, however
+ doing a relation query like `where.not(relation: { ... })`
+ wouldn't be properly deprecated and `where.not` would work as
+ NAND instead.
+
+ *Edouard Chin*
+
+* Fix `db:migrate` task with multiple databases to restore the connection
+ to the previous database.
+
+ The migrate task iterates and establish a connection over each db
+ resulting in the last one to be used by subsequent rake tasks.
+ We should reestablish a connection to the connection that was
+ established before the migrate tasks was run
+
+ *Edouard Chin*
+
+* Fix multi-threaded issue for `AcceptanceValidator`.
+
+ *Ryuta Kamizono*
+
+
## Rails 6.0.1 (November 5, 2019) ##
* Common Table Expressions are allowed on read-only connections.
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_record/associations/collection_association.rb
new/lib/active_record/associations/collection_association.rb
--- old/lib/active_record/associations/collection_association.rb
2019-11-05 15:37:41.000000000 +0100
+++ new/lib/active_record/associations/collection_association.rb
2019-12-13 19:07:43.000000000 +0100
@@ -378,7 +378,9 @@
end
def remove_records(existing_records, records, method)
- records.each { |record| callback(:before_remove, record) }
+ catch(:abort) do
+ records.each { |record| callback(:before_remove, record) }
+ end || return
delete_records(existing_records, method) if existing_records.any?
@target -= records
@@ -434,7 +436,9 @@
end
def replace_on_target(record, index, skip_callbacks)
- callback(:before_add, record) unless skip_callbacks
+ catch(:abort) do
+ callback(:before_add, record)
+ end || return unless skip_callbacks
set_inverse_instance(record)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/associations/preloader.rb
new/lib/active_record/associations/preloader.rb
--- old/lib/active_record/associations/preloader.rb 2019-11-05
15:37:41.000000000 +0100
+++ new/lib/active_record/associations/preloader.rb 2019-12-13
19:07:43.000000000 +0100
@@ -185,7 +185,7 @@
# and attach it to a relation. The class returned implements a `run`
method
# that accepts a preloader.
def preloader_for(reflection, owners)
- if owners.first.association(reflection.name).loaded?
+ if owners.all? { |o| o.association(reflection.name).loaded? }
return AlreadyLoaded
end
reflection.check_preloadable!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/gem_version.rb
new/lib/active_record/gem_version.rb
--- old/lib/active_record/gem_version.rb 2019-11-05 15:37:41.000000000
+0100
+++ new/lib/active_record/gem_version.rb 2019-12-13 19:07:43.000000000
+0100
@@ -9,7 +9,7 @@
module VERSION
MAJOR = 6
MINOR = 0
- TINY = 1
+ TINY = 2
PRE = nil
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/railties/databases.rake
new/lib/active_record/railties/databases.rake
--- old/lib/active_record/railties/databases.rake 2019-11-05
15:37:41.000000000 +0100
+++ new/lib/active_record/railties/databases.rake 2019-12-13
19:07:43.000000000 +0100
@@ -80,11 +80,14 @@
desc "Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)."
task migrate: :load_config do
+ original_config = ActiveRecord::Base.connection_config
ActiveRecord::Base.configurations.configs_for(env_name:
ActiveRecord::Tasks::DatabaseTasks.env).each do |db_config|
ActiveRecord::Base.establish_connection(db_config.config)
ActiveRecord::Tasks::DatabaseTasks.migrate
end
db_namespace["_dump"].invoke
+ ensure
+ ActiveRecord::Base.establish_connection(original_config)
end
# IMPORTANT: This task won't dump the schema if
ActiveRecord::Base.dump_schema_after_migration is set to false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/relation/query_methods.rb
new/lib/active_record/relation/query_methods.rb
--- old/lib/active_record/relation/query_methods.rb 2019-11-05
15:37:41.000000000 +0100
+++ new/lib/active_record/relation/query_methods.rb 2019-12-13
19:07:43.000000000 +0100
@@ -52,7 +52,15 @@
ActiveSupport::Deprecation.warn(<<~MSG.squish)
NOT conditions will no longer behave as NOR in Rails 6.1.
To continue using NOR conditions, NOT each conditions manually
- (`#{ opts.keys.map { |key| ".where.not(#{key.inspect} => ...)"
}.join }`).
+ (`#{
+ opts.flat_map { |key, value|
+ if value.is_a?(Hash) && value.size > 1
+ value.map { |k, v| ".where.not(#{key.inspect} => {
#{k.inspect} => ... })" }
+ else
+ ".where.not(#{key.inspect} => ...)"
+ end
+ }.join
+ }`).
MSG
@scope.where_clause += where_clause.invert(:nor)
else
@@ -64,7 +72,10 @@
private
def not_behaves_as_nor?(opts)
- opts.is_a?(Hash) && opts.size > 1
+ return false unless opts.is_a?(Hash)
+
+ opts.any? { |k, v| v.is_a?(Hash) && v.size > 1 } ||
+ opts.size > 1
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/scoping/named.rb
new/lib/active_record/scoping/named.rb
--- old/lib/active_record/scoping/named.rb 2019-11-05 15:37:41.000000000
+0100
+++ new/lib/active_record/scoping/named.rb 2019-12-13 19:07:43.000000000
+0100
@@ -31,7 +31,8 @@
ActiveSupport::Deprecation.warn(<<~MSG.squish)
Class level methods will no longer inherit scoping from
`#{scope._deprecated_scope_source}`
in Rails 6.1. To continue using the scoped relation, pass it
into the block directly.
- To instead access the full set of models, as Rails 6.1 will,
use `#{name}.unscoped`.
+ To instead access the full set of models, as Rails 6.1 will,
use `#{name}.unscoped`,
+ or `#{name}.default_scoped` if a model has default scopes.
MSG
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/test_fixtures.rb
new/lib/active_record/test_fixtures.rb
--- old/lib/active_record/test_fixtures.rb 2019-11-05 15:37:41.000000000
+0100
+++ new/lib/active_record/test_fixtures.rb 2019-12-13 19:07:43.000000000
+0100
@@ -129,6 +129,7 @@
# When connections are established in the future, begin a transaction
too
@connection_subscriber =
ActiveSupport::Notifications.subscribe("!connection.active_record") do |_, _,
_, _, payload|
spec_name = payload[:spec_name] if payload.key?(:spec_name)
+ setup_shared_connection_pool
if spec_name
begin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2019-11-05 15:37:41.000000000 +0100
+++ new/metadata 2019-12-13 19:07:43.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: activerecord
version: !ruby/object:Gem::Version
- version: 6.0.1
+ version: 6.0.2
platform: ruby
authors:
- David Heinemeier Hansson
autorequire:
bindir: bin
cert_chain: []
-date: 2019-11-05 00:00:00.000000000 Z
+date: 2019-12-13 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: activesupport
@@ -16,28 +16,28 @@
requirements:
- - '='
- !ruby/object:Gem::Version
- version: 6.0.1
+ version: 6.0.2
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - '='
- !ruby/object:Gem::Version
- version: 6.0.1
+ version: 6.0.2
- !ruby/object:Gem::Dependency
name: activemodel
requirement: !ruby/object:Gem::Requirement
requirements:
- - '='
- !ruby/object:Gem::Version
- version: 6.0.1
+ version: 6.0.2
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - '='
- !ruby/object:Gem::Version
- version: 6.0.1
+ version: 6.0.2
description: Databases on Rails. Build a persistent domain model by mapping
database
tables to Ruby classes. Strong conventions for associations, validations,
aggregations,
migrations, and testing come baked-in.
@@ -390,10 +390,10 @@
- MIT
metadata:
bug_tracker_uri: https://github.com/rails/rails/issues
- changelog_uri:
https://github.com/rails/rails/blob/v6.0.1/activerecord/CHANGELOG.md
- documentation_uri: https://api.rubyonrails.org/v6.0.1/
+ changelog_uri:
https://github.com/rails/rails/blob/v6.0.2/activerecord/CHANGELOG.md
+ documentation_uri: https://api.rubyonrails.org/v6.0.2/
mailing_list_uri: https://groups.google.com/forum/#!forum/rubyonrails-talk
- source_code_uri: https://github.com/rails/rails/tree/v6.0.1/activerecord
+ source_code_uri: https://github.com/rails/rails/tree/v6.0.2/activerecord
post_install_message:
rdoc_options:
- "--main"