Blog-Infrastructure_100x385

mixlib-config 2.1

mixlib-config has a new minor release with save() and restore(). save will take any values the user has explicitly set and place them in a hash. This does not include defaults. A usage example with Chef::Config, which uses Mixlib::Config:

[sourcecode language="ruby"][/sourcecode]
Chef::Config.log_level = 'debug'
my_hash = Chef::Config.save # Returns { :log_level => 'debug' }
Chef::Config.log_level = 'error'
Chef::Config.restore(my_hash) # Chef::Config.log_level is now 'debug' again

mixlib-config 2.1 introduces no backwards-incompatible changes and should be safe to upgrade to. Please file issues at https://tickets.opscode.com.

Posted in:

John Keiser

John is a Principal Mad Scientist at Chef, has contributed code that will be worked around for years to nearly every piece of software Chef ships. Specific credits include chef-zero, chef-provisioning, and the ChefFS tools (knife diff, upload, and download).