Age | Commit message (Collapse) | Author |
|
|
|
(MODULES-905) Narrow the confinement in bool2str
|
|
The extended spec tests validate that the common types of values
that could be passed to bool2str() are rejected.
|
|
Previously, bool2str() accepted a broad array of boolean values and
bare strings, without any attempt to validate that the strings in any
way resembled "true" or "false" (or any of the other values bool2num()
accepts). This commit narrows the input confinement to TrueClass and
FalseClass, which means that bool2str() will only interpolate
strict boolean values now.
|
|
Revert "Merge pull request #256 from stbenjam/2571-before"
|
|
This reverts commit 8499ebdb7f892f2623295058649c67a5553d4732, reversing
changes made to 08b00d9229961d7b3c3cba997bfb35c8d47e4c4b.
|
|
(MODULES-905) Add bool2str() and camelcase() for string manipulation
|
|
|
|
(PUP-2571) add 'before' functionality to file_line
|
|
|
|
file_line supports adding lines after a match, but there are use cases when
having "before" would be useful. For example, in Debian-based OS's, the last
line of /etc/rc.local is "exit 0" it's an incredible pain to deal with
that scenario today.
This commit adds a 'before' parameter to the file_line type, and implements
it for the ruby provider.
|
|
|
|
Python likes to have its constants Capitalized, and the capitalize
function only understands strings... so I shave a yak.
bool2str will convert a boolean to its equivalent string value,
and camelcase extends on uppercase & downcase to convert an underscore
delimited string into a camelcased string.
|
|
Prepare a 4.2.1 release.
|
|
|
|
Release - 4.2.0
|
|
Summary
========
This release adds many new functions and fixes, and continues to be backwards compatible with stdlib 3.x
Features
-------
- New `base64()` function
- New `deep_merge()` function
- New `delete_undef_values()` function
- New `delete_values()` function
- New `difference()` function
- New `intersection()` function
- New `is_bool()` function
- New `pick_default()` function
- New `union()` function
- New `validate_ipv4_address` function
- New `validate_ipv6_address` function
- Update `ensure_packages()` to take an option hash as a second parameter.
- Update `range()` to take an optional third argument for range step
- Update `validate_slength()` to take an optional third argument for minimum length
- Update `file_line` resource to take `after` and `multiple` attributes
Bugfixes
--------
- Correct `is_string`, `is_domain_name`, `is_array`, `is_float`, and `is_function_available` for parsing odd types such as bools and hashes.
- Allow facts.d facts to contain `=` in the value
- Fix `root_home` fact on darwin systems
- Fix `concat()` to work with a second non-array argument
- Fix `floor()` to work with integer strings
- Fix `is_integer()` to return true if passed integer strings
- Fix `is_numeric()` to return true if passed integer strings
- Fix `merge()` to work with empty strings
- Fix `pick()` to raise the correct error type
- Fix `uriescape()` to use the default URI.escape list
- Add/update unit & acceptance tests.
|
|
Fix the stdlib functions that fail tests
|
|
|
|
Move unit tests to spec/functions
|
|
rspec-puppet matchers are defined for tests which exist in
spec/functions, but the function unit tests lived in
spec/unit/puppet/parser/functions. This moves them to the correct place
for using rspec-puppet
|
|
Adding more spec coverage
|
|
|
|
|
|
|
|
Add the missing shebangs and fix the wrong ones
|
|
complaining loudly
|
|
Update build_csv to understand contexts
|
|
|
|
Fix the validate_augeas beaker tests
|
|
|
|
Add more specs
|
|
|
|
Add beaker tests for functions.
|
|
Allow concat to take non-array second parameters
|
|
(MODULES-603) Add defaults arguments to ensure_packages()
|
|
Adjust the regular expression for facts.
|
|
Previously this was incorrectly handling facts that were of the form
foo=1+1=2 due to the ='s in the actual fact contents. Fix this and
add tests to try and prevent regressions.
|
|
(maint) Remove facter versions test
|
|
This test attempts to emulate various versions of facter, but is
still dependent on the version of facter it is running against. The
immediate symptom was that the test breaks with facter 2.0.1 because
it adds another external facts search directory.
I tried a couple ways to stub this but allowing it to pretend
to run against one set of facters, while actually running against
one real facter (which might itself be one of several versions)
eluded me.
So this patch just removes the test.
|
|
|
|
|
|
|
|
|
|
|
|
Without this patch one can not specify package resource specific
parameters. All the ensure_packages() function does it makes sure
the named packages are installed. This patch allows one to pass
default as a second argument and allow greater flexibility on
packages installations.
Use case like the following are now possible :
* ensure_packages(['r10k', 'serverspec'], {'provider' => 'gem'})
* ensure_packages(['ntp'], {'require' => 'Exec[foobar]'})
|
|
Update README.markdown
|
|
Add code block for validate_slength.
|
|
|
|
|