Module: ChefConfig::Mixin::DotD

Included in:
WorkstationConfigLoader
Defined in:
lib/chef-config/mixin/dot_d.rb

Instance Method Summary collapse

Instance Method Details

#load_dot_d(path) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/chef-config/mixin/dot_d.rb', line 22

def load_dot_d(path)
  dot_d_files =
    begin
      entries = Array.new
      entries << Dir.glob(File.join(
        ChefConfig::PathHelper.escape_glob_dir(path), "*.rb"))
      entries.flatten.select do |entry|
        File.file?(entry)
      end
    end
  dot_d_files.sort.map do |conf|
    apply_config(IO.read(conf), conf)
  end
end