Re: [Puppet Users] property file provider

David Kavanagh
Tue, 23 Aug 2011 21:08:20 -0000

Like a charm!
What designates the fields in the regex? I''m having trouble finding
documentation on that part.

David

On Tue, Aug 23, 2011 at 4:59 PM, Stefan Schulte
<stefan.schulte@taunusstein.net> wrote:
> On Tue, Aug 23, 2011 at 04:19:40PM -0400, David Kavanagh wrote:
>> for reference, here''s how the regex matches the trailing
comment;
>> http://rubular.com/r/vJUtBWpB6J
>>
>
> Yes, rubular shows all fields but the last field is in fact nil and not an
> empty string. Try to replace
>
>  str += " # #{hash[:comment]}" if hash[:comment] != :absent
>
> with
>
>  str += " # #{hash[:comment]}" unless hash[:comment].nil?
>
> Does this work?
>
> -Stefan