Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
The documentation example shows an incorrect response when using the
function, this PR corrects the example to agree with what the function
actually does.
|
|
Add validate_slength's optional 3rd arg to README
|
|
|
|
facter (2.x) only provides facts without interface suffix for
* ipaddress
* netmask
'macaddress' and 'network' facts will always have the related interface
name appended. in turns lookupvar throws errors when strict_variables is
enabled.
|
|
|
|
The time() function takes an argument of a timezone, and always returns
time in epoch format. The epoch format is the number of seconds that
have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
seconds. This means that it is universally the same regardless of
timezones.
I don't know what the timezone argument is supposed to do, and it is not
documented. So lets just make 1.8.7 work like > 1.8.7
|
|
|
|
Previously, the random number generator was seeded with the array or
string to be rotated in addition to any values specifically provided for
seeding. This behavior is potentially insecure in that it allows an
attacker who can modify the source data to choose the post-shuffle
order.
|
|
Tests in the new style produces the following documentation output:
abs
should not eq nil
should run abs() and raise an Puppet::ParseError
should run abs(-34) and return 34
should run abs("-34") and return 34
should run abs(34) and return 34
should run abs("34") and return 34
|
|
let the computer do the counting and repetition and case
|
|
(MODULES-2071) Patch file_line provider to use multiple with after
|
|
parameter multiple in function handle_create_with_after
Without this, file_line resource without the `match` parameter but with the `after` param will throw an error if there are multiple matches for the after expression. This patch creates the handling for the `multiple` parameter in handle_create_with_after. This allows you to add a line after the `after` expression if it appears at multiple points in a file.
Updated reference to `file_line` in the README to reflect that the multiple parameter can be set when using `after` and/or `match` as the matching regex.
|
|
Without this patch, Ruby 1.8's Hash#to_s behaviour causes [{1=>2}] to be
treated as "12" when validating values.
|
|
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.
|
|
|
|
|
|
Restore removed functionality to range()
|
|
|
|
This reverts commit 063c58a992c1b5441b7e7b2a2e4886531035bb25, which
actually removed non-dead code. Specifically, it removed the ability to
make calls such as `range('2..3')`, `range('2...3')`, and
`range('2-3')`.
cf. https://github.com/puppetlabs/puppetlabs-stdlib/pull/443#commitcomment-11055565
|
|
The previous change to this function broke it on JRuby before 1.7.17 by
attempting to use a variable that wasn't defined (`salt`). To fix this,
define `salt` ahead of time and use that instead of building the salt
later.
cf. https://github.com/puppetlabs/puppetlabs-stdlib/pull/443#discussion_r29718588
|
|
|
|
Since a ParseError is always thrown for zero arguments, the if and all
dependent code can be removed.
|
|
|
|
|
|
Check if file exists before loading with loadyaml. If not, return nil
|
|
File_line checks provided after param if no match is found
|
|
Changed append line to open in 'w' mode and have to rewrite lines in order to append new line
|
|
|
|
|
|
(MODULES-1715) Add FQDN-based random string generator
|
|
|
|
|
|
See RFC 1123, Section 2.1
http://tools.ietf.org/html/rfc1123#section-2
|
|
Assert private
|
|
|
|
Dirname typecheck
|
|
As mentioned in #270, private is a reserved keyword in the future parser
which is to be released with Puppet 4. As it stands, this function is
not useable with the future parser so it needs to renamed.
This is a breaking change.
|
|
poikilotherm/feature/master/validate_integer_and_numeric
(MODULES-560) Add new functions validate_numeric() and validate_integer().
|
|
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
|
|
The previous commit to uriescape() changed the implementation to use the ruby default escape list for URI.escape(), but did not change the call triggered when uriescape() was called on an array, triggering ruby errors.
|
|
Add a ceiling function to complement the floor function.
|
|
only worry if the object responds to upcase
|
|
of the hash
|
|
|
|
|
|
Fix is_domain_name() so it dup's its incoming argument
to avoid changing the original with a later chomp!
|
|
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.
|