Skip to content

Commit ef80b24

Browse files
authored
Merge pull request #1203 from puppetlabs/release-prep
Release prep v8.0.0
2 parents 375f8d2 + 7549bf7 commit ef80b24

File tree

3 files changed

+125
-5
lines changed

3 files changed

+125
-5
lines changed

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22

33
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).
44

5-
## [v7.1.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v7.1.0) (2021-05-15)
5+
## [v8.0.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v8.0.0) (2021-08-24)
6+
7+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-stdlib/compare/v7.1.0...v8.0.0)
8+
9+
### Changed
10+
11+
- Flip installed and present in Function ensure\_packages [\#1196](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1196) ([cocker-cc](https://github.com/cocker-cc))
12+
13+
### Added
14+
15+
- New function to\_python\(\) / to\_ruby\(\) [\#1200](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1200) ([smortex](https://github.com/smortex))
16+
- pdksync - \(IAC-1709\) - Add Support for Debian 11 [\#1199](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1199) ([david22swan](https://github.com/david22swan))
17+
- Stdlib::Http::Method: Add new type for http methods [\#1192](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1192) ([b4ldr](https://github.com/b4ldr))
18+
19+
### Fixed
20+
21+
- \(MODULES-11099\) Make merge parameter data types actually backwards compatible [\#1191](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1191) ([SimonPe](https://github.com/SimonPe))
22+
23+
## [v7.1.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v7.1.0) (2021-05-17)
624

725
[Full Changelog](https://github.com/puppetlabs/puppetlabs-stdlib/compare/v7.0.1...v7.1.0)
826

REFERENCE.md

Lines changed: 105 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ in a hash.
180180
* [`to_bytes`](#to_bytes): Converts the argument into bytes, for example 4 kB becomes 4096.
181181
* [`to_json`](#to_json): }
182182
* [`to_json_pretty`](#to_json_pretty): Convert data structure and output to pretty JSON
183+
* [`to_python`](#to_python): Convert an object into a String containing its Python representation
184+
* [`to_ruby`](#to_ruby): Convert an object into a String containing its Ruby representation
183185
* [`to_yaml`](#to_yaml): }
184186
* [`try_get_value`](#try_get_value)
185187
* [`type`](#type): **DEPRECATED:** This function will cease to function on Puppet 4;
@@ -3294,15 +3296,15 @@ $merged_hash = merge($hash1, $hash2) # $merged_hash = {'one' => 1, 'two' => 'do
32943296
['a', 'b', 'c', 'c', 'd', 'b', 'blah', 'blah'].merge | $hsh, $v | { if $v =~ String[1,1] { { $v => $hsh[$v].lest || { 0 } + 1 } } } # results in { a => 1, b => 2, c => 2, d => 1 }
32953297
```
32963298

3297-
#### `merge(Variant[Hash, Undef, String[0,0]] *$args)`
3299+
#### `merge(Variant[Hash[Scalar,Any], Undef, String[0,0]] *$args)`
32983300

32993301
The merge function.
33003302

3301-
Returns: `Hash` The merged hash
3303+
Returns: `Hash[Scalar,Any]` The merged hash
33023304

33033305
##### `*args`
33043306

3305-
Data type: `Variant[Hash, Undef, String[0,0]]`
3307+
Data type: `Variant[Hash[Scalar,Any], Undef, String[0,0]]`
33063308

33073309
Repeated Param - The hashes that are to be merged
33083310

@@ -4692,6 +4694,106 @@ hash-map of settings passed to JSON.pretty_generate, see
46924694
https://ruby-doc.org/stdlib-2.0.0/libdoc/json/rdoc/JSON.html#method-i-generate.
46934695
Note that `max_nesting` doesn't take the value `false`; use `-1` instead.
46944696

4697+
### <a name="to_python"></a>`to_python`
4698+
4699+
Type: Ruby 4.x API
4700+
4701+
Convert an object into a String containing its Python representation
4702+
4703+
#### Examples
4704+
4705+
##### how to output Python
4706+
4707+
```puppet
4708+
# output Python to a file
4709+
$listen = '0.0.0.0'
4710+
$port = 8000
4711+
file { '/opt/acme/etc/settings.py':
4712+
content => inline_epp(@("SETTINGS")),
4713+
LISTEN = <%= $listen.to_python %>
4714+
PORT = <%= $mailserver.to_python %>
4715+
| SETTINGS
4716+
}
4717+
```
4718+
4719+
#### `to_python(Any $object)`
4720+
4721+
The to_python function.
4722+
4723+
Returns: `Any`
4724+
4725+
##### Examples
4726+
4727+
###### how to output Python
4728+
4729+
```puppet
4730+
# output Python to a file
4731+
$listen = '0.0.0.0'
4732+
$port = 8000
4733+
file { '/opt/acme/etc/settings.py':
4734+
content => inline_epp(@("SETTINGS")),
4735+
LISTEN = <%= $listen.to_python %>
4736+
PORT = <%= $mailserver.to_python %>
4737+
| SETTINGS
4738+
}
4739+
```
4740+
4741+
##### `object`
4742+
4743+
Data type: `Any`
4744+
4745+
4746+
4747+
### <a name="to_ruby"></a>`to_ruby`
4748+
4749+
Type: Ruby 4.x API
4750+
4751+
Convert an object into a String containing its Ruby representation
4752+
4753+
#### Examples
4754+
4755+
##### how to output Ruby
4756+
4757+
```puppet
4758+
# output Ruby to a file
4759+
$listen = '0.0.0.0'
4760+
$port = 8000
4761+
file { '/opt/acme/etc/settings.rb':
4762+
content => inline_epp(@("SETTINGS")),
4763+
LISTEN = <%= $listen.to_ruby %>
4764+
PORT = <%= $mailserver.to_ruby %>
4765+
| SETTINGS
4766+
}
4767+
```
4768+
4769+
#### `to_ruby(Any $object)`
4770+
4771+
The to_ruby function.
4772+
4773+
Returns: `Any`
4774+
4775+
##### Examples
4776+
4777+
###### how to output Ruby
4778+
4779+
```puppet
4780+
# output Ruby to a file
4781+
$listen = '0.0.0.0'
4782+
$port = 8000
4783+
file { '/opt/acme/etc/settings.rb':
4784+
content => inline_epp(@("SETTINGS")),
4785+
LISTEN = <%= $listen.to_ruby %>
4786+
PORT = <%= $mailserver.to_ruby %>
4787+
| SETTINGS
4788+
}
4789+
```
4790+
4791+
##### `object`
4792+
4793+
Data type: `Any`
4794+
4795+
4796+
46954797
### <a name="to_yaml"></a>`to_yaml`
46964798

46974799
Type: Ruby 4.x API

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "puppetlabs-stdlib",
3-
"version": "7.1.0",
3+
"version": "8.0.0",
44
"author": "puppetlabs",
55
"summary": "Standard library of resources for Puppet modules.",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)