Age | Commit message (Collapse) | Author |
|
* refactor/master/8665_whole_line:
(#8665) Change type from append_line to whole_line
|
|
The accounts module is making use of validate_array() and
validate_string() which do not exist int he stdlib module without this
patch.
This patch adds the two functions to the stdlib with unit tests.
Reviewed-by: Dan Bode
|
|
In Puppet, it is not possible to reassign hash
values.
This function allows a reasonable way to perform
hash munging in Puppet.
Reviewed-by: Jeff McCune
|
|
It is difficult to use existance of keys in a hash
as a boolean condition in Puppet (see #8705)
This function provides a working solution until
the underlying issue in Puppet can be resolved.
Reviewed-by: Jeff McCune
|
|
Changed the type name from append_line to
whole_line.
After feedback that having a type with a verb in
the name was confusing.
|
|
This commit adds a native type that can check if
a line exists and append it to a file.
This use case seems common enough to warrant its
inclusion into stdlib.
Reviewed-by: Jeff McCune
|
|
These tests run through a number of example cases and exercise the
behavior of the validate_hash function.
To run, simple execute rspec validate_hash_spec.rb
|
|
This isn't directly related to #8010, but rather indirectly fills the
need to allow the end user to configure where data values are looked up.
This allows the namespace to be passed as a class parameter. A module
may then quickly and easily look up data from the user-defined
namespace.
|
|
Unlike the whit type the anchor type derives from, we are not hacking
the stringify method. We expect the resource to be named simply
Anchor[foo::bar] where the name is "foo::bar".
|
|
|
|
This is an interesting spec test for module developers.
It illustrates how to cause Puppet to test the function
from the Puppet DSL rather than the Ruby DSL, fully
exercising the system from the perspective of the end
user.
(Note how Puppet[:code] is set, then the scope reset, then
the compile method called.)
Paired-with: Dan Bode <dan@puppetlabs.com>
|