diff options
author | Jon Cowie <jonlives@gmail.com> | 2018-02-27 13:34:11 +0000 |
---|---|---|
committer | Jon Cowie <jonlives@gmail.com> | 2018-02-27 13:34:11 +0000 |
commit | ac9d4e7de1b10293da89f2d1322127ea39a92bd0 (patch) | |
tree | cf2bd51d2c2ce7f8bf275edf85c53da8a6e8cccb /lib/chef/data_collector.rb | |
parent | 00fdd83323050fd6dc30dda0772fca753010adae (diff) | |
download | chef-ac9d4e7de1b10293da89f2d1322127ea39a92bd0.tar.gz |
Minor tweaks to fix things from code review
Signed-off-by: Jon Cowie <jonlives@gmail.com>
Diffstat (limited to 'lib/chef/data_collector.rb')
-rw-r--r-- | lib/chef/data_collector.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb index e84390a901..dee25958c4 100644 --- a/lib/chef/data_collector.rb +++ b/lib/chef/data_collector.rb @@ -302,11 +302,9 @@ class Chef end def setup_http_output_locations - http_output_locations = {} - Chef::Config[:data_collector][:output_locations][:urls].each do |location_url| + Chef::Config[:data_collector][:output_locations][:urls].each_with_object({}) do |location_url,http_output_locations| http_output_locations[location_url] = setup_http_client(location_url) end - http_output_locations end # @@ -544,7 +542,7 @@ class Chef def validate_data_collector_output_locations! if data_collector_output_locations.empty? raise Chef::Exceptions::ConfigurationError, - "Chef::Config[:data_collector][:output_loations] is empty. Please supply an hash of valid URLs and / or local file paths." + "Chef::Config[:data_collector][:output_locations] is empty. Please supply an hash of valid URLs and / or local file paths." end data_collector_output_locations.each do |type, locations| |