Hello community, here is the log from the commit of package rubygem-activerecord-4_2 for openSUSE:Factory checked in at 2016-03-01 09:42:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-12-14 10:13:35.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-activerecord-4_2.new/rubygem-activerecord-4_2.changes 2016-03-01 09:42:13.000000000 +0100 @@ -1,0 +2,6 @@ +Tue Jan 26 05:31:50 UTC 2016 - coolo@suse.com + +- updated to version 4.2.5.1 + see installed CHANGELOG.md + +------------------------------------------------------------------- Old: ---- activerecord-4.2.5.gem New: ---- activerecord-4.2.5.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-activerecord-4_2.spec ++++++ --- /var/tmp/diff_new_pack.DyZr52/_old 2016-03-01 09:42:14.000000000 +0100 +++ /var/tmp/diff_new_pack.DyZr52/_new 2016-03-01 09:42:14.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-activerecord-4_2 # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 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.5 +Version: 4.2.5.1 Release: 0 %define mod_name activerecord %define mod_full_name %{mod_name}-%{version} ++++++ activerecord-4.2.5.gem -> activerecord-4.2.5.1.gem ++++++ 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/enum.rb new/lib/active_record/enum.rb --- old/lib/active_record/enum.rb 2015-11-12 18:04:59.000000000 +0100 +++ new/lib/active_record/enum.rb 2016-01-25 19:25:06.000000000 +0100 @@ -69,7 +69,7 @@ # Where conditions on an enum attribute must use the ordinal value of an enum. module Enum def self.extended(base) # :nodoc: - base.class_attribute(:defined_enums) + base.class_attribute(:defined_enums, instance_writer: false) base.defined_enums = {} 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 2015-11-12 18:04:59.000000000 +0100 +++ new/lib/active_record/gem_version.rb 2016-01-25 19:25:06.000000000 +0100 @@ -8,7 +8,7 @@ MAJOR = 4 MINOR = 2 TINY = 5 - PRE = nil + PRE = "1" STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".") end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_record/nested_attributes.rb new/lib/active_record/nested_attributes.rb --- old/lib/active_record/nested_attributes.rb 2015-11-12 18:04:59.000000000 +0100 +++ new/lib/active_record/nested_attributes.rb 2016-01-25 19:25:06.000000000 +0100 @@ -523,7 +523,7 @@ # has_destroy_flag? or if a <tt>:reject_if</tt> proc exists for this # association and evaluates to +true+. def reject_new_record?(association_name, attributes) - has_destroy_flag?(attributes) || call_reject_if(association_name, attributes) + will_be_destroyed?(association_name, attributes) || call_reject_if(association_name, attributes) end # Determines if a record with the particular +attributes+ should be @@ -532,7 +532,8 @@ # # Returns false if there is a +destroy_flag+ on the attributes. def call_reject_if(association_name, attributes) - return false if has_destroy_flag?(attributes) + return false if will_be_destroyed?(association_name, attributes) + case callback = self.nested_attributes_options[association_name][:reject_if] when Symbol method(callback).arity == 0 ? send(callback) : send(callback, attributes) @@ -541,6 +542,15 @@ end end + # Only take into account the destroy flag if <tt>:allow_destroy</tt> is true + def will_be_destroyed?(association_name, attributes) + allow_destroy?(association_name) && has_destroy_flag?(attributes) + end + + def allow_destroy?(association_name) + self.nested_attributes_options[association_name][:allow_destroy] + end + def raise_nested_attributes_record_not_found!(association_name, record_id) raise RecordNotFound, "Couldn't find #{self.class._reflect_on_association(association_name).klass.name} with ID=#{record_id} for #{self.class.name} with ID=#{id}" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_record/reflection.rb new/lib/active_record/reflection.rb --- old/lib/active_record/reflection.rb 2015-11-12 18:04:59.000000000 +0100 +++ new/lib/active_record/reflection.rb 2016-01-25 19:25:06.000000000 +0100 @@ -7,8 +7,8 @@ extend ActiveSupport::Concern included do - class_attribute :_reflections - class_attribute :aggregate_reflections + class_attribute :_reflections, instance_writer: false + class_attribute :aggregate_reflections, instance_writer: false self._reflections = {} self.aggregate_reflections = {} end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-11-12 18:04:58.000000000 +0100 +++ new/metadata 2016-01-25 19:25:06.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: activerecord version: !ruby/object:Gem::Version - version: 4.2.5 + version: 4.2.5.1 platform: ruby authors: - David Heinemeier Hansson autorequire: bindir: bin cert_chain: [] -date: 2015-11-12 00:00:00.000000000 Z +date: 2016-01-25 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: activesupport @@ -16,28 +16,28 @@ requirements: - - '=' - !ruby/object:Gem::Version - version: 4.2.5 + version: 4.2.5.1 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 4.2.5 + version: 4.2.5.1 - !ruby/object:Gem::Dependency name: activemodel requirement: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 4.2.5 + version: 4.2.5.1 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 4.2.5 + version: 4.2.5.1 - !ruby/object:Gem::Dependency name: arel requirement: !ruby/object:Gem::Requirement @@ -304,7 +304,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.4.5.1 +rubygems_version: 2.5.1 signing_key: specification_version: 4 summary: Object-relational mapper framework (part of Rails).