Age | Commit message (Collapse) | Author |
|
Without this patch the basic smoke test in the module tests/ directory
did not math up with the renamed whole_line => file_line resource type.
This patch updates the smoke test file to match the most recently
selected name of file_line. The filename has been changed, comments
added to the smoke test file, and resource declarations inside the file
changed.
|
|
It was decided that maintaining puppetlabs-functions and
puppetlabs-stdlib was duplication as both are trying to
achieve the same goal.
This patch provides a merge of the puppetlabs-functions
into the puppetlabs-stdlib repository, with history
preservation.
The following conflicts were found and resolved:
* LICENSE file from functions was used as it aligns with
ASL usage instructions and contains relevant copyright
information:
http://www.apache.org/licenses/LICENSE-2.0.html
* Used spec_helper.rb from functions - this is what
Puppet core uses and doesn't break tests.
* Merged .gitignore and spec.opts options.
|
|
* Re-arranged tests in line with puppetlabs-stdlib
|
|
* Renamed load_yaml & load_json to parseyaml & parsejson
* Renamed is_valid_* functions and remove the 'valid_'
|
|
Without this patch the resource whole_line would be included in the
stable stdlib module shipping in PE 1.2. Ideally the name will be
stable and unchanging in the future.
There was quite a bit of concern over whole_line being an unwise name.
file_line appears to be the most suitable name and least likely to need
another rename in the future.
|
|
|
|
* refactor/master/8665_whole_line:
(#8665) Change type from append_line to whole_line
|
|
|
|
* ticket/master/8678_validate_array_string:
(#8678) Add validate_array and validate_string functions
|
|
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
|
|
* ticket/master/8717_merge_function_ruby_185:
(#8717) Make merge() function work with Ruby 1.8.5
|
|
The previous behavior of the merge() function used Array#inject with two
arguments. Ruby 1.8.5 only supports inject being used with one
argument.
This change initializes and empty Hash object and merges each argument
into the accumulator. The last argument still "wins" in the merge.
rspec tests (cd spec; rspec **/*_spec.rb) verified as passing with this
change.
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
own.
|
|
function on its own.
|
|
|
|
|
|
|
|
|
|
Changed the type name from append_line to
whole_line.
After feedback that having a type with a verb in
the name was confusing.
|
|
* ticket/master/8585_load_yaml_function:
(#8575) Add loadyaml() function
|
|
This change adds a loadyaml() puppet function that takes a path to a
YAML data file and returns the contents as a Puppet variable. There is
currently no validation of the contents of the file.
This commit is intentionally lacking unit tests because of time
constraints.
Reviewed-by: Dan Bode
|
|
|
|
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
|
|
|
|
as well)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|