summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/fqdn_rotate.rb
AgeCommit message (Collapse)Author
2015-05-26fqdn_rotate: reset srand seed correctly on old ruby versionsDavid Schmitt
Without this, the global seed is reseeded on every use of fqdn_rotate, which is a waste. Older rubies might even use a time-base seed which adversly impacts the quality of the RNG.
2015-02-12(MODULES-1738) Don't modify global seed in fqdn_rotate()Eli Young
As per puppetlabs/puppet@292233c, this leaves the global seed in a deterministic state, which is bad. Puppet::Util.deterministic_rand() exists to avoid running into this issue, but is only present starting in Puppet 3.2.0.
2014-09-22(MODULES-707) chomp() fails because generate() no longer returns a stringMark Chappell
We need to use unless value.is_a?(String) || value.is_a?(Array) rather than klass = value.class unless [String, Array].include?(klass) because the klass version enforces type checking which is too strict, and does not allow us to accept objects wich have extended String (or Array). For example, generate() function now returns Puppet::Util::Execution::ProcessOutput which is just a very simple extension of String. While this in it's self was not intentional (PUP-2306) it is not unreasonable to cope with objects which extend Strings
2012-03-18(#13205) Rotate array/string randomley based on fqdn, fqdn_rotate()Steve Traylen