From 65f45c56c12704e8f9e7f5ffd78966f4aea307d5 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 21 Jul 2022 13:24:50 +0000 Subject: [PATCH] Release prep v8.4.0 --- CHANGELOG.md | 8 ++++++++ REFERENCE.md | 35 +++++++++++++++++++++++++++++++++++ metadata.json | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f825b086e..df41ab033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ 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.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) + +### Added + +- deferrable epp function simplifying deferred templates [\#1253](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1253) ([binford2k](https://github.com/binford2k)) + ## [v8.3.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v8.3.0) (2022-07-11) [Full Changelog](https://github.com/puppetlabs/puppetlabs-stdlib/compare/v8.2.0...v8.3.0) diff --git a/REFERENCE.md b/REFERENCE.md index 74c7065f6..65fcc3a16 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -171,6 +171,7 @@ the provided regular expression. * [`sort`](#sort): Sorts strings and arrays lexically. * [`sprintf_hash`](#sprintf_hash): Uses sprintf with named references. * [`squeeze`](#squeeze): Returns a new string where runs of the same character that occur in this set are replaced by a single character. +* [`stdlib::deferrable_epp`](#stdlibdeferrable_epp): This function returns either a rendered template or a deferred function to render at runtime. If any of the values in the variables hash are * [`stdlib::end_with`](#stdlibend_with): Returns true if str ends with one of the prefixes given. Each of the prefixes should be a String. * [`stdlib::ensure`](#stdlibensure): function to cast ensure parameter to resource specific value * [`stdlib::extname`](#stdlibextname): Returns the Extension (the Portion of Filename in Path starting from the @@ -4614,6 +4615,40 @@ The squeeze function. Returns: `Any` a new string where runs of the same character that occur in this set are replaced by a single character. +### `stdlib::deferrable_epp` + +Type: Puppet Language + +This function returns either a rendered template or a deferred function to render at runtime. +If any of the values in the variables hash are deferred, then the template will be deferred. + +Note: this function requires all parameters to be explicitly passed in. It cannot expect to +use facts, class variables, and other variables in scope. This is because when deferred, we +have to explicitly pass the entire scope to the client. + +#### `stdlib::deferrable_epp(String $template, Hash $variables)` + +This function returns either a rendered template or a deferred function to render at runtime. +If any of the values in the variables hash are deferred, then the template will be deferred. + +Note: this function requires all parameters to be explicitly passed in. It cannot expect to +use facts, class variables, and other variables in scope. This is because when deferred, we +have to explicitly pass the entire scope to the client. + +Returns: `Variant[String, Deferred]` + +##### `template` + +Data type: `String` + + + +##### `variables` + +Data type: `Hash` + + + ### `stdlib::end_with` Type: Ruby 4.x API diff --git a/metadata.json b/metadata.json index 476750e65..b1615691c 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppetlabs-stdlib", - "version": "8.3.0", + "version": "8.4.0", "author": "puppetlabs", "summary": "Standard library of resources for Puppet modules.", "license": "Apache-2.0",