Skip to content

Commit 4df84a0

Browse files
(maint) Merge up 37aea06 to main
Generated by CI * commit '37aea06f6a3bbc5a8992951e40c12eb339ac62d2': (packaging) Updating manpage file for 6.x (Docs)(maint) Fix more strings formatting issues
2 parents 93c86d6 + 37aea06 commit 4df84a0

File tree

15 files changed

+146
-140
lines changed

15 files changed

+146
-140
lines changed

lib/puppet/defaults.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,8 @@ def self.initialize_default_settings!(settings)
837837
**Note:** The list of alternate names is locked in when the server's
838838
certificate is signed. If you need to change the list later, you can't just
839839
change this setting; you also need to regenerate the certificate. For more
840-
information on that process, see the [cert regen docs]
841-
(https://puppet.com/docs/puppet/latest/ssl_regenerate_certificates.html).
840+
information on that process, see the
841+
[cert regen docs](https://puppet.com/docs/puppet/latest/ssl_regenerate_certificates.html).
842842
843843
To see all the alternate names your servers are using, log into your CA server
844844
and run `puppetserver ca list --all`, then check the output for `(alt names: ...)`.

lib/puppet/functions/all.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
# notice $data.all |$key, $value| { $value % 10 == 0 and $key =~ /^abc/ }
5252
# ```
5353
#
54-
# Would notice true.
54+
# Would notice `true`.
5555
#
5656
# For an general examples that demonstrates iteration, see the Puppet
5757
# [iteration](https://puppet.com/docs/puppet/latest/lang_iteration.html)

lib/puppet/functions/capitalize.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
# 'hello'.capitalize()
1919
# upcase('hello')
2020
# ```
21-
# Would both result in "Hello"
21+
# Would both result in `"Hello"`
2222
#
2323
# @example Capitalizing strings in an Array
2424
# ```puppet
2525
# ['abc', 'bcd'].capitalize()
2626
# capitalize(['abc', 'bcd'])
2727
# ```
28-
# Would both result in ['Abc', 'Bcd']
28+
# Would both result in `['Abc', 'Bcd']`
2929
#
3030
Puppet::Functions.create_function(:capitalize) do
3131

lib/puppet/functions/downcase.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
# 'HELLO'.downcase()
2323
# downcase('HEllO')
2424
# ```
25-
# Would both result in "hello"
25+
# Would both result in `"hello"`
2626
#
2727
# @example Converting an Array to lower case
2828
# ```puppet
2929
# ['A', 'B'].downcase()
3030
# downcase(['A', 'B'])
3131
# ```
32-
# Would both result in ['a', 'b']
32+
# Would both result in `['a', 'b']`
3333
#
3434
# @example Converting a Hash to lower case
3535
# ```puppet

lib/puppet/functions/get.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@
2323
# #get($facts, 'os.family')
2424
# $facts.get('os.family')
2525
# ```
26-
# Would both result in the value of $facts['os']['family']
26+
# Would both result in the value of `$facts['os']['family']`
2727
#
2828
# @example Getting the value from an expression
2929
# ```puppet
3030
# get([1,2,[{'name' =>'waldo'}]], '2.0.name')
3131
# ```
32-
# Would result in 'waldo'
32+
# Would result in `'waldo'`
3333
#
3434
# @example Using a default value
3535
# ```puppet
3636
# get([1,2,[{'name' =>'waldo'}]], '2.1.name', 'not waldo')
3737
#
3838
# ```
39-
# Would result in 'not waldo'
39+
# Would result in `'not waldo'`
4040
#
4141
# @example Quoting a key with period
4242
# ```puppet
@@ -128,8 +128,8 @@ def get_from_value(value, navigation, default_value = nil, &block)
128128

129129
# Note: split_key always processes the initial segment as a string even if it could be an integer.
130130
# This since it is designed for lookup keys. For a numeric first segment
131-
# like '0.1' the wanted result is [0,1], not ["0", 1]. The workaround here is to
132-
# prefix the navigation with "x." thus giving split_key a first segment that is a string.
131+
# like '0.1' the wanted result is `[0,1]`, not `["0", 1]`. The workaround here is to
132+
# prefix the navigation with `"x."` thus giving split_key a first segment that is a string.
133133
# The fake segment is then dropped.
134134
segments = split_key("x." + navigation) {|err| _("Syntax error in dotted-navigation string")}
135135
segments.shift

lib/puppet/functions/group_by.rb

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,22 @@
44
# and the values are arrays of elements in the collection that correspond to the key.
55
Puppet::Functions.create_function(:group_by) do
66
# @param collection A collection of things to group.
7-
# @example Group array of strings by length, results in e.g. { 1 => [a, b], 2 => [ab] }
7+
# @example Group array of strings by length, results in e.g. `{ 1 => [a, b], 2 => [ab] }`
8+
# ```puppet
89
# [a, b, ab].group_by |$s| { $s.length }
9-
# @example Group array of strings by length and index, results in e.g. {1 => ['a'], 2 => ['b', 'ab']}
10+
# ```
11+
# @example Group array of strings by length and index, results in e.g. `{1 => ['a'], 2 => ['b', 'ab']}`
12+
# ```puppet
1013
# [a, b, ab].group_by |$i, $s| { $i%2 + $s.length }
11-
# @example Group hash iterating by key-value pair, results in e.g. { 2 => [['a', [1, 2]]], 1 => [['b', [1]]] }
14+
# ```
15+
# @example Group hash iterating by key-value pair, results in e.g. `{ 2 => [['a', [1, 2]]], 1 => [['b', [1]]] }`
16+
# ```puppet
1217
# { a => [1, 2], b => [1] }.group_by |$kv| { $kv[1].length }
13-
# @example Group hash iterating by key and value, results in e.g. { 2 => [['a', [1, 2]]], 1 => [['b', [1]]] }
14-
# { a => [1, 2], b => [1] }.group_by |$k, $v| { $v.length }
18+
# ```
19+
# @example Group hash iterating by key and value, results in e.g. `{ 2 => [['a', [1, 2]]], 1 => [['b', [1]]] }`
20+
# ```puppet
21+
# { a => [1, 2], b => [1] }.group_by |$k, $v| { $v.length }
22+
# ```
1523
dispatch :group_by_1 do
1624
required_param 'Collection', :collection
1725
block_param 'Callable[1,1]', :block

lib/puppet/functions/lest.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# .lest || { fail("no value for $data[a][b][c]" }
2424
# ```
2525
#
26-
# Would fail the operation because $data[a][b][c] results in `undef`
26+
# Would fail the operation because `$data[a][b][c]` results in `undef`
2727
# (there is no `b` key in `a`).
2828
#
2929
# In contrast - this example:

0 commit comments

Comments
 (0)