You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1163,6 +1163,8 @@ Converts the case of a string or of all strings in an array to lowercase.
1163
1163
1164
1164
#### `empty`
1165
1165
1166
+
**Deprecated. Puppet 5.5.0 has introduced a built in `empty` function, which will take precedence over the stdlib function. See [Puppet 5.5.0 Release Notes](https://puppet.com/docs/puppet/5.5/release_notes.html#new-features).**
1167
+
1166
1168
Returns `true` if the argument is an array or hash that contains no elements, or an empty string. Returns `false` when the argument is a numerical value.
**Deprecated. Puppet 5.5.0 has introduced a built in `flatten` function, which will take precedence over the stdlib function. See [Puppet 5.5.0 Release Notes](https://puppet.com/docs/puppet/5.5/release_notes.html#new-features).**
1280
+
1277
1281
Flattens deeply nested arrays and returns a single flat array as a result.
1278
1282
1279
1283
For example, `flatten(['a', ['b', ['c']]])` returns ['a','b','c'].
@@ -1631,6 +1635,8 @@ Returns `true` if the variable passed to this function is a string.
1631
1635
1632
1636
#### `join`
1633
1637
1638
+
**Deprecated. Puppet 5.5.0 has introduced a built in `join` function, which will take precedence over the stdlib function. See [Puppet 5.5.0 Release Notes](https://puppet.com/docs/puppet/5.5/release_notes.html#new-features).**
1639
+
1634
1640
Joins an array into a string using a separator. For example, `join(['a','b','c'], ",")` results in: "a,b,c".
1635
1641
1636
1642
*Type*: rvalue.
@@ -1647,12 +1653,16 @@ For example, `join_keys_to_values({'a'=>1,'b'=>[2,3]}, " is ")` results in ["a i
1647
1653
1648
1654
#### `keys`
1649
1655
1656
+
**Deprecated. Puppet 5.5.0 has introduced a built in `keys` function, which will take precedence over the stdlib function. See [Puppet 5.5.0 Release Notes](https://puppet.com/docs/puppet/5.5/release_notes.html#new-features).**
1657
+
1650
1658
Returns the keys of a hash as an array.
1651
1659
1652
1660
*Type*: rvalue.
1653
1661
1654
1662
#### `length`
1655
1663
1664
+
**Deprecated. Puppet 5.5.0 has introduced a built in `length` function, which will take precedence over the stdlib function. See [Puppet 5.5.0 Release Notes](https://puppet.com/docs/puppet/5.5/release_notes.html#new-features).**
1665
+
1656
1666
Returns the length of a given string, array or hash. Replaces the deprecated `size()` function.
**Deprecated. Puppet 5.5.0 has introduced a built in `values` function, which will take precedence over the stdlib function. See [Puppet 5.5.0 Release Notes](https://puppet.com/docs/puppet/5.5/release_notes.html#new-features).**
2788
+
2777
2789
Returns the values of a given hash.
2778
2790
2779
2791
For example, given `$hash = {'a'=1, 'b'=2, 'c'=3} values($hash)` returns [1,2,3].
Copy file name to clipboardExpand all lines: lib/puppet/parser/functions/empty.rb
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ module Puppet::Parser::Functions
7
7
DOC
8
8
)do |arguments|
9
9
10
+
function_deprecation([:empty,'This method is deprecated, this function is now shipped with Puppet in versions 5.5.0 and later. For more information please see Puppet 5.5.0 Release Notes.'])
11
+
10
12
raise(Puppet::ParseError,"empty(): Wrong number of arguments given (#{arguments.size} for 1)")ifarguments.empty?
function_deprecation([:flatten,'This method is deprecated, this function is now shipped with Puppet in versions 5.5.0 and later. For more information please see Puppet 5.5.0 Release Notes'])
18
+
17
19
raise(Puppet::ParseError,"flatten(): Wrong number of arguments given (#{arguments.size} for 1)")ifarguments.size != 1
function_deprecation([:join,'This method is deprecated, this function is now shipped with Puppet in versions 5.5.0 and later. For more information please see Puppet 5.5.0 Release Notes'])
17
+
16
18
# Technically we support two arguments but only first is mandatory ...
17
19
raise(Puppet::ParseError,"join(): Wrong number of arguments given (#{arguments.size} for 1)")ifarguments.empty?
Copy file name to clipboardExpand all lines: lib/puppet/parser/functions/keys.rb
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ module Puppet::Parser::Functions
7
7
DOC
8
8
)do |arguments|
9
9
10
+
function_deprecation([:keys,'This method is deprecated, this function is now shipped with Puppet in versions 5.5.0 and later. For more information please see Puppet 5.5.0 Release Notes.'])
11
+
10
12
raise(Puppet::ParseError,"keys(): Wrong number of arguments given (#{arguments.size} for 1)")ifarguments.empty?
function_deprecation([:values,'This method is deprecated, this function is now shipped with Puppet in versions 5.5.0 and later. For more information please see Puppet 5.5.0 Release Notes.'])
24
+
23
25
raise(Puppet::ParseError,"values(): Wrong number of arguments given (#{arguments.size} for 1)")ifarguments.empty?
0 commit comments