lib/puppet-check/data_parser.rb in puppet-check-2.0.1 vs lib/puppet-check/data_parser.rb in puppet-check-2.1.0
- old
+ new
@@ -1,6 +1,6 @@
-require_relative '../puppet-check'
+require_relative '../puppet_check'
# executes diagnostics on data files
class DataParser
# checks yaml (.yaml/.yml)
def self.yaml(files)
@@ -203,11 +203,10 @@
def self.hiera(data, file)
private_class_method :method
warnings = []
# disregard nil/undef value data check if default values (common)
- unless file =~ /^common/
- # unless /^common/.match?(file) TODO: use when ruby >= 2.4
+ unless /^common/.match?(file)
data.each do |key, value|
# check for nil values in the data (nil keys are fine)
if (value.is_a?(Hash) && value.values.any?(&:nil?)) || value.nil?
warnings.push("Value(s) missing in key '#{key}'.")
end