lib/bolt/config.rb in bolt-3.5.0 vs lib/bolt/config.rb in bolt-3.6.0

- old
+ new

@@ -167,10 +167,11 @@ @project = project @transports = {} @config_files = [] default_data = { + 'analytics' => true, 'apply-settings' => {}, 'color' => true, 'compile-concurrency' => Etc.nprocessors, 'concurrency' => default_concurrency, 'disable-warnings' => [], @@ -261,10 +262,12 @@ when 'apply-settings', 'log', 'plugin-hooks', 'puppetdb' val1.merge(val2) # Disabled warnings are concatenated when 'disable-warnings' val1.concat(val2) + when 'analytics' + val1 && val2 # All other values are overwritten else val2 end end @@ -326,17 +329,10 @@ acc[name] = val.slice('append', 'level').transform_keys(&:to_sym) end end def validate - if @data['future'] - Bolt::Logger.warn( - "future_option", - "Configuration option 'future' no longer exposes future behavior." - ) - end - if @data['modulepath']&.include?(@project.managed_moduledir.to_s) raise Bolt::ValidationError, "Found invalid path in modulepath: #{@project.managed_moduledir}. This path "\ "is automatically appended to the modulepath and cannot be configured." end @@ -393,10 +389,14 @@ def format=(value) @data['format'] = value end + def future + @data['future'] + end + def trace @data['trace'] end def log @@ -455,9 +455,13 @@ @project.module_install || @data['module-install'] end def disable_warnings Set.new(@project.disable_warnings + @data['disable-warnings']) + end + + def analytics + @data['analytics'] end # Check if there is a case-insensitive match to the path def check_path_case(type, paths) return if paths.nil?