diff options
author | John Keiser <jkeiser@opscode.com> | 2013-09-16 21:58:28 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-09-16 21:58:28 -0700 |
commit | 2d13566644515193d84f32ac0f67f073ebf58587 (patch) | |
tree | 871d490be63c04b79ce25f126700da6c811039c0 | |
parent | a42bbadd953c47c4819a08f48cbce18a47e9f207 (diff) | |
download | chef-2d13566644515193d84f32ac0f67f073ebf58587.tar.gz |
Use mixlib-config for more values
-rw-r--r-- | lib/chef/config.rb | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb index 957645ba79..ccf2d9a9aa 100644 --- a/lib/chef/config.rb +++ b/lib/chef/config.rb @@ -82,23 +82,13 @@ class Chef # === Parameters # url<String>:: String to be set for all of the chef-server-api URL's # - config_attr_writer :chef_server_url do |url| - url = url.strip - configure do |c| - c[:chef_server_url] = url - end - url - end + configurable(:chef_server_url).writes_value { |url| url.strip } # When you are using ActiveSupport, they monkey-patch 'daemonize' into Kernel. # So while this is basically identical to what method_missing would do, we pull # it up here and get a real method written so that things get dispatched # properly. - config_attr_writer :daemonize do |v| - configure do |c| - c[:daemonize] = v - end - end + configurable(:daemonize).writes_value { |v| v } # Override the config dispatch to set the value of log_location configuration option # @@ -255,6 +245,7 @@ class Chef default :http_retry_count, 5 default :http_retry_delay, 5 default :interval, nil + default :once, nil default :json_attribs, nil default :log_location, STDOUT # toggle info level log items that can create a lot of output |