lib/hieracles/node.rb in hieracles-0.0.6 vs lib/hieracles/node.rb in hieracles-0.1.0

- old
+ new

@@ -28,26 +28,26 @@ def files(without_common = true) @hiera.hierarchy.reduce([]) do |a, f| file = format("#{f}.yaml", @hiera_params) rescue nil if file && - File.exist?(File.join(@hiera.datadir, file)) && + File.exist?(File.join(@hiera.datapath, file)) && (!without_common || !file[/common/]) - a << file + a << File.join(@hiera.datadir, file) end a end end def paths(without_common = true) - files(without_common).map { |p| File.join(@hiera.datadir, p) } + files(without_common).map { |p| File.join(Config.basepath, p) } end def params(without_common = true) params = {} files(without_common).each do |f| - data = YAML.load_file(File.join(@hiera.datadir, f)) + data = YAML.load_file(File.join(Config.basepath, f)) s = to_shallow_hash(data) s.each do |k,v| params[k] ||= [] params[k] << { value: v, file: f} end