Hello community,

here is the log from the commit of package rubygem-mixlib-config for 
openSUSE:Factory checked in at 2020-03-07 21:38:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-mixlib-config (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-mixlib-config.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-mixlib-config"

Sat Mar  7 21:38:54 2020 rev:13 rq:773790 version:3.0.6

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-mixlib-config/rubygem-mixlib-config.changes  
    2019-06-19 21:00:31.698094545 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-mixlib-config.new.26092/rubygem-mixlib-config.changes
   2020-03-07 21:38:56.704300772 +0100
@@ -1,0 +2,6 @@
+Mon Feb 10 15:08:57 UTC 2020 - Stephan Kulow <co...@suse.com>
+
+- updated to version 3.0.6
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  mixlib-config-3.0.1.gem

New:
----
  mixlib-config-3.0.6.gem

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

Other differences:
------------------
++++++ rubygem-mixlib-config.spec ++++++
--- /var/tmp/diff_new_pack.ZvG5NM/_old  2020-03-07 21:38:57.124301056 +0100
+++ /var/tmp/diff_new_pack.ZvG5NM/_new  2020-03-07 21:38:57.132301062 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-mixlib-config
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # 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-mixlib-config
-Version:        3.0.1
+Version:        3.0.6
 Release:        0
 %define mod_name mixlib-config
 %define mod_full_name %{mod_name}-%{version}
@@ -32,7 +32,7 @@
 BuildRequires:  %{ruby >= 2.4}
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  ruby-macros >= 5
-Url:            https://github.com/chef/mixlib-config
+URL:            https://github.com/chef/mixlib-config
 Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        A class based configuration library

++++++ mixlib-config-3.0.1.gem -> mixlib-config-3.0.6.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/mixlib/config/version.rb 
new/lib/mixlib/config/version.rb
--- old/lib/mixlib/config/version.rb    2019-04-23 20:43:51.000000000 +0200
+++ new/lib/mixlib/config/version.rb    2019-12-29 23:00:19.000000000 +0100
@@ -19,7 +19,7 @@
 module Mixlib
   module Config
 
-    VERSION = "3.0.1".freeze
+    VERSION = "3.0.6".freeze
 
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mixlib/config.rb new/lib/mixlib/config.rb
--- old/lib/mixlib/config.rb    2019-04-23 20:43:51.000000000 +0200
+++ new/lib/mixlib/config.rb    2019-12-29 23:00:19.000000000 +0100
@@ -18,11 +18,11 @@
 # limitations under the License.
 #
 
-require "mixlib/config/version"
-require "mixlib/config/configurable"
-require "mixlib/config/unknown_config_option_error"
-require "mixlib/config/reopened_config_context_with_configurable_error"
-require "mixlib/config/reopened_configurable_with_config_context_error"
+require_relative "config/version"
+require_relative "config/configurable"
+require_relative "config/unknown_config_option_error"
+require_relative "config/reopened_config_context_with_configurable_error"
+require_relative "config/reopened_configurable_with_config_context_error"
 
 module Mixlib
   module Config
@@ -33,11 +33,11 @@
       class << base; attr_accessor :config_context_lists; end
       class << base; attr_accessor :config_context_hashes; end
       class << base; attr_accessor :config_parent; end
-      base.configuration = Hash.new
-      base.configurables = Hash.new
-      base.config_contexts = Hash.new
-      base.config_context_lists = Hash.new
-      base.config_context_hashes = Hash.new
+      base.configuration = ({})
+      base.configurables = ({})
+      base.config_contexts = ({})
+      base.config_context_lists = ({})
+      base.config_context_hashes = ({})
       base.initialize_mixlib_config
     end
 
@@ -165,8 +165,8 @@
 
     # Resets all config options to their defaults.
     def reset
-      self.configuration = Hash.new
-      config_contexts.values.each { |config_context| config_context.reset }
+      self.configuration = ({})
+      config_contexts.values.each(&:reset)
     end
 
     # Makes a copy of any non-default values.
@@ -372,6 +372,7 @@
         if config_contexts.key?(symbol)
           raise ReopenedConfigContextWithConfigurableError, "Cannot redefine 
config_context #{symbol} as a configurable value"
         end
+
         configurables[symbol] = Configurable.new(symbol)
         define_attr_accessor_methods(symbol)
       end
@@ -531,9 +532,10 @@
     # <ArgumentError>:: if value is set to something other than true, false, 
or :warn
     #
     def config_strict_mode=(value)
-      if ![ true, false, :warn, nil ].include?(value)
+      unless [ true, false, :warn, nil ].include?(value)
         raise ArgumentError, "config_strict_mode must be true, false, nil or 
:warn"
       end
+
       @config_strict_mode = value
     end
 
@@ -567,7 +569,10 @@
     def apply_nested_hash(hash)
       hash.each do |k, v|
         if v.is_a? Hash
-          internal_get(k.to_sym).apply_nested_hash(v)
+          # If loading from hash, and we reference a context that doesn't exist
+          # and warning/strict is off, we need to create the config context 
that we expected to be here.
+          context = internal_get(k.to_sym) || config_context(k.to_sym)
+          context.apply_nested_hash(v)
         else
           internal_set(k.to_sym, v)
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2019-04-23 20:43:51.000000000 +0200
+++ new/metadata        2019-12-29 23:00:19.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: mixlib-config
 version: !ruby/object:Gem::Version
-  version: 3.0.1
+  version: 3.0.6
 platform: ruby
 authors:
 - Chef Software, Inc.
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2019-04-23 00:00:00.000000000 Z
+date: 2019-12-29 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: tomlrb


Reply via email to