lib/bolt/config.rb in bolt-2.36.0 vs lib/bolt/config.rb in bolt-2.37.0
- old
+ new
@@ -214,12 +214,12 @@
def self.load_bolt_yaml(dir)
filepath = dir + BOLT_CONFIG_NAME
data = Bolt::Util.read_yaml_hash(filepath, 'config')
logs = [{ debug: "Loaded configuration from #{filepath}" }]
deprecations = [{ type: 'Using bolt.yaml for system configuration',
- msg: "Configuration file #{filepath} is deprecated and will be removed in a future version "\
- "of Bolt. Use '#{dir + BOLT_DEFAULTS_NAME}' instead." }]
+ msg: "Configuration file #{filepath} is deprecated and will be removed in Bolt 3.0. "\
+ "See https://pup.pt/update-bolt-config for how to update to the latest Bolt practices." }]
# Validate the config against the schema. This will raise a single error
# with all validation errors.
Validator.new.tap do |validator|
validator.validate(data, bolt_schema, filepath)
@@ -446,14 +446,22 @@
if (v = acc[name][:level])
unless v.is_a?(String) || v.is_a?(Symbol)
raise Bolt::ValidationError,
"level of log #{name} must be a String or Symbol, received #{v.class} #{v.inspect}"
end
+
unless Bolt::Logger.valid_level?(v)
raise Bolt::ValidationError,
"level of log #{name} must be one of #{Bolt::Logger.levels.join(', ')}; received #{v}"
end
+
+ if v == 'notice'
+ @deprecations << {
+ type: 'notice log level',
+ msg: "Log level 'notice' is deprecated and will be removed in Bolt 3.0. Use 'info' instead."
+ }
+ end
end
if (v = acc[name][:append]) && v != true && v != false
raise Bolt::ValidationError,
"append flag of log #{name} must be a Boolean, received #{v.class} #{v.inspect}"
@@ -517,9 +525,13 @@
end
end
def modulepath=(value)
@data['modulepath'] = value
+ end
+
+ def plugin_cache
+ @project.plugin_cache || @data['plugin-cache'] || {}
end
def concurrency
@data['concurrency']
end