Age | Commit message (Collapse) | Author |
|
|
|
|
|
Maintain the old behavior in the case where the optional second
parameter isn't passed. Also, adding arity is backwards incompatible since
stdlib still supports 2.7, so remove that.
|
|
(MODULES-2561) add is_a function
|
|
[MODULES-2462] Improve parseyaml function
|
|
The data type system is very hard to understand. Many people don't
understand why
type_of([1,2,3]) == Array
will fail, but
type_of([1,2,3]) <= Array
passes. This does a simpler validation that doesn't rely on explicit
data types. Instead, use
$foo = [1,2,3]
if $foo.is_a(Array) {
notify { 'This is an array': }
}
This is based on code by Ben Ford <ben.ford@puppetlabs.com>.
* Added acceptance tests
* Added dispatch
* Improved unit tests
* Added docs to README
|
|
|
|
Add a new function "try_get_value"
|
|
* Extracts a value from a deeply-nested data structure
* Returns default if a value could not be extracted
|
|
* Add default value support
Second argument will be returned if yaml cannot be parsed
instead of false value
* Update tests
|
|
Add spec tests to test the new functionality:
*Case for 3 arrays.
*Case for 4 arrays.
Modify README to note new functionality.
This is for issue MODULE-2456, follow the precedent of MODULE-444.
This change allows union to be much more useful, unioning many arrays
in one line rather than in n lines. Additionally, as this is only added
functionality, and does not affect the 2 array case that all modules
currently using array are using, it should not affect any existing
modules utilizing union.
This is now useful, for example, for merging many arrays of resources
(eg: packages.) to generate just one list with no duplicates, to avoid
duplicate resource declarations.
|
|
|
|
|
|
This only duplicates what's already being tested in ensure_packages_spec.rb
but doesn't work on all our supported platforms.
|
|
|
|
|
|
|
|
|
|
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
|
|
This fixes the acceptance tests by:
- Ensuring the fqdn_rand_string spec is passed undef as the second
parameter so that the seed is not used as the charset
- Ensuring the pw_hash spec is passed the key specifying the type of
hash, rather than the value that will be used to generate the
password
- Expecting puppet to report nil instead of empty string for undef
passwords
- Removing the fqdn_rand_base64 test because there is no such function
|
|
unsupported_platforms is not a valid identifier, and trying to use it
causes acceptance tests to error out before running any tests. The
correct identifier for the unsupported platforms constants is
UNSUPPORTED_PLATFORMS.
|
|
(MODULES-1715) Add FQDN-based random string generator
|
|
|
|
|
|
|
|
The existence of this directory is behavior for each test, but will also
stop rspec 3 from complaining.
|
|
|
|
Acceptance test to take multiple arrays for concatenation
|
|
`concat` should be able to concat arrays and primitives
|
|
Update to fix ensure_resource as well
|
|
It should NOT run if the future parser is enabled
|
|
|
|
4.3.x
|
|
MODULES-1413 Add ability for member to take numeric objects
|
|
|
|
Conflicts:
spec/acceptance/ensure_packages_spec.rb
spec/acceptance/ensure_resource_spec.rb
|
|
Conflicts:
spec/acceptance/ensure_packages_spec.rb
spec/acceptance/ensure_resource_spec.rb
|
|
|
|
3.7, previous version throw different exception. Wrapping in generic Exception catch all
|
|
|
|
ruby and gem are not on the install path
|
|
|
|
that it was dealing with a string
|
|
|
|
These functions take advantage of IP fact information and AIX does not
appear to support dynamic interface detection in facter.
|
|
|
|
|
|
|
|
|