summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2015-06-01Convert tests to use plain rspec-puppetDavid Schmitt
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
2015-05-29simplify mac address regexIgor Galić
let the computer do the counting and repetition and case
2015-05-29Merge pull request #463 from CENGN/fix/master/file_line_multiple_afterDavid Schmitt
(MODULES-2071) Patch file_line provider to use multiple with after
2015-05-29 (MODULES-2071) Refactor file_line provider to contain logic to handle ↵Raymond Maika
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.
2015-05-27validate_integer, validate_numeric: explicitely reject hashes in arraysDavid Schmitt
Without this patch, Ruby 1.8's Hash#to_s behaviour causes [{1=>2}] to be treated as "12" when validating values.
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-05-11(FM-2130) Document new location of facts.d cacheEli Young
2015-05-06range(): fix TypeError(can't convert nil into Integer) when using range syntaxDavid Schmitt
2015-05-06Merge pull request #447 from elyscape/fix_rangeDavid Schmitt
Restore removed functionality to range()
2015-05-05range: Clean up and clarify function contentsEli Young
2015-05-05Revert "range: remove dead code"Eli Young
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
2015-05-05pw_hash: Fix functionality on JRuby < 1.7.17Eli Young
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
2015-05-05validate_augeas: fix URL to docsDavid Schmitt
2015-05-05range: remove dead codeDavid Schmitt
Since a ParseError is always thrown for zero arguments, the if and all dependent code can be removed.
2015-05-05pw_hash: avoid ruby magic when running on javaDavid Schmitt
2015-04-17fqdn_rand_string: fix argument error messageDavid Schmitt
2015-04-16Merge pull request #314 from amateo/feature/loadyaml_check_fileMorgan Haskel
Check if file exists before loading with loadyaml. If not, return nil
2015-04-09Merge pull request #431 from bmjen/file-line-refactorMorgan Haskel
File_line checks provided after param if no match is found
2015-04-09Add spec tests and pulled in PR #427Travis Fields
Changed append line to open in 'w' mode and have to rewrite lines in order to append new line
2015-04-09file_line honors after if match not found.Bryan Jen
2015-04-09Clarifying behaviour of attributes and adding an extra example.Gerrard Geldenhuis
2015-04-09Merge pull request #405 from elyscape/feature/fqdn_rand_stringsHunter Haugen
(MODULES-1715) Add FQDN-based random string generator
2015-04-05(MODULES-1737) Add pw_hash() functionEli Young
2015-03-31(MODULES-1715) Add fqdn_rand string generatorsEli Young
2015-03-05If present, top-level domain must be alphabeticRod Montgomery
See RFC 1123, Section 2.1 http://tools.ietf.org/html/rfc1123#section-2
2015-03-05Merge pull request #422 from cyberious/assert_privateTP Honey
Assert private
2015-03-05Add private function back and forward to assert_private with deprecation warningTravis Fields
2015-03-05Merge pull request #369 from rfugina/dirname_typecheckHunter Haugen
Dirname typecheck
2015-03-05Rename private() to assert_private()Franz Pletz
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.
2015-03-05Merge pull request #375 from ↵Hunter Haugen
poikilotherm/feature/master/validate_integer_and_numeric (MODULES-560) Add new functions validate_numeric() and validate_integer().
2015-03-03Add support for hashes in the prefix functionStefan Goethals
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2015-03-03URI.escape for the array case was incorrect.Bryon Roché
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.
2015-03-03Merge pull request #407 from adamcrews/ceiling_functionMorgan Haskel
Add a ceiling function to complement the floor function.
2015-03-02Loosen the restrictions of upcase and allow for recursion of the objects and ↵Travis Fields
only worry if the object responds to upcase
2015-02-26Fix issue with Ruby 1.8.7 which did not allow for the return in an each_pair ↵Travis Fields
of the hash
2015-02-25Add Hash to upcaseTravis Fields
2015-02-19Check for string before copyingMorgan Haskel
2015-02-14(MODULES-1771) Don't modify input to is_domain_name()Sean Millichamp
Fix is_domain_name() so it dup's its incoming argument to avoid changing the original with a later chomp!
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.
2015-02-01Add a ceiling function to complement the floor function.Adam Crews
2015-01-13FM-2130 Move cache file to non temp directoryTravis Fields
2015-01-07(MODULES-1473) Deprecate type() function for new parserHunter Haugen
The `type()` function will cease to work on the new parser because 'type' is a reserved keyword. The `type3x()` function may be used to continue similar functionality, but will be deprecated in favor of the built-in typing system. The `type_of()` function has been included to introspect types in the new parser.
2015-01-02Merge pull request #336 from mklette/masterTravis Fields
ensure_resource: be more verbose in debug mode
2014-12-19Update docs to reflect new behavior of delete function taking array in ↵Travis Fields
second argument
2014-12-19MODULES-1606 add ability to pass array to delete for items to deleteTravis Fields
2014-12-18Merge pull request #388 from mhaskel/merge_4.5.x_into_masterHunter Haugen
Merge 4.5.x into master
2014-12-18(MODULES-1582) Improve % detectionPeter Souter
Avoids any validate commands that have %'s in them other than "... % ..."
2014-12-18(MODULES-1582) Initial spike for % placeholderPeter Souter
This simply `gsub`'s the file path into where the % placeholder is.
2014-12-17Merge pull request #372 from ↵Morgan Haskel
poikilotherm/feature/master/validate_absolute_path_allow_arrays Allow array of pathes in validate_absolute_path
2014-12-17Merge pull request #368 from rfugina/basenameMorgan Haskel
Basename implementation