We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b6c81ef + 5dd5428 commit 261425cCopy full SHA for 261425c
lib/puppet/provider/postgresql_conf/parsed.rb
@@ -18,13 +18,18 @@
18
:to_line => proc { |h|
19
20
# simple string and numeric values don't need to be enclosed in quotes
21
- dontneedquote = h[:value].match(/^(\w+)$/)
+ if h[:value].is_a?(Fixnum)
22
+ val = h[:value].to_s
23
+ else
24
+ val = h[:value]
25
+ end
26
+ dontneedquote = val.match(/^(\w+)$/)
27
dontneedequal = h[:name].match(/^(include|include_if_exists)$/i)
28
29
str = h[:name].downcase # normalize case
30
str += dontneedequal ? ' ' : ' = '
31
str += "'" unless dontneedquote && !dontneedequal
- str += h[:value]
32
+ str += val
33
34
str += " # #{h[:comment]}" unless (h[:comment].nil? or h[:comment] == :absent)
35
str
0 commit comments