Hello community,

here is the log from the commit of package rubygem-activerecord-4_2 for 
openSUSE:Factory checked in at 2016-07-20 09:25: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"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-activerecord-4_2/rubygem-activerecord-4_2.changes
        2016-03-18 21:40:36.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-activerecord-4_2.new/rubygem-activerecord-4_2.changes
   2016-07-20 09:25:29.000000000 +0200
@@ -1,0 +2,40 @@
+Wed Jul 13 04:31:39 UTC 2016 - [email protected]
+
+- updated to version 4.2.7
+ see installed CHANGELOG.md
+
+  ## Rails 4.2.7 (July 12, 2016) ##
+  
+  *   Inspecting an object with an associated array of over 10 elements no 
longer
+      truncates the array, preventing `inspect` from looping infinitely in some
+      cases.
+  
+      *Kevin McPhillips*
+  
+  *   Ensure hashes can be assigned to attributes created using `composed_of`.
+      Fixes #25210.
+  
+      *Sean Griffin*
+  
+  *   Queries such as `Computer.joins(:monitor).group(:status).count` will now 
be
+      interpreted as  
`Computer.joins(:monitor).group('computers.status').count`
+      so that when `Computer` and `Monitor` have both `status` columns we don't
+      have conflicts in projection.
+  
+      *Rafael Sales*
+  
+  *   ActiveRecord::Relation#count: raise an ArgumentError when finder options
+      are specified or an ActiveRecord::StatementInvalid when an invalid type
+      is provided for a column name (e.g. a Hash).
+  
+      Fixes #20434
+  
+      *Konstantinos Rousis*
+  
+  *   Correctly pass MySQL options when using structure_dump or structure_load
+  
+      Specifically, it fixes an issue when using SSL authentication.
+  
+      *Alex Coomans*
+
+-------------------------------------------------------------------

Old:
----
  activerecord-4.2.6.gem

New:
----
  activerecord-4.2.7.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-activerecord-4_2.spec ++++++
--- /var/tmp/diff_new_pack.zu8B3j/_old  2016-07-20 09:25:31.000000000 +0200
+++ /var/tmp/diff_new_pack.zu8B3j/_new  2016-07-20 09:25:31.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-activerecord-4_2
-Version:        4.2.6
+Version:        4.2.7
 Release:        0
 %define mod_name activerecord
 %define mod_full_name %{mod_name}-%{version}

++++++ activerecord-4.2.6.gem -> activerecord-4.2.7.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2016-03-07 23:31:30.000000000 +0100
+++ new/CHANGELOG.md    2016-07-13 04:53:42.000000000 +0200
@@ -1,3 +1,38 @@
+## Rails 4.2.7 (July 12, 2016) ##
+
+*   Inspecting an object with an associated array of over 10 elements no longer
+    truncates the array, preventing `inspect` from looping infinitely in some
+    cases.
+
+    *Kevin McPhillips*
+
+*   Ensure hashes can be assigned to attributes created using `composed_of`.
+    Fixes #25210.
+
+    *Sean Griffin*
+
+*   Queries such as `Computer.joins(:monitor).group(:status).count` will now be
+    interpreted as  `Computer.joins(:monitor).group('computers.status').count`
+    so that when `Computer` and `Monitor` have both `status` columns we don't
+    have conflicts in projection.
+
+    *Rafael Sales*
+
+*   ActiveRecord::Relation#count: raise an ArgumentError when finder options
+    are specified or an ActiveRecord::StatementInvalid when an invalid type
+    is provided for a column name (e.g. a Hash).
+
+    Fixes #20434
+
+    *Konstantinos Rousis*
+
+*   Correctly pass MySQL options when using structure_dump or structure_load
+
+    Specifically, it fixes an issue when using SSL authentication.
+
+    *Alex Coomans*
+
+
 ## Rails 4.2.6 (March 07, 2016) ##
 
 *   Fix a bug where using `t.foreign_key` twice with the same `to_table` within
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-03-07 23:31:30.000000000 
+0100
+++ new/lib/active_record/aggregations.rb       2016-07-13 04:53:42.000000000 
+0200
@@ -244,14 +244,15 @@
         def writer_method(name, class_name, mapping, allow_nil, converter)
           define_method("#{name}=") do |part|
             klass = class_name.constantize
-            if part.is_a?(Hash)
-              part = klass.new(*part.values)
-            end
 
             unless part.is_a?(klass) || converter.nil? || part.nil?
               part = converter.respond_to?(:call) ? converter.call(part) : 
klass.send(converter, part)
             end
 
+            if part.is_a?(Hash)
+              part = klass.new(*part.values)
+            end
+
             if part.nil? && allow_nil
               mapping.each { |key, _| self[key] = nil }
               @aggregation_cache[name] = nil
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-03-07 23:31:30.000000000 
+0100
+++ new/lib/active_record/attribute_methods.rb  2016-07-13 04:53:42.000000000 
+0200
@@ -287,9 +287,8 @@
     # Returns an <tt>#inspect</tt>-like string for the value of the
     # attribute +attr_name+. String attributes are truncated up to 50
     # characters, Date and Time attributes are returned in the
-    # <tt>:db</tt> format, Array attributes are truncated up to 10 values.
-    # Other attributes return the value of <tt>#inspect</tt> without
-    # modification.
+    # <tt>:db</tt> format. Other attributes return the value of
+    # <tt>#inspect</tt> without modification.
     #
     #   person = Person.create!(name: 'David Heinemeier Hansson ' * 3)
     #
@@ -300,7 +299,7 @@
     #   # => "\"2012-10-22 00:15:07\""
     #
     #   person.attribute_for_inspect(:tag_ids)
-    #   # => "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...]"
+    #   # => "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]"
     def attribute_for_inspect(attr_name)
       value = read_attribute(attr_name)
 
@@ -308,9 +307,6 @@
         "#{value[0, 50]}...".inspect
       elsif value.is_a?(Date) || value.is_a?(Time)
         %("#{value.to_s(:db)}")
-      elsif value.is_a?(Array) && value.size > 10
-        inspected = value.first(10).inspect
-        %(#{inspected[0...-1]}, ...])
       else
         value.inspect
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/abstract_adapter.rb 
new/lib/active_record/connection_adapters/abstract_adapter.rb
--- old/lib/active_record/connection_adapters/abstract_adapter.rb       
2016-03-07 23:31:30.000000000 +0100
+++ new/lib/active_record/connection_adapters/abstract_adapter.rb       
2016-07-13 04:53:42.000000000 +0200
@@ -111,6 +111,18 @@
         @prepared_statements = false
       end
 
+      class Version
+        include Comparable
+
+        def initialize(version_string)
+          @version = version_string.split('.').map(&:to_i)
+        end
+
+        def <=>(version_string)
+          @version <=> version_string.split('.').map(&:to_i)
+        end
+      end
+
       class BindCollector < Arel::Collectors::Bind
         def compile(bvs, conn)
           super(bvs.map { |bv| conn.quote(*bv.reverse) })
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-03-07 23:31:30.000000000 +0100
+++ new/lib/active_record/connection_adapters/abstract_mysql_adapter.rb 
2016-07-13 04:53:42.000000000 +0200
@@ -203,7 +203,7 @@
       #
       # http://bugs.mysql.com/bug.php?id=39170
       def supports_transaction_isolation?
-        version[0] >= 5
+        version >= '5.0.0'
       end
 
       def supports_indexes_in_create?
@@ -215,7 +215,11 @@
       end
 
       def supports_views?
-        version[0] >= 5
+        version >= '5.0.0'
+      end
+
+      def supports_datetime_with_precision?
+        version >= '5.6.4'
       end
 
       def native_database_types
@@ -840,7 +844,7 @@
       private
 
       def version
-        @version ||= full_version.scan(/^(\d+)\.(\d+)\.(\d+)/).flatten.map { 
|v| v.to_i }
+        @version ||= Version.new(full_version.match(/^\d+\.\d+\.\d+/)[0])
       end
 
       def mariadb?
@@ -848,7 +852,7 @@
       end
 
       def supports_rename_index?
-        mariadb? ? false : (version[0] == 5 && version[1] >= 7) || version[0] 
>= 6
+        mariadb? ? false : version >= '5.7.6'
       end
 
       def configure_connection
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-03-07 
23:31:30.000000000 +0100
+++ new/lib/active_record/connection_adapters/mysql2_adapter.rb 2016-07-13 
04:53:42.000000000 +0200
@@ -75,7 +75,7 @@
       end
 
       def quoted_date(value)
-        if value.acts_like?(:time) && value.respond_to?(:usec)
+        if supports_datetime_with_precision? && value.acts_like?(:time) && 
value.respond_to?(:usec)
           "#{super}.#{sprintf("%06d", value.usec)}"
         else
           super
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/postgresql/schema_statements.rb 
new/lib/active_record/connection_adapters/postgresql/schema_statements.rb
--- old/lib/active_record/connection_adapters/postgresql/schema_statements.rb   
2016-03-07 23:31:30.000000000 +0100
+++ new/lib/active_record/connection_adapters/postgresql/schema_statements.rb   
2016-07-13 04:53:42.000000000 +0200
@@ -563,7 +563,7 @@
               when 1, 2; 'smallint'
               when 3, 4; 'integer'
               when 5..8; 'bigint'
-              else raise(ActiveRecordError, "No integer type has byte size 
#{limit}. Use a numeric with precision 0 instead.")
+              else raise(ActiveRecordError, "No integer type has byte size 
#{limit}. Use a numeric with scale 0 instead.")
             end
           when 'datetime'
             return super unless precision
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/sqlite3_adapter.rb 
new/lib/active_record/connection_adapters/sqlite3_adapter.rb
--- old/lib/active_record/connection_adapters/sqlite3_adapter.rb        
2016-03-07 23:31:30.000000000 +0100
+++ new/lib/active_record/connection_adapters/sqlite3_adapter.rb        
2016-07-13 04:53:42.000000000 +0200
@@ -74,18 +74,6 @@
         boolean:      { name: "boolean" }
       }
 
-      class Version
-        include Comparable
-
-        def initialize(version_string)
-          @version = version_string.split('.').map { |v| v.to_i }
-        end
-
-        def <=>(version_string)
-          @version <=> version_string.split('.').map { |v| v.to_i }
-        end
-      end
-
       class StatementPool < ConnectionAdapters::StatementPool
         def initialize(connection, max)
           super
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-03-07 23:31:30.000000000 
+0100
+++ new/lib/active_record/gem_version.rb        2016-07-13 04:53:42.000000000 
+0200
@@ -7,7 +7,7 @@
   module VERSION
     MAJOR = 4
     MINOR = 2
-    TINY  = 6
+    TINY  = 7
     PRE   = nil
 
     STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
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-03-07 
23:31:30.000000000 +0100
+++ new/lib/active_record/relation/calculations.rb      2016-07-13 
04:53:42.000000000 +0200
@@ -36,9 +36,15 @@
     # Note: not all valid +select+ expressions are valid +count+ expressions. 
The specifics differ
     # between databases. In invalid cases, an error from the database is 
thrown.
     def count(column_name = nil, options = {})
+      if options.present? && !ActiveRecord.const_defined?(:DeprecatedFinders)
+        raise ArgumentError, "Relation#count does not support finder options 
anymore. " \
+                             "Please build a scope and then call count on it 
or use the " \
+                             "activerecord-deprecated_finders gem to enable 
this functionality."
+
+      end
+
       # TODO: Remove options argument as soon we remove support to
       # activerecord-deprecated_finders.
-      column_name, options = nil, column_name if column_name.is_a?(Hash)
       calculate(:count, column_name, options)
     end
 
@@ -281,6 +287,7 @@
       else
         group_fields = group_attrs
       end
+      group_fields = arel_columns(group_fields)
 
       group_aliases = group_fields.map { |field|
         column_alias_for(field)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/tasks/database_tasks.rb 
new/lib/active_record/tasks/database_tasks.rb
--- old/lib/active_record/tasks/database_tasks.rb       2016-03-07 
23:31:30.000000000 +0100
+++ new/lib/active_record/tasks/database_tasks.rb       2016-07-13 
04:53:42.000000000 +0200
@@ -137,6 +137,7 @@
         Migrator.migrate(migrations_paths, version) do |migration|
           scope.blank? || scope == migration.scope
         end
+        ActiveRecord::Base.clear_cache!
       ensure
         Migration.verbose = verbose_was
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/tasks/mysql_database_tasks.rb 
new/lib/active_record/tasks/mysql_database_tasks.rb
--- old/lib/active_record/tasks/mysql_database_tasks.rb 2016-03-07 
23:31:30.000000000 +0100
+++ new/lib/active_record/tasks/mysql_database_tasks.rb 2016-07-13 
04:53:42.000000000 +0200
@@ -129,15 +129,19 @@
       end
 
       def prepare_command_options
-        args = []
-        args.concat(['--user', configuration['username']]) if 
configuration['username']
-        args << "--password=#{configuration['password']}"  if 
configuration['password']
-        args.concat(['--default-character-set', configuration['encoding']]) if 
configuration['encoding']
-        configuration.slice('host', 'port', 'socket').each do |k, v|
-          args.concat([ "--#{k}", v.to_s ]) if v
-        end
-
-        args
+        {
+          'host'      => '--host',
+          'port'      => '--port',
+          'socket'    => '--socket',
+          'username'  => '--user',
+          'password'  => '--password',
+          'encoding'  => '--default-character-set',
+          'sslca'     => '--ssl-ca',
+          'sslcert'   => '--ssl-cert',
+          'sslcapath' => '--ssl-capath',
+          'sslcipher' => '--ssl-cipher',
+          'sslkey'    => '--ssl-key'
+        }.map { |opt, arg| "#{arg}=#{configuration[opt]}" if 
configuration[opt] }.compact
       end
 
       def run_cmd(cmd, args, action)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/type/date.rb 
new/lib/active_record/type/date.rb
--- old/lib/active_record/type/date.rb  2016-03-07 23:31:30.000000000 +0100
+++ new/lib/active_record/type/date.rb  2016-07-13 04:53:42.000000000 +0200
@@ -9,6 +9,10 @@
         ::Date
       end
 
+      def type_cast_for_database(value)
+        type_cast(value)
+      end
+
       def type_cast_for_schema(value)
         "'#{value.to_s(:db)}'"
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/type/decimal.rb 
new/lib/active_record/type/decimal.rb
--- old/lib/active_record/type/decimal.rb       2016-03-07 23:31:30.000000000 
+0100
+++ new/lib/active_record/type/decimal.rb       2016-07-13 04:53:42.000000000 
+0200
@@ -27,12 +27,12 @@
           end
         end
 
-        scale ? casted_value.round(scale) : casted_value
+        apply_scale(casted_value)
       end
 
       def convert_float_to_big_decimal(value)
         if precision
-          BigDecimal(value, float_precision)
+          BigDecimal(apply_scale(value), float_precision)
         else
           value.to_d
         end
@@ -45,6 +45,14 @@
           precision.to_i
         end
       end
+
+      def apply_scale(value)
+        if scale
+          value.round(scale)
+        else
+          value
+        end
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-03-07 23:31:30.000000000 +0100
+++ new/metadata        2016-07-13 04:53:42.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: activerecord
 version: !ruby/object:Gem::Version
-  version: 4.2.6
+  version: 4.2.7
 platform: ruby
 authors:
 - David Heinemeier Hansson
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2016-03-07 00:00:00.000000000 Z
+date: 2016-07-13 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: activesupport
@@ -16,28 +16,28 @@
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 4.2.6
+        version: 4.2.7
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 4.2.6
+        version: 4.2.7
 - !ruby/object:Gem::Dependency
   name: activemodel
   requirement: !ruby/object:Gem::Requirement
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 4.2.6
+        version: 4.2.7
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 4.2.6
+        version: 4.2.7
 - !ruby/object:Gem::Dependency
   name: arel
   requirement: !ruby/object:Gem::Requirement
@@ -304,7 +304,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.5.1
+rubygems_version: 2.4.5.1
 signing_key: 
 specification_version: 4
 summary: Object-relational mapper framework (part of Rails).


Reply via email to