[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

Template:
QA Contact: Kurt Wall

 Description   

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.



 Comments   
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 Thu Nov 14 10:51:29 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.