Skip to content

Commit ef55080

Browse files
author
Helen
authored
Merge pull request puppetlabs#670 from DavidS/release-prep
Release prep for 4.13.0
2 parents 59553c8 + b112b83 commit ef55080

File tree

4 files changed

+69
-19
lines changed

4 files changed

+69
-19
lines changed

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
## Supported Release 4.13.0
2+
### Summary
3+
4+
This version of stdlib deprecates a whole host of functions, and provides stepping stones to move to Puppet 4 type validations. Be sure to check out the new `deprecation()` and `validate_legacy()` functions to migrate off the deprecated v3-style data validations.
5+
6+
Many thanks to all community contributors: bob, Dmitry Ilyin, Dominic Cleal, Joris, Joseph Yaworski, Loic Antoine-Gombeaud, Maksym Melnychok, Michiel Brandenburg, Nate Potter, Romain Tartière, Stephen Benjamin, and Steve Moore, as well as anyone contributing in the code review process and by submitting issues.
7+
8+
Special thanks to [Voxpupuli's](https://voxpupuli.org/) Igor Galić for donating the puppet-tea types to kickstart this part of stdlib.
9+
10+
11+
#### Deprecations
12+
* `validate_absolute_path`, `validate_array`, `validate_bool`, `validate_hash`, `validate_integer`, `validate_ip_address`, `validate_ipv4_address`, `validate_ipv6_address`, `validate_numeric`, `validate_re`, `validate_slength`, `validate_string`, and their `is_` counter parts are now deprecated on Puppet 4. See the `validate_legacy()` description in the README for help on migrating away from those functions.
13+
* The `dig` function is provided by core puppet since 4.5.0 with slightly different calling convention. The stdlib version can still be accessed as `dig44` for now.
14+
15+
16+
#### Features
17+
* Add Puppet 4 data types for Unix, and Windows paths, and URLs.
18+
* Add `deprecation` function to warn users of functionality that will be removed soon.
19+
* Add `validate_legacy` function to help with migrating to Puppet 4 data types.
20+
21+
* Add `any2bool` function, a combination of of `string2bool` and `num2bool`.
22+
* Add `delete_regex` function to delete array elements matching a regular expression.
23+
* Add `puppet_environmentpath` fact to expose the `environmentpath` setting.
24+
* Add `regexpescape` function to safely insert arbitrary strings into regular expressions.
25+
* Add `shell_escape`, `shell_join`, and `shell_split` functions for safer working with shell scripts..
26+
27+
* The `delete` function now also accepts regular expressions as search term.
28+
* The `loadyaml` function now accepts a default value, which is returned when there is an error loading the file.
29+
30+
#### Bugfixes
31+
* Fix `file_line.match_for_absence` implementation and description to actually work. (MODULES-3590)
32+
* Fix `getparam` so that it can now also return `false`. (MODULES-3933)
33+
* Fix the fixture setup for testing and adjust `load_module_metadata` and `loadjson` tests.
34+
* Fix `defined_with_params` to handle `undef` correctly on all puppet versions. (PUP-6422, MODULES-3543)
35+
* Fix `file_line.path` validation to use puppet's built in `absolute_path?` matcher.
36+
37+
#### Minor Improvements
38+
* README changes: improved descriptions of `deep_merge`, `delete`, `ensure_packages`, `file_line.after`, `range`, and `validate_numeric`.
39+
* The `getvar` function now returns nil in all situations where the variable is not found.
40+
* Update the `dig44` function with better `undef`, `nil`, and `false` handling.
41+
* Better wording on `str2bool` argument validation error message.
42+
43+
44+
### Known issues
45+
* The `validate_legacy` function relies on internal APIs from Puppet 4.4.0 (PE 2016.1) onwards, and doesn't work on earlier versions.
46+
* 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.
47+
148
## Supported Release 4.12.0
249
###Summary
350

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ group :development, :unit_tests do
2222
gem 'puppet-blacksmith', '>= 3.4.0'
2323
gem 'puppetlabs_spec_helper', '>= 1.2.1'
2424
gem 'rspec-puppet', '>= 2.3.2', :git => 'https://github.com/rodjek/rspec-puppet.git', :branch => 'fb27c533e2664057fba4b73d0bd902a946abfce0'
25+
# the newly released mocha 1.2.0 causes hangs during spec testing. See MODULES-3958 for a long-term solution
26+
gem 'mocha', '< 1.2.0'
2527
gem 'rspec-puppet-facts'
2628
gem 'simplecov'
2729
gem 'parallel_tests'

README.markdown

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#stdlib
1+
# stdlib
22

3-
####Table of Contents
3+
#### Table of Contents
44

55
1. [Overview](#overview)
66
2. [Module Description - What the module does and why it is useful](#module-description)
@@ -10,11 +10,11 @@
1010
5. [Limitations - OS compatibility, etc.](#limitations)
1111
6. [Development - Guide for contributing to the module](#development)
1212

13-
##Overview
13+
## Overview
1414

1515
Adds a standard library of resources for Puppet modules.
1616

17-
##Module Description
17+
## Module Description
1818

1919
This module provides a standard library of resources for the development of Puppet modules. Puppet modules make heavy use of this standard library. The stdlib module adds the following resources to Puppet:
2020

@@ -27,11 +27,11 @@ This module provides a standard library of resources for the development of Pupp
2727

2828
> *Note:* As of version 3.7, Puppet Enterprise no longer includes the stdlib module. If you're running Puppet Enterprise, you should install the most recent release of stdlib for compatibility with Puppet modules.
2929
30-
##Setup
30+
## Setup
3131

3232
Installing the stdlib module adds the functions, facts, and resources of this standard library to Puppet.
3333

34-
##Usage
34+
## Usage
3535

3636
After you've installed stdlib, all of its functions, facts, and resources are available for module use or development.
3737

@@ -136,36 +136,39 @@ All parameters are optional, unless otherwise noted.
136136

137137
### Data Types
138138

139-
#### `absolutepath`
139+
#### `Stdlib::Absolutepath`
140140

141141
A strict absolute path type. Uses a Variant of Unixpath and Windowspath types.
142142

143-
Acceptable input examples: /usr2/username/bin:/usr/local/bin:/usr/bin:.
143+
Acceptable input examples: /var/log
144+
/usr2/username/bin:/usr/local/bin:/usr/bin:.
144145
C:\\WINDOWS\\System32
146+
Unacceptable input example: ../relative_path
145147

146-
#### `httpsurl`
148+
#### `Stdlib::Httpsurl`
147149

148150
Matches https URLs.
151+
149152
Acceptable input example: https://hello.com
150153
Unacceptable input example: httds://notquiteright.org
151154

152-
#### `httpurl`
155+
#### `Stdlib::Httpurl`
153156

154157
Matches both https and http URLs.
155158

156159
Acceptable input example: https://hello.com
157160
http://hello.com
158161
Unacceptable input example: httds://notquiteright.org
159162

160-
#### `unixpath`
163+
#### `Stdlib::Unixpath`
161164

162165
Matches paths on Unix type Operating Systems.
163166

164167
Acceptable input example: /usr2/username/bin:/usr/local/bin:/usr/bin:.
165168
/var/tmp
166169
Unacceptable input example: C:/whatever
167170

168-
#### `windowspath`
171+
#### `Stdlib::Windowspath`
169172

170173
Matches paths on Windows Operating systems.
171174

@@ -1439,6 +1442,8 @@ validate_legacy("Optional[String]", "validate_re", "Value to be validated", ["."
14391442

14401443
This function supports updating modules from Puppet 3 style argument validation (using the stdlib `validate_*` functions) to Puppet 4 data types, without breaking functionality for those depending on Puppet 3 style validation.
14411444

1445+
> Note: This function relies on internal APIs from Puppet 4.4.0 (PE 2016.1) onwards, and doesn't work on earlier versions.
1446+
14421447
##### For module users
14431448

14441449
If you are running Puppet 4 and receiving deprecation warnings about `validate_*` functions, the `validate_legacy` function can help you find and resolve the deprecated code.
@@ -1656,7 +1661,7 @@ Versions | Puppet 2.6 | Puppet 2.7 | Puppet 3.x | Puppet 4.x |
16561661
Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad hardware, software, and deployment configurations that Puppet is intended to serve. We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. For more information, see our [module contribution guide](https://docs.puppetlabs.com/forge/contributing.html).
16571662

16581663
To report or research a bug with any part of this module, please go to
1659-
[http://tickets.puppetlabs.com/browse/PUP](http://tickets.puppetlabs.com/browse/PUP).
1664+
[http://tickets.puppetlabs.com/browse/MODULES](http://tickets.puppetlabs.com/browse/MODULES).
16601665

16611666
## Contributors
16621667

metadata.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "puppetlabs-stdlib",
3-
"version": "4.12.0",
3+
"version": "4.13.0",
44
"author": "puppetlabs",
55
"summary": "Standard library of resources for Puppet modules.",
66
"license": "Apache-2.0",
@@ -99,17 +99,13 @@
9999
}
100100
],
101101
"requirements": [
102-
{
103-
"name": "pe",
104-
"version_requirement": ">= 3.0.0 < 2015.4.0"
105-
},
106102
{
107103
"name": "puppet",
108104
"version_requirement": ">=2.7.20 <5.0.0"
109105
}
110106
],
111107
"description": "Standard Library for Puppet Modules",
112108
"dependencies": [
113-
109+
114110
]
115111
}

0 commit comments

Comments
 (0)