Skip to content

Commit 79d9f21

Browse files
author
Daniel Carabas
committed
Update functions documentation
1 parent 153cd6a commit 79d9f21

File tree

6 files changed

+15
-16
lines changed

6 files changed

+15
-16
lines changed

REFERENCE.md

+9-11
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ _Private Classes_
6262
**Functions**
6363

6464
* [`postgresql_acls_to_resources_hash`](#postgresql_acls_to_resources_hash): This internal function translates the ipv(4|6)acls format into a resource suitable for create_resources. It is not intended to be used outsid
65-
* [`postgresql_escape`](#postgresql_escape): Safely escapes a string using $$ using a random tag which should be consistent
66-
* [`postgresql_password`](#postgresql_password): Returns the postgresql password hash from the clear text username / password.
65+
* [`postgresql_escape`](#postgresql_escape):
66+
* [`postgresql_password`](#postgresql_password):
6767

6868
**Tasks**
6969

@@ -2568,7 +2568,6 @@ This internal function translates the ipv(4|6)acls format into a resource
25682568
suitable for create_resources. It is not intended to be used outside of the
25692569
postgresql internal classes/defined resources.
25702570

2571-
This function accepts an array of strings that are pg_hba.conf rules. It
25722571
will return a hash that can be fed into create_resources to create multiple
25732572
individual pg_hba_rule resources.
25742573

@@ -2584,7 +2583,6 @@ This internal function translates the ipv(4|6)acls format into a resource
25842583
suitable for create_resources. It is not intended to be used outside of the
25852584
postgresql internal classes/defined resources.
25862585

2587-
This function accepts an array of strings that are pg_hba.conf rules. It
25882586
will return a hash that can be fed into create_resources to create multiple
25892587
individual pg_hba_rule resources.
25902588

@@ -2594,31 +2592,31 @@ to provide uniqueness. It must be a string.
25942592
The third parameter is an order offset, so you can start the order at an
25952593
arbitrary starting point.
25962594

2597-
Returns: `Any`
2595+
Returns: `Any` This function accepts an array of strings that are pg_hba.conf rules. It
25982596

25992597
### postgresql_escape
26002598

26012599
Type: Ruby 3.x API
26022600

2603-
Safely escapes a string using $$ using a random tag which should be consistent
2601+
The postgresql_escape function.
26042602

26052603
#### `postgresql_escape()`
26062604

2607-
Safely escapes a string using $$ using a random tag which should be consistent
2605+
The postgresql_escape function.
26082606

2609-
Returns: `Any`
2607+
Returns: `Any` Safely escapes a string using $$ using a random tag which should be consistent
26102608

26112609
### postgresql_password
26122610

26132611
Type: Ruby 3.x API
26142612

2615-
Returns the postgresql password hash from the clear text username / password.
2613+
The postgresql_password function.
26162614

26172615
#### `postgresql_password()`
26182616

2619-
Returns the postgresql password hash from the clear text username / password.
2617+
The postgresql_password function.
26202618

2621-
Returns: `Any`
2619+
Returns: `Any` Returns the postgresql password hash from the clear text username / password.
26222620

26232621
## Tasks
26242622

lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Puppet::Parser::Functions
55
suitable for create_resources. It is not intended to be used outside of the
66
postgresql internal classes/defined resources.
77
8-
This function accepts an array of strings that are pg_hba.conf rules. It
8+
@return This function accepts an array of strings that are pg_hba.conf rules. It
99
will return a hash that can be fed into create_resources to create multiple
1010
individual pg_hba_rule resources.
1111

lib/puppet/parser/functions/postgresql_escape.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# postgresql_escape.rb
44
module Puppet::Parser::Functions
55
newfunction(:postgresql_escape, type: :rvalue, doc: <<-EOS
6-
Safely escapes a string using $$ using a random tag which should be consistent
6+
@return Safely escapes a string using $$ using a random tag which should be consistent
77
EOS
88
) do |args|
99

lib/puppet/parser/functions/postgresql_password.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# postgresql_password.rb
55
module Puppet::Parser::Functions
66
newfunction(:postgresql_password, type: :rvalue, doc: <<-EOS
7-
Returns the postgresql password hash from the clear text username / password.
7+
@return Returns the postgresql password hash from the clear text username / password.
88
EOS
99
) do |args|
1010

lib/puppet/provider/postgresql_psql/ruby.rb

+1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ def run_command(command, user, group, environment)
6363
custom_environment: environment)
6464
[output, $CHILD_STATUS.dup]
6565
end
66+
6667
end

lib/puppet/type/postgresql_psql.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def sync
2626
end
2727

2828
newparam(:unless) do
29-
desc 'An optional SQL command to execute prior to the main :command; ' \
29+
Desc 'An optional SQL command to execute prior to the main :command; ' \
3030
'this is generally intended to be used for idempotency, to check ' \
3131
'for the existence of an object in the database to determine whether ' \
3232
'or not the main SQL command needs to be executed at all.'
@@ -45,7 +45,7 @@ def matches(value)
4545
end
4646

4747
newparam(:onlyif) do
48-
desc 'An optional SQL command to execute prior to the main :command; ' \
48+
Desc 'An optional SQL command to execute prior to the main :command; ' \
4949
'this is generally intended to be used for idempotency, to check ' \
5050
'for the existence of an object in the database to determine whether ' \
5151
'or not the main SQL command needs to be executed at all.'

0 commit comments

Comments
 (0)