lib/kafo/kafo_configure.rb in kafo-0.9.6 vs lib/kafo/kafo_configure.rb in kafo-0.9.7
- old
+ new
@@ -195,10 +195,14 @@
rescue KafoParsers::ModuleName => e
puts e
self.class.exit(:unknown_module)
end
+ def enabled_params
+ params.select { |p| p.module.enabled? }
+ end
+
def reset_params_cache
@params = nil
params
end
@@ -389,10 +393,10 @@
config.store(data, file)
end
def validate_all(logging = true)
logger.info 'Running validation checks'
- results = params.map do |param|
+ results = enabled_params.map do |param|
result = param.valid?
errors = param.validation_errors.join(', ')
progress_log(:error, "Parameter #{with_prefix(param)} invalid: #{errors}") if logging && !result
result
end