summaryrefslogtreecommitdiff
path: root/types
AgeCommit message (Collapse)Author
2017-09-20Allow root as valid UNIX pathDaniel Kröger
Since the purpose of this validation type is to check if the given parameter is a valid UNIX path it should also cover the root path "slash" since it might be possible that it is specified as a target directory.
2017-07-15add type for MAC addressTim Meusel
2017-03-15Permit double slash in absolute/Unix path typesDominic Cleal
2017-03-03(MODULES-4485) Improve ipv6 support for typePeter Souter
* Improves regex to catch some valid (but less known) ipv6 strings, mostly those which are a mix of ipv6 strings and embedded ipv4 numbers * Regex inspired by the following: * https://github.com/sindresorhus/ip-regex * https://gist.github.com/cpetschnig/294476 * The original Dartware forum thread where someone originally created this beast of a regex, now lost except to archive.org * Whilst we're here, we can add the more tricky ipv6 strings to the existing functions to validate * Luckily, the `ipaddr` native ruby library used in the original functions already supports these
2017-01-13Addition of compat hash type for deprecationHelen Campbell
2016-10-26Remove leading spacesChris Clonch
This corrects puppet-linting error.
2016-10-25(MODULES-3980) Fix ipv4 regex validatorDavid Schmitt
This also updates all ipv4 tests to use the same test data for better comparability. Closes #676, #679 Fix-Originally-By: Nate Potter <nathaniel.potter@intel.com>
2016-10-07Addition of several new typesHelen Campbell
2016-10-04Permit undef passed as `nil` to validate_stringDominic Cleal
When validate_string is called via the Puppet 4 deprecation wrappers from deprecation_gen (introduced in 970852d), `undef` is passed as `nil` where it was previously passed as `''` from the Puppet 3-style function API. This change explicitly permits a `nil` value in validate_string, and adds a test case to `is_string` which also accepts the same. Fixes test failures in apt, concat etc: Error while evaluating a Function Call, nil is not a string. It looks to be a NilClass at apt/manifests/source.pp:23:3 [..] # ./spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_string.rb:34:in `block (2 levels) in <module:Functions>' # ./spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_string.rb:32:in `each' # ./spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_string.rb:32:in `block in <module:Functions>' # puppet-4.7.0/lib/puppet/parser/functions.rb:174:in `block (2 levels) in newfunction' # puppet-4.7.0/lib/puppet/util/profiler/around_profiler.rb:58:in `profile' # puppet-4.7.0/lib/puppet/util/profiler.rb:51:in `profile' # puppet-4.7.0/lib/puppet/parser/functions.rb:167:in `block in newfunction' # ./spec/fixtures/modules/stdlib/lib/puppet_x/puppetlabs/stdlib/deprecation_gen.rb:13:in `block (2 levels) in deprecation_gen'
2016-08-17Deprecation of ip functionsHelen Campbell
2016-08-08(modules-3532) deprecate string type checkstphoney
2016-08-08(modules-3533) deprecation for 3.x number functiontphoney