# File lib/puppet/indirector/facts/facter.rb, line 21 21: def self.load_facts_in_dir(dir) 22: return unless FileTest.directory?(dir) 23: 24: Dir.chdir(dir) do 25: Dir.glob("*.rb").each do |file| 26: fqfile = ::File.join(dir, file) 27: begin 28: Puppet.info "Loading facts in %s" % [::File.basename(file.sub(".rb",''))] 29: Timeout::timeout(self.timeout) do 30: load file 31: end 32: rescue Exception => detail 33: Puppet.warning "Could not load fact file %s: %s" % [fqfile, detail] 34: end 35: end 36: end 37: end