Hello community,

here is the log from the commit of package rubygem-cfa for openSUSE:Factory 
checked in at 2019-06-25 22:17:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-cfa (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-cfa.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-cfa"

Tue Jun 25 22:17:37 2019 rev:11 rq:711303 version:1.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-cfa/rubygem-cfa.changes  2018-11-10 
16:50:39.908395407 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-cfa.new.4615/rubygem-cfa.changes        
2019-06-25 22:17:38.752738287 +0200
@@ -1,0 +2,9 @@
+Wed Jun 12 08:43:33 UTC 2019 - Martin Vidner <[email protected]>
+
+- Dropped the changes_only argument of BaseModel#save,
+  it does not work in the generic case.
+- Fixed NameError in AugeasTree#replace_entry (bsc#1137948)
+- Drop support for Ruby 2.2 and 2.3; add 2.6.
+- 1.0.0
+
+-------------------------------------------------------------------

Old:
----
  cfa-0.7.0.gem

New:
----
  cfa-1.0.0.gem

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

Other differences:
------------------
++++++ rubygem-cfa.spec ++++++
--- /var/tmp/diff_new_pack.SeJrcF/_old  2019-06-25 22:17:40.168740468 +0200
+++ /var/tmp/diff_new_pack.SeJrcF/_new  2019-06-25 22:17:40.212740536 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-cfa
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -12,12 +12,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via https://bugs.opensuse.org/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
 
 Name:           rubygem-cfa
-Version:        0.7.0
+Version:        1.0.0
 Release:        0
 %define mod_name cfa
 %define mod_full_name %{mod_name}-%{version}
@@ -25,8 +25,8 @@
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  %{ruby}
 BuildRequires:  ruby-macros >= 5
-Url:            http://github.com/config-files-api/config_files_api
-Source:         http://rubygems.org/gems/%{mod_full_name}.gem
+Url:            https://github.com/config-files-api/config_files_api
+Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Summary:        CFA (Config Files API) provides an easy way to create models 
on top
 License:        LGPL-3.0-only
 Group:          Development/Languages/Ruby

++++++ cfa-0.7.0.gem -> cfa-1.0.0.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/keys_cache.rb 
new/lib/cfa/augeas_parser/keys_cache.rb
--- old/lib/cfa/augeas_parser/keys_cache.rb     2018-11-08 15:18:36.000000000 
+0100
+++ new/lib/cfa/augeas_parser/keys_cache.rb     2019-06-21 10:23:49.000000000 
+0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 module CFA
   # A cache that holds all avaiable keys in an Augeas tree. It is used to
   # prevent too many `aug.match` calls which are expensive.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/cfa/augeas_parser/reader.rb 
new/lib/cfa/augeas_parser/reader.rb
--- old/lib/cfa/augeas_parser/reader.rb 2018-11-08 15:18:36.000000000 +0100
+++ new/lib/cfa/augeas_parser/reader.rb 2019-06-21 10:23:49.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require "cfa/augeas_parser/keys_cache"
 require "cfa/augeas_parser"
 
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 2018-11-08 15:18:36.000000000 +0100
+++ new/lib/cfa/augeas_parser/writer.rb 2019-06-21 10:23:49.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 module CFA
   # The goal of this class is to write the data stored in {AugeasTree}
   # back to Augeas.
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        2018-11-08 15:18:36.000000000 +0100
+++ new/lib/cfa/augeas_parser.rb        2019-06-21 10:23:49.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require "set"
 require "augeas"
 require "forwardable"
@@ -323,6 +325,7 @@
       @data.insert(index, new_entry)
       # the entry is not yet in the tree
       if old_entry[:operation] == :add
+        key = old_entry[:key]
         @data.delete_if { |d| d[:key] == key }
       else
         old_entry[:operation] = :remove
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/cfa/base_model.rb new/lib/cfa/base_model.rb
--- old/lib/cfa/base_model.rb   2018-11-08 15:18:36.000000000 +0100
+++ new/lib/cfa/base_model.rb   2019-06-21 10:23:49.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require "cfa/matcher"
 require "cfa/placer"
 # FIXME: tree should be generic and not augeas specific,
@@ -37,8 +39,7 @@
     #   then *parser* may raise an error.
     #   A properly written BaseModel subclass should prevent that by preventing
     #   insertion of such values in the first place.
-    def save(changes_only: false)
-      merge_changes if changes_only
+    def save
       @parser.file_name = @file_path if @parser.respond_to?(:file_name=)
       @file_handler.write(@file_path, @parser.serialize(data))
     end
@@ -131,13 +132,6 @@
 
     attr_accessor :data
 
-    def merge_changes
-      new_data = data.dup
-      read
-      # TODO: recursive merge
-      data.merge(new_data)
-    end
-
     # Modify an **existing** entry and return `true`,
     # or do nothing and return `false`.
     # @return [Boolean]
@@ -172,10 +166,16 @@
     end
   end
 
-  # Representing boolean value switcher in default grub configuration file.
+  # Represents a boolean value switcher in default grub configuration file.
   # Allows easy switching and questioning for boolean value, even if
-  # represented by text in config file
+  # represented by text in config file.
+  # It's tristate: if unset, {#enabled?} and {#disabled?} return `nil`
+  # (but once set, we cannot return to an unset state).
   class BooleanValue
+    # @param name [String]
+    # @param model [BaseModel]
+    # @param true_value [String]
+    # @param false_value [String]
     def initialize(name, model, true_value: "true", false_value: "false")
       @name = name
       @model = model
@@ -183,32 +183,42 @@
       @false_value = false_value
     end
 
+    # Set to *true*
     def enable
       @model.generic_set(@name, @true_value)
     end
 
+    # Set to *false*
     def disable
       @model.generic_set(@name, @false_value)
     end
 
+    # @return [Boolean,nil] true, false, (nil if undefined)
     def enabled?
-      return nil unless data
+      d = data
+      return nil unless d
 
-      data == @true_value
+      d == @true_value
     end
 
+    # @return [Boolean,nil] true, false, (nil if undefined)
     def disabled?
-      return nil unless data
+      d = data
+      return nil unless d
 
-      data != @true_value
+      d != @true_value
     end
 
+    # @return [Boolean]
+    #   true if the key has a value;
+    #   false if {#enabled?} and {#disabled?} return `nil`.
     def defined?
       !data.nil?
     end
 
     # sets boolean value, recommend to use for generic boolean setter.
     # for constants prefer to use enable/disable
+    # @param value [Boolean]
     def value=(value)
       @model.generic_set(@name, value ? @true_value : @false_value)
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/cfa/matcher.rb new/lib/cfa/matcher.rb
--- old/lib/cfa/matcher.rb      2018-11-08 15:18:36.000000000 +0100
+++ new/lib/cfa/matcher.rb      2019-06-21 10:23:49.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 module CFA
   # The Matcher is used as a predicate on {AugeasElement}.
   #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/cfa/memory_file.rb new/lib/cfa/memory_file.rb
--- old/lib/cfa/memory_file.rb  2018-11-08 15:18:36.000000000 +0100
+++ new/lib/cfa/memory_file.rb  2019-06-21 10:23:49.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 module CFA
   # memory file is used when string is stored only in memory.
   # Useful for testing. For remote read or socket read, own File class
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/cfa/placer.rb new/lib/cfa/placer.rb
--- old/lib/cfa/placer.rb       2018-11-08 15:18:36.000000000 +0100
+++ new/lib/cfa/placer.rb       2019-06-21 10:23:49.000000000 +0200
@@ -1,15 +1,18 @@
+# frozen_string_literal: true
+
 module CFA
   # Places a new {AugeasElement} into an {AugeasTree}.
   # @abstract Subclasses implement different ways **where**
   #   to place the entry by overriding {#new_element}.
   class Placer
-    # @param  [AugeasTree] tree
-    # @return [AugeasElement,Hash] the new element; it is empty!
-    #   Note that the return value is actually a Hash; {AugeasElement}
-    #   documents its structure.
+    # @overload new_element(tree)
+    #   @param  [AugeasTree] tree
+    #   @return [AugeasElement,Hash] the new element; it is empty!
+    #     Note that the return value is actually a Hash; {AugeasElement}
+    #     documents its structure.
     def new_element(_tree)
       raise NotImplementedError,
-        "Subclasses of #{Module.nesting.first} must override #{__method__}"
+            "Subclasses of #{Module.nesting.first} must override #{__method__}"
     end
 
   protected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2018-11-08 15:18:47.000000000 +0100
+++ new/metadata        2019-06-21 10:27:02.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: cfa
 version: !ruby/object:Gem::Version
-  version: 0.7.0
+  version: 1.0.0
 platform: ruby
 authors:
 - Josef Reidinger
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2018-11-08 00:00:00.000000000 Z
+date: 2019-06-21 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: ruby-augeas


Reply via email to