]> gitweb.fluxo.info Git - puppet-stdlib.git/commit
(MODULES-2071) Refactor file_line provider to contain logic to handle parameter...
authorRaymond Maika <raymond.maika@cengn.ca>
Fri, 29 May 2015 04:27:08 +0000 (00:27 -0400)
committerRaymond Maika <raymond.maika@cengn.ca>
Fri, 29 May 2015 04:30:44 +0000 (00:30 -0400)
commit72089f3d134a00e64f0b3d81237a266131d40412
tree953c8cefbe63bf2a6e04299ba1995bf7f71f8e19
parent6cf64f1028cbb290a6254b5e753072f65c9336fa
 (MODULES-2071) Refactor file_line provider to contain logic to handle parameter multiple in function handle_create_with_after

Without this, file_line resource without the `match` parameter but with the `after` param will throw an error if there are multiple matches for the after expression. This patch creates the handling for the `multiple` parameter in handle_create_with_after. This allows you to add a line after the `after` expression if it appears at multiple points in a file.

Updated reference to `file_line` in the README to reflect that the multiple parameter can be set when using `after` and/or `match` as the matching regex.
README.markdown
lib/puppet/provider/file_line/ruby.rb
spec/unit/puppet/provider/file_line/ruby_spec.rb