]> gitweb.fluxo.info Git - puppet-stdlib.git/commit
(maint) Improve the tests and readability of file_line
authorJeff McCune <jeff@puppetlabs.com>
Thu, 29 Aug 2013 23:27:27 +0000 (16:27 -0700)
committerJeff McCune <jeff@puppetlabs.com>
Thu, 29 Aug 2013 23:27:27 +0000 (16:27 -0700)
commit948be0bb99374c699d79eb11c00366a6e2d2f977
tree546d9cdf7c0abe256587742d59f17ed3005fcb27
parent221277e8522b42bf170fded6ea23dfc526703b07
(maint) Improve the tests and readability of file_line

Without this patch the implementation of the file_line provider is a bit
convoluted with respect to the newly introduced "after" parameter.

This patch addresses the problem by separating out the concerns of each
case into their own methods of handling the behavior with the match
parameter, handling the behavior with the after parameter, or simply
appending the line.
lib/puppet/provider/file_line/ruby.rb
spec/unit/puppet/provider/file_line/ruby_spec.rb