summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md96
-rw-r--r--README.md36
-rw-r--r--spec/functions/ensure_resources_spec.rb (renamed from spec/unit/ensure_resources_spec.rb)0
-rwxr-xr-xspec/unit/puppet/provider/file_line/ruby_spec.rb3
4 files changed, 68 insertions, 67 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4930a9c..4b3a5a9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -57,7 +57,7 @@ This release introduces multiple new functions, a new fact and the addition of U
- Addition of FQDN UUID generation function.
- Addition of Ubuntu Xenial to OS Support.
-####Bugfixes
+#### Bugfixes
- Ensure_packages now works with Ruby < 2.0.
- Updated the documentation of str2bool function.
@@ -143,11 +143,11 @@ Special thanks to [Voxpupuli's](https://voxpupuli.org/) Igor Galić for donating
* Puppet 4.5.0 (PE 2016.2) has a number of improvements around data types - especially error handling - that make working with them much nicer.
## Supported Release 4.12.0
-###Summary
+### Summary
This release provides several new functions, bugfixes, modulesync changes, and some documentation updates.
-####Features
+#### Features
- Adds `clamp`. This function keeps values within a specified range.
- Adds `validate_x509_rsa_key_pair`. This function validates an x509 RSA certificate and key pair.
- Adds `dig`. This function performs a deep lookup in nested hashes or arrays.
@@ -159,7 +159,7 @@ This release provides several new functions, bugfixes, modulesync changes, and s
- Apply modulesync changes.
- Add validate_email_address function.
-####Bugfixes
+#### Bugfixes
- Fixes `fqdn_rand_string` tests, since Puppet 4.4.0 and later have a higher `fqdn_rand` ceiling.
- (MODULES-3152) Adds a check to `package_provider` to prevent failures if Gem is not installed.
- Fixes to README.md.
@@ -168,39 +168,39 @@ This release provides several new functions, bugfixes, modulesync changes, and s
- Fixes concat with Hash arguments.
## Supported Release 4.11.0
-###Summary
+### Summary
Provides a validate_absolute_paths and Debian 8 support. There is a fix to the is_package_provider fact and a test improvement.
-####Features
+#### Features
- Adds new parser called is_absolute_path
- Supports Debian 8
-####Bugfixes
+#### Bugfixes
- Allow package_provider fact to resolve on PE 3.x
-####Improvements
+#### Improvements
- ensures that the test passes independently of changes to rubygems for ensure_resource
-##2015-12-15 - Supported Release 4.10.0
-###Summary
+## 2015-12-15 - Supported Release 4.10.0
+### Summary
Includes the addition of several new functions and considerable improvements to the existing functions, tests and documentation. Includes some bug fixes which includes compatibility, test and fact issues.
-####Features
+#### Features
- Adds service_provider fact
- Adds is_a() function
- Adds package_provider fact
- Adds validate_ip_address function
- Adds seeded_rand function
-####Bugfixes
+#### Bugfixes
- Fix backwards compatibility from an improvement to the parseyaml function
- Renaming of load_module_metadata test to include _spec.rb
- Fix root_home fact on AIX 5.x, now '-c' rather than '-C'
- Fixed Gemfile to work with ruby 1.8.7
-####Improvements
+#### Improvements
- (MODULES-2462) Improvement of parseyaml function
- Improvement of str2bool function
- Improvement to readme
@@ -215,26 +215,26 @@ Includes the addition of several new functions and considerable improvements to
- Improvement to naming convention in validate_ipv4_address function
## Supported Release 4.9.1
-###Summary
+### Summary
Small release for support of newer PE versions. This increments the version of PE in the metadata.json file.
-##2015-09-08 - Supported Release 4.9.0
-###Summary
+## 2015-09-08 - Supported Release 4.9.0
+### Summary
This release adds new features including the new functions dos2unix, unix2dos, try_get_value, convert_base as well as other features and improvements.
-####Features
+#### Features
- (MODULES-2370) allow `match` parameter to influence `ensure => absent` behavior
- (MODULES-2410) Add new functions dos2unix and unix2dos
- (MODULE-2456) Modify union to accept more than two arrays
- Adds a convert_base function, which can convert numbers between bases
- Add a new function "try_get_value"
-####Bugfixes
+#### Bugfixes
- n/a
-####Improvements
+#### Improvements
- (MODULES-2478) Support root_home fact on AIX through "lsuser" command
- Acceptance test improvements
- Unit test improvements
@@ -253,15 +253,15 @@ This release adds a function for reading metadata.json from any module, and expa
- Fix various docs typos
- Fix `file_line` resource on puppet < 3.3
-##2015-06-22 - Supported Release 4.7.0
-###Summary
+## 2015-06-22 - Supported Release 4.7.0
+### Summary
Adds Solaris 12 support along with improved Puppet 4 support. There are significant test improvements, and some minor fixes.
-####Features
+#### Features
- Add support for Solaris 12
-####Bugfixes
+#### Bugfixes
- Fix for AIO Puppet 4
- Fix time for ruby 1.8.7
- Specify rspec-puppet version
@@ -271,7 +271,7 @@ Adds Solaris 12 support along with improved Puppet 4 support. There are signific
- catch and rescue from looking up non-existent facts
- Use puppet_install_helper, for Puppet 4
-####Improvements
+#### Improvements
- Enforce support for Puppet 4 testing
- fqdn_rotate/fqdn_rand_string acceptance tests and implementation
- Simplify mac address regex
@@ -282,12 +282,12 @@ Adds Solaris 12 support along with improved Puppet 4 support. There are signific
- Add validate_slength optional 3rd arg
- Move tests directory to examples directory
-##2015-04-14 - Supported Release 4.6.0
-###Summary
+## 2015-04-14 - Supported Release 4.6.0
+### Summary
Adds functions and function argument abilities, and improves compatibility with the new puppet parser
-####Features
+#### Features
- MODULES-444: `concat()` can now take more than two arrays
- `basename()` added to have Ruby File.basename functionality
- `delete()` can now take an array of items to remove
@@ -304,7 +304,7 @@ Adds functions and function argument abilities, and improves compatibility with
- Adds `validate_integer()`
- Adds `validate_numeric()` (like `validate_integer()` but also accepts floats)
-####Bugfixes
+#### Bugfixes
- Fix seeding of `fqdn_rotate()`
- `ensure_resource()` is more verbose on debug mode
- Stricter argument checking for `dirname()`
@@ -312,37 +312,37 @@ Adds functions and function argument abilities, and improves compatibility with
- Fix `uriescape()` when called with array
- Fix `file_line` resource when using the `after` attribute with `match`
-##2015-01-14 - Supported Release 4.5.1
-###Summary
+## 2015-01-14 - Supported Release 4.5.1
+### Summary
This release changes the temporary facter_dot_d cache locations outside of the /tmp directory due to a possible security vunerability. CVE-2015-1029
-####Bugfixes
+#### Bugfixes
- Facter_dot_d cache will now be stored in puppet libdir instead of tmp
-##2014-12-15 - Supported Release 4.5.0
-###Summary
+## 2014-12-15 - Supported Release 4.5.0
+### Summary
This release improves functionality of the member function and adds improved future parser support.
-####Features
+#### Features
- MODULES-1329: Update member() to allow the variable to be an array.
- Sync .travis.yml, Gemfile, Rakefile, and CONTRIBUTING.md via modulesync
-####Bugfixes
+#### Bugfixes
- Fix range() to work with numeric ranges with the future parser
- Accurately express SLES support in metadata.json (was missing 10SP4 and 12)
- Don't require `line` to match the `match` parameter
-##2014-11-10 - Supported Release 4.4.0
-###Summary
+## 2014-11-10 - Supported Release 4.4.0
+### Summary
This release has an overhauled readme, new private manifest function, and fixes many future parser bugs.
-####Features
+#### Features
- All new shiny README
- New `private()` function for making private manifests (yay!)
-####Bugfixes
+#### Bugfixes
- Code reuse in `bool2num()` and `zip()`
- Fix many functions to handle `generate()` no longer returning a string on new puppets
- `concat()` no longer modifies the first argument (whoops)
@@ -354,20 +354,20 @@ This release has an overhauled readme, new private manifest function, and fixes
- Fix `file_line` matching on older rubies
-##2014-07-15 - Supported Release 4.3.2
-###Summary
+## 2014-07-15 - Supported Release 4.3.2
+### Summary
This release merely updates metadata.json so the module can be uninstalled and
upgraded via the puppet module command.
-##2014-07-14 - Supported Release 4.3.1
+## 2014-07-14 - Supported Release 4.3.1
### Summary
This supported release updates the metadata.json to work around upgrade behavior of the PMT.
#### Bugfixes
- Synchronize metadata.json with PMT-generated metadata to pass checksums
-##2014-06-27 - Supported Release 4.3.0
+## 2014-06-27 - Supported Release 4.3.0
### Summary
This release is the first supported release of the stdlib 4 series. It remains
backwards-compatible with the stdlib 3 series. It adds two new functions, one bugfix, and many testing updates.
@@ -379,7 +379,7 @@ backwards-compatible with the stdlib 3 series. It adds two new functions, one bu
#### Bugfixes
- Fix `has_interface_with()` when interfaces fact is nil
-##2014-06-04 - Release 4.2.2
+## 2014-06-04 - Release 4.2.2
### Summary
This release adds PE3.3 support in the metadata and fixes a few tests.
@@ -423,14 +423,14 @@ This release adds many new functions and fixes, and continues to be backwards co
- Add/update unit & acceptance tests.
-##2014-03-04 - Supported Release - 3.2.1
-###Summary
+## 2014-03-04 - Supported Release - 3.2.1
+### Summary
This is a supported release
-####Bugfixes
+#### Bugfixes
- Fixed `is_integer`/`is_float`/`is_numeric` for checking the value of arithmatic expressions.
-####Known bugs
+#### Known bugs
* No known bugs
---
diff --git a/README.md b/README.md
index c5a7471..61318ea 100644
--- a/README.md
+++ b/README.md
@@ -178,7 +178,7 @@ Default value: 'present'.
Sets the line to be added to the file located by the `path` parameter.
Values: String.
-
+
##### `match`
Specifies a regular expression to compare against existing lines in the file; if a match is found, it is replaced rather than adding a new line. A regex comparison is performed against the line value, and if it does not match, an exception is raised.
@@ -207,7 +207,7 @@ Default value: `false`.
##### `name`
-Specifies the name to use as the identity of the resource. If you want the resource namevar to differ from the supplied `title` of the resource, specify it with `name`.
+Specifies the name to use as the identity of the resource. If you want the resource namevar to differ from the supplied `title` of the resource, specify it with `name`.
Values: String.
@@ -217,7 +217,7 @@ Default value: The value of the title.
**Required.**
-Specifies the file in which Puppet ensures the line specified by `line`.
+Specifies the file in which Puppet ensures the line specified by `line`.
Value: String specifying an absolute path to the file.
@@ -311,7 +311,7 @@ C:/whatever
Matches paths on Windows operating systems.
-Acceptable input example:
+Acceptable input example:
```shell
C:\\WINDOWS\\System32
@@ -468,9 +468,9 @@ Converts a Boolean to a number. Converts values:
* `false`, 'f', '0', 'n', and 'no' to 0.
* `true`, 't', '1', 'y', and 'yes' to 1.
-
+
Argument: a single Boolean or string as an input.
-
+
*Type*: rvalue.
#### `bool2str`
@@ -538,8 +538,8 @@ Keeps value within the range [Min, X, Max] by sort based on integer value (param
* `clamp('24', [575, 187])` returns 187.
* `clamp(16, 88, 661)` returns 88.
* `clamp([4, 3, '99'])` returns 4.
-
-Arguments: strings, arrays, or numerics.
+
+Arguments: strings, arrays, or numerics.
*Type*: rvalue.
@@ -690,7 +690,7 @@ Other settings in Puppet affect the stdlib `deprecation` function:
Specifies whether or not to log deprecation warnings. This is especially useful for automated tests to avoid flooding your logs before you are ready to migrate.
This variable is Boolean, with the following effects:
-
+
* `true`: Functions log a warning.
* `false`: No warnings are logged.
* No value set: Puppet 4 emits warnings, but Puppet 3 does not.
@@ -1253,7 +1253,7 @@ Joins an array into a string using a separator. For example, `join(['a','b','c']
#### `join_keys_to_values`
-Joins each key of a hash to that key's corresponding value with a separator, returning the result as strings.
+Joins each key of a hash to that key's corresponding value with a separator, returning the result as strings.
If a value is an array, the key is prefixed to each element. The return value is a flattened array.
@@ -1407,7 +1407,7 @@ Arguments:
* The YAML string to convert, as a first argument.
* Optionally, the result to return if conversion fails, as a second error.
-*Type*: rvalue.
+*Type*: rvalue.
#### `pick`
@@ -1696,7 +1696,7 @@ For example, `time()` returns something like '1311972653'.
Converts the argument into bytes.
-For example, "4 kB" becomes "4096".
+For example, "4 kB" becomes "4096".
Arguments: A single string.
@@ -1708,7 +1708,7 @@ Arguments: A single string.
Retrieves a value within multiple layers of hashes and arrays.
-Arguments:
+Arguments:
* A string containing a path, as the first argument. Provide this argument as a string of hash keys or array indexes starting with zero and separated by the path separator character (default "/"). This function goes through the structure by each path component and tries to return the value at the end of the path.
@@ -1819,7 +1819,7 @@ For example, `upcase('abcd')` returns 'ABCD'.
#### `uriescape`
-URLEncodes a string or array of strings.
+URLEncodes a string or array of strings.
Arguments: Either a single string or an array of strings.
@@ -1915,7 +1915,7 @@ validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers
**Deprecated. Will be removed in a future version of stdlib. See [`validate_legacy`](#validate_legacy).**
-Validates that all passed values are either `true` or `false`.
+Validates that all passed values are either `true` or `false`.
Terminates catalog compilation if any value fails this check.
The following values pass:
@@ -1992,7 +1992,7 @@ Arguments:
* An integer or an array of integers, as the first argument.
* Optionally, a maximum, as the second argument. (All elements of) the first argument must be equal to or less than this maximum.
-* Optionally, a minimum, as the third argument. (All elements of) the first argument must be equal to or greater than than this maximum.
+* Optionally, a minimum, as the third argument. (All elements of) the first argument must be equal to or greater than than this maximum.
This function fails if the first argument is not an integer or array of integers, or if the second or third arguments are not convertable to an integer. However, if (and only if) a minimum is given, the second argument may be an empty string or `undef`, which serves as a placeholder to ensure the minimum check.
@@ -2046,7 +2046,7 @@ validate_integer(1, 3, true)
**Deprecated. Will be removed in a future version of stdlib. See [`validate_legacy`](#validate_legacy).**
-Validates that the argument is an IP address, regardless of whether it is an IPv4 or an IPv6 address. It also validates IP address with netmask.
+Validates that the argument is an IP address, regardless of whether it is an IPv4 or an IPv6 address. It also validates IP address with netmask.
Arguments: A string specifying an IP address.
@@ -2117,7 +2117,7 @@ The deprecation messages you get can vary, depending on the modules and data tha
The `validate_legacy` function helps you move from Puppet 3 style validation to Puppet 4 validation without breaking functionality your module's users depend on.
-Moving to Puppet 4 type validation allows much better defined type checking using [data types](https://docs.puppet.com/puppet/latest/reference/lang_data.html). Many of Puppet 3's `validate_*` functions have surprising holes in their validation. For example, [validate_numeric](#validate_numeric) allows not only numbers, but also arrays of numbers or strings that look like numbers, without giving you any control over the specifics.
+Moving to Puppet 4 type validation allows much better defined type checking using [data types](https://docs.puppet.com/puppet/latest/reference/lang_data.html). Many of Puppet 3's `validate_*` functions have surprising holes in their validation. For example, [validate_numeric](#validate_numeric) allows not only numbers, but also arrays of numbers or strings that look like numbers, without giving you any control over the specifics.
For each parameter of your classes and defined types, choose a new Puppet 4 data type to use. In most cases, the new data type allows a different set of values than the original `validate_*` function. The situation then looks like this:
diff --git a/spec/unit/ensure_resources_spec.rb b/spec/functions/ensure_resources_spec.rb
index aea723e..aea723e 100644
--- a/spec/unit/ensure_resources_spec.rb
+++ b/spec/functions/ensure_resources_spec.rb
diff --git a/spec/unit/puppet/provider/file_line/ruby_spec.rb b/spec/unit/puppet/provider/file_line/ruby_spec.rb
index 1f41f62..3d28687 100755
--- a/spec/unit/puppet/provider/file_line/ruby_spec.rb
+++ b/spec/unit/puppet/provider/file_line/ruby_spec.rb
@@ -2,7 +2,8 @@
require 'spec_helper'
require 'tempfile'
provider_class = Puppet::Type.type(:file_line).provider(:ruby)
-describe provider_class do
+# These tests fail on windows when run as part of the rake task. Individually they pass
+describe provider_class, :unless => Puppet::Util::Platform.windows? do
context "when adding" do
let :tmpfile do
tmp = Tempfile.new('tmp')