Skip to content

Commit 8cbc343

Browse files
authored
Merge pull request puppetlabs#1075 from carabasdaniel/strings
[FM-7936] Puppet Strings
2 parents 791754f + f22ad32 commit 8cbc343

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+3163
-1669
lines changed

README.md

Lines changed: 1 addition & 1590 deletions
Large diffs are not rendered by default.

REFERENCE.md

Lines changed: 2695 additions & 0 deletions
Large diffs are not rendered by default.

lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
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+
This function safely escapes a string using a consistent random tag
7+
@return Safely escapes a string using $$ using a random tag which should be consistent
78
EOS
89
) do |args|
910

lib/puppet/parser/functions/postgresql_password.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
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+
This function returns the postgresql password hash from the clear text username / password
8+
@return Returns the postgresql password hash from the clear text username / password.
89
EOS
910
) do |args|
1011

lib/puppet/provider/postgresql_psql/ruby.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Puppet::Type.type(:postgresql_psql).provide(:ruby) do
2+
desc 'Postgres psql provider'
23
def run_unless_sql_command(sql)
34
# for the 'unless' queries, we wrap the user's query in a 'SELECT COUNT',
45
# which makes it easier to parse and process the output.

lib/puppet/provider/postgresql_replication_slot/ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Puppet::Type.type(:postgresql_replication_slot).provide(:ruby) do
2-
# For confinement
2+
desc 'For confinement'
33
commands psql: 'psql'
44

55
def self.instances

lib/puppet/type/postgresql_conn_validator.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
Puppet::Type.newtype(:postgresql_conn_validator) do
2-
@doc = "Verify that a connection can be successfully established between a node
2+
@doc = <<-EOS
3+
@summary Verify if a connection can be successfully established
4+
5+
Verify that a connection can be successfully established between a node
36
and the PostgreSQL server. Its primary use is as a precondition to
47
prevent configuration changes from being applied if the PostgreSQL
58
server cannot be reached, but it could potentially be used for other
6-
purposes such as monitoring."
9+
purposes such as monitoring.
10+
EOS
711

812
ensurable do
13+
desc 'Ensure connection validation'
914
defaultvalues
1015
defaultto :present
1116
end

lib/puppet/type/postgresql_psql.rb

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ def sync
2626
end
2727

2828
newparam(:unless) do
29-
desc 'An optional SQL command to execute prior to the main :command; ' \
30-
'this is generally intended to be used for idempotency, to check ' \
31-
'for the existence of an object in the database to determine whether ' \
32-
'or not the main SQL command needs to be executed at all.'
29+
desc <<-DOC
30+
An optional SQL command to execute prior to the main :command;
31+
this is generally intended to be used for idempotency, to check
32+
for the existence of an object in the database to determine whether
33+
or not the main SQL command needs to be executed at all.'
34+
DOC
3335

3436
# Return true if a matching row is found
3537
def matches(value)
@@ -45,10 +47,12 @@ def matches(value)
4547
end
4648

4749
newparam(:onlyif) do
48-
desc 'An optional SQL command to execute prior to the main :command; ' \
49-
'this is generally intended to be used for idempotency, to check ' \
50-
'for the existence of an object in the database to determine whether ' \
51-
'or not the main SQL command needs to be executed at all.'
50+
desc <<-DOC
51+
An optional SQL command to execute prior to the main :command;
52+
this is generally intended to be used for idempotency, to check
53+
for the existence of an object in the database to determine whether
54+
or not the main SQL command needs to be executed at all.
55+
DOC
5256

5357
# Return true if a matching row is found
5458
def matches(value)

lib/puppet/type/postgresql_replication_slot.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Puppet::Type.newtype(:postgresql_replication_slot) do
2-
@doc = "Manages Postgresql replication slots.
2+
@doc = <<-EOS
3+
@summary Manages Postgresql replication slots.
34
45
This type allows to create and destroy replication slots
56
to register warm standby replication on a Postgresql
67
master server.
7-
"
8+
EOS
89

910
ensurable
1011

0 commit comments

Comments
 (0)