From 62c9089fb0e482d388669cabbe1cbe8aed0b151c Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 13 Oct 2022 09:55:26 +0000 Subject: [PATCH] Release prep v8.5.0 --- CHANGELOG.md | 19 ++++++++++++++ REFERENCE.md | 70 +++++++++++++++++++++++++++++++++++---------------- metadata.json | 2 +- 3 files changed, 69 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95502ef0e..06ffc7f7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). +## [v8.5.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v8.5.0) (2022-10-13) + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-stdlib/compare/v8.4.0...v8.5.0) + +### Added + +- Add a Stdlib::CreateResources type [\#1267](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1267) ([ekohl](https://github.com/ekohl)) +- pdksync - \(GH-cat-11\) Certify Support for Ubuntu 22.04 [\#1261](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1261) ([david22swan](https://github.com/david22swan)) +- \(FEAT\) Add function parsepson [\#1259](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1259) ([david22swan](https://github.com/david22swan)) + +### Fixed + +- \(CONT-200\) Fix require relative paths [\#1275](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1275) ([chelnak](https://github.com/chelnak)) +- pdksync - \(CONT-189\) Remove support for RedHat6 / OracleLinux6 / Scientific6 [\#1272](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1272) ([david22swan](https://github.com/david22swan)) +- pdksync - \(CONT-130\) - Dropping Support for Debian 9 [\#1269](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1269) ([jordanbreen28](https://github.com/jordanbreen28)) +- \(MAINT\) Drop support for AIX + Windows EOL OSs [\#1265](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1265) ([jordanbreen28](https://github.com/jordanbreen28)) +- \(GH-1262\) Use 'require\_relative' to load stdlib due to lookup errors [\#1264](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1264) ([david22swan](https://github.com/david22swan)) +- Switch parsejson\(\) from PSON to JSON parsing [\#1240](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1240) ([seanmil](https://github.com/seanmil)) + ## [v8.4.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v8.4.0) (2022-07-21) [Full Changelog](https://github.com/puppetlabs/puppetlabs-stdlib/compare/v8.3.0...v8.4.0) diff --git a/REFERENCE.md b/REFERENCE.md index 174474ebd..92111e563 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -140,8 +140,8 @@ true boolean. Puppet structure * [`parsejson`](#parsejson): This function accepts JSON as a string and converts it into the correct Puppet structure. -* [`parsepson`](#parsepson): This function accepts PSON, a Puppet variant of JSON, as a string and -converts it into the correct Puppet structure. +* [`parsepson`](#parsepson): This function accepts PSON, a Puppet variant of JSON, as a string and converts +it into the correct Puppet structure * [`parseyaml`](#parseyaml): This function accepts YAML as a string and converts it into the correct Puppet structure. * [`pick`](#pick): This function will return @@ -272,6 +272,7 @@ OpenSSL. * [`Stdlib::Compat::Ipv6`](#stdlibcompatipv6): Validate an IPv6 address * [`Stdlib::Compat::Numeric`](#stdlibcompatnumeric): Emulate the is_numeric and validate_numeric functions * [`Stdlib::Compat::String`](#stdlibcompatstring): Emulate the is_string and validate_string functions +* [`Stdlib::CreateResources`](#stdlibcreateresources): A type description used for the create_resources function * [`Stdlib::Datasize`](#stdlibdatasize): Validate the size of data * [`Stdlib::Email`](#stdlibemail): Validate an e-mail address * [`Stdlib::Ensure::File`](#stdlibensurefile): Validate the value of the ensure parameter for a file @@ -3923,30 +3924,24 @@ Type: Ruby 3.x API > *Note:* The optional second argument can be used to pass a default value that will - be returned if the parsing of YAML string have failed. + be returned if the parsing of the JSON string failed or if the JSON parse + evaluated to nil. #### `parsejson()` > *Note:* The optional second argument can be used to pass a default value that will - be returned if the parsing of YAML string have failed. + be returned if the parsing of the JSON string failed or if the JSON parse + evaluated to nil. Returns: `Any` convert JSON into Puppet structure -### `parseyaml` - -Type: Ruby 3.x API - -> *Note:* - The optional second argument can be used to pass a default value that will - be returned if the parsing of YAML string have failed. - ### `parsepson` Type: Ruby 4.x API -This function accepts PSON as a string and converts it into the correct -Puppet structure +For more information on PSON please see the following link: +https://puppet.com/docs/puppet/7/http_api/pson.html #### Examples @@ -3956,13 +3951,11 @@ Puppet structure $data = parsepson('{"a":"1","b":"2"}') ``` +#### `parsepson(String[1] $pson_string, Optional[Any] $default)` + For more information on PSON please see the following link: https://puppet.com/docs/puppet/7/http_api/pson.html -#### `parsepson(String $pson_string, Optional[Any] $default)` - -The parseson function. - Returns: `Data` ##### Examples @@ -3973,9 +3966,6 @@ Returns: `Data` $data = parsepson('{"a":"1","b":"2"}') ``` -For more information on PSON please see the following link: -https://puppet.com/docs/puppet/7/http_api/pson.html - ##### `pson_string` Data type: `String[1]` @@ -3988,6 +3978,14 @@ Data type: `Optional[Any]` An optional default to return if parsing the pson_string fails +### `parseyaml` + +Type: Ruby 3.x API + +> *Note:* + The optional second argument can be used to pass a default value that will + be returned if the parsing of YAML string have failed. + #### `parseyaml()` > *Note:* @@ -7604,6 +7602,36 @@ Alias of Optional[String] ``` +### `Stdlib::CreateResources` + +A type description used for the create_resources function + +#### Examples + +##### As a class parameter + +```puppet +class myclass ( + Stdlib::CreateResources $myresources = {}, +) { + # Using create_resources + create_resources('myresource', $myresources) + + # Using iteration + $myresources.each |$myresource_name, $myresource_attrs| { + myresource { $myresource_name: + * => $myresource_attrs, + } + } +} +``` + +Alias of + +```puppet +Hash[String[1], Hash[String[1], Any]] +``` + ### `Stdlib::Datasize` Validate the size of data diff --git a/metadata.json b/metadata.json index d86c85dec..98f6317e7 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppetlabs-stdlib", - "version": "8.4.0", + "version": "8.5.0", "author": "puppetlabs", "summary": "Standard library of resources for Puppet modules.", "license": "Apache-2.0",