[FACT-766] Facter::Util::DirectoryLoader should have configurable weight Created: 2014/12/08  Updated: 2015/01/22  Resolved: 2014/12/29

Status: Closed
Project: Facter
Component/s: Community
Affects Version/s: FACT 2.2.0
Fix Version/s: FACT 2.4.0

Type: Improvement Priority: Normal
Reporter: David Goodlad Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: trivial
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

QA Contact: Kurt Wall


The Facter::Util::DirectoryLoader class has a constant, EXTERNAL_FACT_WEIGHT, used to assign a weight to all facts loaded using that class.

When someone extends that class, they may want to assign a different weight. Instead of using a constant, which cannot be overridden in instances or even subclasses, the weight should be an optional parameter given to the initializer.

See https://github.com/boxen/puppet-boxen/pull/116 for a specific use case.

Comment by David Goodlad [ 2014/12/08 ]

Added a PR to implement this

Comment by Kurt Wall [ 2014/12/29 ]

The spec and unit tests appear to cover these case. Resolving.

Comment by Kurt Wall [ 2014/12/29 ]

Passed CI and covered by new spec test.

Comment by William Hopper [ 2015/01/22 ]

Released in Facter 2.4.0.

Generated at Mon Sep 28 06:17:18 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.