Hello community,

here is the log from the commit of package rubygem-cfa for openSUSE:Factory 
checked in at 2017-04-30 21:09:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-cfa (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-cfa.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-cfa"

Sun Apr 30 21:09:56 2017 rev:6 rq:490986 version:0.6.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-cfa/rubygem-cfa.changes  2017-03-29 
13:22:17.559789099 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-cfa.new/rubygem-cfa.changes     
2017-04-30 21:09:59.102392907 +0200
@@ -1,0 +2,7 @@
+Tue Apr 25 10:49:03 UTC 2017 - jreidin...@suse.com
+
+- fix writting two elements in collection containing nested tree
+  (also caused by fix for bsc#1023204)
+- 0.6.1
+
+-------------------------------------------------------------------

Old:
----
  cfa-0.6.0.gem

New:
----
  cfa-0.6.1.gem

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

Other differences:
------------------
++++++ rubygem-cfa.spec ++++++
--- /var/tmp/diff_new_pack.W0hzQy/_old  2017-04-30 21:09:59.774298186 +0200
+++ /var/tmp/diff_new_pack.W0hzQy/_new  2017-04-30 21:09:59.778297622 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           rubygem-cfa
-Version:        0.6.0
+Version:        0.6.1
 Release:        0
 %define mod_name cfa
 %define mod_full_name %{mod_name}-%{version}

++++++ cfa-0.6.0.gem -> cfa-0.6.1.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/cfa/augeas_parser/writer.rb 
new/lib/cfa/augeas_parser/writer.rb
--- old/lib/cfa/augeas_parser/writer.rb 2017-03-21 16:50:58.000000000 +0100
+++ new/lib/cfa/augeas_parser/writer.rb 2017-04-25 12:50:10.000000000 +0200
@@ -236,11 +236,13 @@
       # @see https://github.com/hercules-team/augeas/wiki/Path-expressions
       def set_new_value(path, located_entry)
         aug.set(path, located_entry.entry_value)
-        prefix = path[/(^.*)\[[^\]]*\]/, 1] || path
-        # we need to get new path as set can look like [last() + 1]
-        # which creates new entry and we do not want to add subtree to new
-        # entries
-        new_path = aug.match(prefix + "[last()]").first
+        # we need to get new path as path used in aug.set can contains
+        # "[last() + 1]", so adding subtree to it, adds additional entry.
+        # So here, we replace "[last() + 1]" with "[last()]" so it will match
+        # path created by previous aug.set
+        match_str = path.gsub(/\[\s*last\(\)\s*\+\s*1\]/, "[last()]")
+
+        new_path = aug.match(match_str).first
         add_subtree(located_entry.entry_tree, new_path)
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/cfa/augeas_parser.rb new/lib/cfa/augeas_parser.rb
--- old/lib/cfa/augeas_parser.rb        2017-03-21 16:50:58.000000000 +0100
+++ new/lib/cfa/augeas_parser.rb        2017-04-25 12:50:10.000000000 +0200
@@ -147,7 +147,7 @@
     # @return [Array<Hash{Symbol => Object}>] a frozen array as it is
     #    just a copy of the real data
     def data
-      @data.select { |e| e[:operation] != :remove }.freeze
+      @data.reject { |e| e[:operation] == :remove }.freeze
     end
 
     # low level access to all AugeasElement including ones marked for removal
@@ -238,8 +238,10 @@
       return false if self.class != other.class
       other_data = other.data # do not compute again
       data.each_with_index do |entry, index|
-        return false if entry[:key] != other_data[index][:key]
-        return false if entry[:value] != other_data[index][:value]
+        other_entry = other_data[index]
+        return false unless other_entry
+        return false if entry[:key] != other_entry[:key]
+        return false if entry[:value] != other_entry[:value]
       end
 
       true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-03-21 16:51:15.000000000 +0100
+++ new/metadata        2017-04-25 13:21:23.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: cfa
 version: !ruby/object:Gem::Version
-  version: 0.6.0
+  version: 0.6.1
 platform: ruby
 authors:
 - Josef Reidinger
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-03-21 00:00:00.000000000 Z
+date: 2017-04-25 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: ruby-augeas


Reply via email to