Hello community,
here is the log from the commit of package rubygem-activerecord-4_2 for
openSUSE:Factory checked in at 2017-03-21 22:50:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-activerecord-4_2 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-activerecord-4_2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-activerecord-4_2"
Tue Mar 21 22:50:25 2017 rev:11 rq:479675 version:4.2.8
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-activerecord-4_2/rubygem-activerecord-4_2.changes
2016-08-25 09:55:31.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-activerecord-4_2.new/rubygem-activerecord-4_2.changes
2017-03-21 22:50:26.419223167 +0100
@@ -1,0 +2,36 @@
+Wed Feb 22 05:30:20 UTC 2017 - [email protected]
+
+- updated to version 4.2.8
+ see installed CHANGELOG.md
+
+ ## Rails 4.2.8 (February 21, 2017) ##
+
+ * Using a mysql2 connection after it fails to reconnect will now have an
error message
+ saying the connection is closed rather than an undefined method error
message.
+
+ *Dylan Thacker-Smith*
+
+ * Bust Model.attribute_names cache when resetting column information
+
+ *James Coleman*
+
+ * Fix query caching when type information is reset
+
+ Backports ancillary fix in 5.0.
+
+ *James Coleman*
+
+ * Allow `joins` to be unscoped.
+
+ Fixes #13775.
+
+ *Takashi Kokubun*
+
+ * Hashes can once again be passed to setters of `composed_of`, if all of
the
+ mapping methods are methods implemented on `Hash`.
+
+ Fixes #25978.
+
+ *Sean Griffin*
+
+-------------------------------------------------------------------
Old:
----
activerecord-4.2.7.1.gem
New:
----
activerecord-4.2.8.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-activerecord-4_2.spec ++++++
--- /var/tmp/diff_new_pack.EcDuvb/_old 2017-03-21 22:50:27.255104997 +0100
+++ /var/tmp/diff_new_pack.EcDuvb/_new 2017-03-21 22:50:27.259104431 +0100
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-activerecord-4_2
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-activerecord-4_2
-Version: 4.2.7.1
+Version: 4.2.8
Release: 0
%define mod_name activerecord
%define mod_full_name %{mod_name}-%{version}
++++++ activerecord-4.2.7.1.gem -> activerecord-4.2.8.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2016-08-11 00:25:26.000000000 +0200
+++ new/CHANGELOG.md 2017-02-21 17:07:00.000000000 +0100
@@ -1,3 +1,34 @@
+## Rails 4.2.8 (February 21, 2017) ##
+
+* Using a mysql2 connection after it fails to reconnect will now have an
error message
+ saying the connection is closed rather than an undefined method error
message.
+
+ *Dylan Thacker-Smith*
+
+* Bust Model.attribute_names cache when resetting column information
+
+ *James Coleman*
+
+* Fix query caching when type information is reset
+
+ Backports ancillary fix in 5.0.
+
+ *James Coleman*
+
+* Allow `joins` to be unscoped.
+
+ Fixes #13775.
+
+ *Takashi Kokubun*
+
+* Hashes can once again be passed to setters of `composed_of`, if all of the
+ mapping methods are methods implemented on `Hash`.
+
+ Fixes #25978.
+
+ *Sean Griffin*
+
+
## Rails 4.2.7 (July 12, 2016) ##
* Inspecting an object with an associated array of over 10 elements no longer
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/aggregations.rb
new/lib/active_record/aggregations.rb
--- old/lib/active_record/aggregations.rb 2016-08-11 00:25:26.000000000
+0200
+++ new/lib/active_record/aggregations.rb 2017-02-21 17:07:00.000000000
+0100
@@ -249,7 +249,9 @@
part = converter.respond_to?(:call) ? converter.call(part) :
klass.send(converter, part)
end
- if part.is_a?(Hash)
+ hash_from_multiparameter_assignment = part.is_a?(Hash) &&
+ part.each_key.all? { |k| k.is_a?(Integer) }
+ if hash_from_multiparameter_assignment
part = klass.new(*part.values)
end
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
2016-08-11 00:25:26.000000000 +0200
+++ new/lib/active_record/associations/collection_association.rb
2017-02-21 17:07:00.000000000 +0100
@@ -61,10 +61,17 @@
# Implements the ids writer method, e.g. foo.item_ids= for Foo.has_many
:items
def ids_writer(ids)
- pk_type = reflection.primary_key_type
- ids = Array(ids).reject { |id| id.blank? }
- ids.map! { |i| pk_type.type_cast_from_user(i) }
- replace(klass.find(ids).index_by { |r| r.id }.values_at(*ids))
+ pk_column = reflection.association_primary_key
+ pk_type = klass.type_for_attribute(pk_column)
+ ids = Array(ids).reject(&:blank?).map do |i|
+ pk_type.type_cast_from_user(i)
+ end
+
+ if (objs = klass.where(pk_column => ids)).size == ids.size
+ replace(objs.index_by { |r| r.send(pk_column) }.values_at(*ids))
+ else
+ objs.raise_record_not_found_exception!(ids, objs.size, ids.size)
+ end
end
def reset
@@ -264,7 +271,7 @@
_options = records.extract_options!
dependent = _options[:dependent] || options[:dependent]
- records = find(records) if records.any? { |record|
record.kind_of?(Fixnum) || record.kind_of?(String) }
+ records = find(records) if records.any? { |record|
record.kind_of?(Integer) || record.kind_of?(String) }
delete_or_destroy(records, dependent)
end
@@ -275,7 +282,7 @@
# +:dependent+ option.
def destroy(*records)
return if records.empty?
- records = find(records) if records.any? { |record|
record.kind_of?(Fixnum) || record.kind_of?(String) }
+ records = find(records) if records.any? { |record|
record.kind_of?(Integer) || record.kind_of?(String) }
delete_or_destroy(records, :destroy)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/associations/collection_proxy.rb
new/lib/active_record/associations/collection_proxy.rb
--- old/lib/active_record/associations/collection_proxy.rb 2016-08-11
00:25:26.000000000 +0200
+++ new/lib/active_record/associations/collection_proxy.rb 2017-02-21
17:07:00.000000000 +0100
@@ -562,7 +562,7 @@
# Pet.find(1)
# # => ActiveRecord::RecordNotFound: Couldn't find Pet with id=1
#
- # You can pass +Fixnum+ or +String+ values, it finds the records
+ # You can pass +Integer+ or +String+ values, it finds the records
# responding to the +id+ and executes delete on them.
#
# class Person < ActiveRecord::Base
@@ -626,7 +626,7 @@
#
# Pet.find(1, 2, 3) # => ActiveRecord::RecordNotFound: Couldn't find
all Pets with IDs (1, 2, 3)
#
- # You can pass +Fixnum+ or +String+ values, it finds the records
+ # You can pass +Integer+ or +String+ values, it finds the records
# responding to the +id+ and then deletes them from the database.
#
# person.pets.size # => 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_record/associations/join_dependency/join_association.rb
new/lib/active_record/associations/join_dependency/join_association.rb
--- old/lib/active_record/associations/join_dependency/join_association.rb
2016-08-11 00:25:26.000000000 +0200
+++ new/lib/active_record/associations/join_dependency/join_association.rb
2017-02-21 17:07:00.000000000 +0100
@@ -52,7 +52,15 @@
end
scope_chain_index += 1
- scope_chain_items.concat [klass.send(:build_default_scope,
ActiveRecord::Relation.create(klass, table))].compact
+ klass_scope =
+ if klass.current_scope
+ klass.current_scope.clone.tap { |scope|
+ scope.joins_values = []
+ }
+ else
+ klass.send(:build_default_scope,
ActiveRecord::Relation.create(klass, table))
+ end
+ scope_chain_items.concat [klass_scope].compact
rel = scope_chain_items.inject(scope_chain_items.shift) do |left,
right|
left.merge right
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/attribute_assignment.rb
new/lib/active_record/attribute_assignment.rb
--- old/lib/active_record/attribute_assignment.rb 2016-08-11
00:25:26.000000000 +0200
+++ new/lib/active_record/attribute_assignment.rb 2017-02-21
17:07:00.000000000 +0100
@@ -69,7 +69,7 @@
# by calling new on the column type or aggregation type (through
composed_of) object with these parameters.
# So having the pairs written_on(1) = "2004", written_on(2) = "6",
written_on(3) = "24", will instantiate
# written_on (a date type) with Date.new("2004", "6", "24"). You can also
specify a typecast character in the
- # parentheses to have the parameters typecasted before they're used in the
constructor. Use i for Fixnum and
+ # parentheses to have the parameters typecasted before they're used in the
constructor. Use i for Integer and
# f for Float. If all the values for a given attribute are empty, the
attribute will be set to +nil+.
def assign_multiparameter_attributes(pairs)
execute_callstack_for_multiparameter_attributes(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/attribute_methods/write.rb
new/lib/active_record/attribute_methods/write.rb
--- old/lib/active_record/attribute_methods/write.rb 2016-08-11
00:25:26.000000000 +0200
+++ new/lib/active_record/attribute_methods/write.rb 2017-02-21
17:07:00.000000000 +0100
@@ -50,7 +50,7 @@
end
# Updates the attribute identified by <tt>attr_name</tt> with the
- # specified +value+. Empty strings for fixnum and float columns are
+ # specified +value+. Empty strings for Integer and Float columns are
# turned into +nil+.
def write_attribute(attr_name, value)
write_attribute_with_type_cast(attr_name, value, true)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/attribute_methods.rb
new/lib/active_record/attribute_methods.rb
--- old/lib/active_record/attribute_methods.rb 2016-08-11 00:25:26.000000000
+0200
+++ new/lib/active_record/attribute_methods.rb 2017-02-21 17:07:00.000000000
+0100
@@ -364,7 +364,7 @@
# person = Person.new
# person[:age] = '22'
# person[:age] # => 22
- # person[:age] # => Fixnum
+ # person[:age].class # => Integer
def []=(attr_name, value)
write_attribute(attr_name, value)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/attributes.rb
new/lib/active_record/attributes.rb
--- old/lib/active_record/attributes.rb 2016-08-11 00:25:26.000000000 +0200
+++ new/lib/active_record/attributes.rb 2017-02-21 17:07:00.000000000 +0100
@@ -136,6 +136,7 @@
@content_columns = nil
@default_attributes = nil
@persistable_attribute_names = nil
+ @attribute_names = nil
end
def raw_default_values
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_record/connection_adapters/abstract/connection_pool.rb
new/lib/active_record/connection_adapters/abstract/connection_pool.rb
--- old/lib/active_record/connection_adapters/abstract/connection_pool.rb
2016-08-11 00:25:26.000000000 +0200
+++ new/lib/active_record/connection_adapters/abstract/connection_pool.rb
2017-02-21 17:07:00.000000000 +0100
@@ -637,7 +637,7 @@
end
def pool_from_any_process_for(owner)
- owner_to_pool = @owner_to_pool.values.find { |v| v[owner.name] }
+ owner_to_pool = @owner_to_pool.values.reverse.find { |v| v[owner.name]
}
owner_to_pool && owner_to_pool[owner.name]
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_record/connection_adapters/abstract/quoting.rb
new/lib/active_record/connection_adapters/abstract/quoting.rb
--- old/lib/active_record/connection_adapters/abstract/quoting.rb
2016-08-11 00:25:26.000000000 +0200
+++ new/lib/active_record/connection_adapters/abstract/quoting.rb
2017-02-21 17:07:00.000000000 +0100
@@ -1,4 +1,5 @@
require 'active_support/core_ext/big_decimal/conversions'
+require "active_support/multibyte/chars"
module ActiveRecord
module ConnectionAdapters # :nodoc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
new/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
--- old/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
2016-08-11 00:25:26.000000000 +0200
+++ new/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
2017-02-21 17:07:00.000000000 +0100
@@ -750,7 +750,7 @@
case length
when Hash
column_names.each {|name| option_strings[name] +=
"(#{length[name]})" if length.has_key?(name) && length[name].present?}
- when Fixnum
+ when Integer
column_names.each {|name| option_strings[name] += "(#{length})"}
end
end
@@ -864,7 +864,7 @@
# Increase timeout so the server doesn't disconnect us.
wait_timeout = @config[:wait_timeout]
- wait_timeout = 2147483 unless wait_timeout.is_a?(Fixnum)
+ wait_timeout = 2147483 unless wait_timeout.is_a?(Integer)
variables['wait_timeout'] =
self.class.type_cast_config_to_integer(wait_timeout)
# Make MySQL reject illegal values rather than truncating or blanking
them, see
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_record/connection_adapters/mysql2_adapter.rb
new/lib/active_record/connection_adapters/mysql2_adapter.rb
--- old/lib/active_record/connection_adapters/mysql2_adapter.rb 2016-08-11
00:25:26.000000000 +0200
+++ new/lib/active_record/connection_adapters/mysql2_adapter.rb 2017-02-21
17:07:00.000000000 +0100
@@ -87,7 +87,6 @@
#++
def active?
- return false unless @connection
@connection.ping
end
@@ -102,10 +101,7 @@
# Otherwise, this method does nothing.
def disconnect!
super
- unless @connection.nil?
- @connection.close
- @connection = nil
- end
+ @connection.close
end
#--
@@ -222,11 +218,9 @@
# Executes the SQL statement in the context of this connection.
def execute(sql, name = nil)
- if @connection
- # make sure we carry over any changes to
ActiveRecord::Base.default_timezone that have been
- # made since we established the connection
- @connection.query_options[:database_timezone] =
ActiveRecord::Base.default_timezone
- end
+ # make sure we carry over any changes to
ActiveRecord::Base.default_timezone that have been
+ # made since we established the connection
+ @connection.query_options[:database_timezone] =
ActiveRecord::Base.default_timezone
super
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_record/connection_adapters/postgresql/oid/array.rb
new/lib/active_record/connection_adapters/postgresql/oid/array.rb
--- old/lib/active_record/connection_adapters/postgresql/oid/array.rb
2016-08-11 00:25:26.000000000 +0200
+++ new/lib/active_record/connection_adapters/postgresql/oid/array.rb
2017-02-21 17:07:00.000000000 +0100
@@ -80,6 +80,7 @@
value
end
when nil then "NULL"
+ when ::Date, ::DateTime, ::Time then
subtype.type_cast_for_schema(value)
else value
end
end
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 2016-08-11 00:25:26.000000000
+0200
+++ new/lib/active_record/gem_version.rb 2017-02-21 17:07:00.000000000
+0100
@@ -7,8 +7,8 @@
module VERSION
MAJOR = 4
MINOR = 2
- TINY = 7
- PRE = "1"
+ TINY = 8
+ PRE = nil
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/model_schema.rb
new/lib/active_record/model_schema.rb
--- old/lib/active_record/model_schema.rb 2016-08-11 00:25:26.000000000
+0200
+++ new/lib/active_record/model_schema.rb 2017-02-21 17:07:00.000000000
+0100
@@ -247,7 +247,7 @@
# Returns a hash where the keys are column names and the values are
# default values when instantiating the AR object for this table.
def column_defaults
- _default_attributes.to_hash
+ _default_attributes.dup.to_hash
end
def _default_attributes # :nodoc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/relation/calculations.rb
new/lib/active_record/relation/calculations.rb
--- old/lib/active_record/relation/calculations.rb 2016-08-11
00:25:26.000000000 +0200
+++ new/lib/active_record/relation/calculations.rb 2017-02-21
17:07:00.000000000 +0100
@@ -94,7 +94,7 @@
#
# There are two basic forms of output:
#
- # * Single aggregate value: The single value is type cast to Fixnum for
COUNT, Float
+ # * Single aggregate value: The single value is type cast to Integer for
COUNT, Float
# for AVG, and the given column's type for everything else.
#
# * Grouped values: This returns an ordered hash of the values and
groups them. It
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/schema_migration.rb
new/lib/active_record/schema_migration.rb
--- old/lib/active_record/schema_migration.rb 2016-08-11 00:25:26.000000000
+0200
+++ new/lib/active_record/schema_migration.rb 2017-02-21 17:07:00.000000000
+0100
@@ -34,10 +34,7 @@
end
def drop_table
- if table_exists?
- connection.remove_index table_name, name: index_name
- connection.drop_table(table_name)
- end
+ connection.drop_table table_name if table_exists?
end
def normalize_migration_number(number)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record/type/value.rb
new/lib/active_record/type/value.rb
--- old/lib/active_record/type/value.rb 2016-08-11 00:25:26.000000000 +0200
+++ new/lib/active_record/type/value.rb 2017-02-21 17:07:00.000000000 +0100
@@ -86,6 +86,11 @@
scale == other.scale &&
limit == other.limit
end
+ alias eql? ==
+
+ def hash
+ [self.class, precision, scale, limit].hash
+ end
private
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_record.rb new/lib/active_record.rb
--- old/lib/active_record.rb 2016-08-11 00:25:26.000000000 +0200
+++ new/lib/active_record.rb 2017-02-21 17:07:00.000000000 +0100
@@ -43,7 +43,6 @@
autoload :Explain
autoload :Inheritance
autoload :Integration
- autoload :LegacyYamlAdapter
autoload :Migration
autoload :Migrator, 'active_record/migration'
autoload :ModelSchema
@@ -80,6 +79,8 @@
autoload :AttributeMethods
autoload :AutosaveAssociation
+ autoload :LegacyYamlAdapter
+
autoload :Relation
autoload :AssociationRelation
autoload :NullRelation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2016-08-11 00:25:26.000000000 +0200
+++ new/metadata 2017-02-21 17:07:00.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: activerecord
version: !ruby/object:Gem::Version
- version: 4.2.7.1
+ version: 4.2.8
platform: ruby
authors:
- David Heinemeier Hansson
autorequire:
bindir: bin
cert_chain: []
-date: 2016-08-10 00:00:00.000000000 Z
+date: 2017-02-21 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: activesupport
@@ -16,28 +16,28 @@
requirements:
- - '='
- !ruby/object:Gem::Version
- version: 4.2.7.1
+ version: 4.2.8
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - '='
- !ruby/object:Gem::Version
- version: 4.2.7.1
+ version: 4.2.8
- !ruby/object:Gem::Dependency
name: activemodel
requirement: !ruby/object:Gem::Requirement
requirements:
- - '='
- !ruby/object:Gem::Version
- version: 4.2.7.1
+ version: 4.2.8
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - '='
- !ruby/object:Gem::Version
- version: 4.2.7.1
+ version: 4.2.8
- !ruby/object:Gem::Dependency
name: arel
requirement: !ruby/object:Gem::Requirement
@@ -304,9 +304,8 @@
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 2.6.6
+rubygems_version: 2.6.10
signing_key:
specification_version: 4
summary: Object-relational mapper framework (part of Rails).
test_files: []
-has_rdoc: