summaryrefslogtreecommitdiffstats
path: root/lib/facter/util/collection.rb
Commit message (Collapse)AuthorAgeFilesLines
* (#7670) Never fail to find a fact that is presentNick Lewis2011-05-311-1/+5
| | | | | | | | | | | | | | | | | | | | | With the previous behavior, any fact which depended on another fact in a file not matching its name would fail to properly load the required fact, resulting in missing, incorrect, or inconsistent values. For instance, the operatingsystem fact depends on the lsbdistid fact found in lsb.rb. The first time the operatingsystem fact is requested, it requires lsb.rb, and so the required fact is loaded first. But if Facter is subsequently cleared and the operatingsystem fact requested again, the require will not occur, and the fact will not be automatically loaded because it doesn't match its filename. Now if a fact is requested and can't be found, we will attempt to load all the facts to find it. Such an approach appears heavy-handed, but in the case where we want a particular fact, this is the only way to make sure we've found it. In the case where we eventually want other facts, we are conveniently eagerly loading them. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
* Refactored so each fact resolution can specify a separate timeout,Luke Kanies2008-06-171-2/+26
| | | | | | but the default is still 0.5. Set the timeout on the AIX kernelrelease fact to 5 seconds.
* Retrieval of fact values now autoloads facts.Luke Kanies2008-05-161-1/+1
| | | | | I was only autoloading in certain circumstances, but it now autoloads any time you try to load a fact directly.
* Switching Facter to using the new loader.Luke Kanies2008-05-151-1/+19
| | | | | This should make it possible to move all facts to separate files and only load them on demand.
* Moving all of the support classes to util/.Luke Kanies2008-05-151-0/+84
This makes it easier for our loader to distinguish between code that Facter uses and new facts.