diff options
author | Jeff McCune <jeff@puppetlabs.com> | 2012-05-10 22:25:14 -0700 |
---|---|---|
committer | Jeff McCune <jeff@puppetlabs.com> | 2012-05-10 22:25:14 -0700 |
commit | e8e2a16ce506955026395b4ddb4451484bd29835 (patch) | |
tree | f37c4919456066e42b4815233bc0e9c32bf4d176 /lib/puppet | |
parent | 11156fd29a6ccee64663a5a32cf0b37d1867cfb0 (diff) | |
parent | beaa812e107d41418586af3fc81b4c8ab2d73c07 (diff) | |
download | puppet-stdlib-e8e2a16ce506955026395b4ddb4451484bd29835.tar.gz puppet-stdlib-e8e2a16ce506955026395b4ddb4451484bd29835.tar.bz2 |
Merge branch '2.3.x'
* 2.3.x:
Update CHANGELOG for 2.3.2 release
Make file_line default to ensure => present
Memoize file_line spec instance variables
Fix spec tests using the new spec_helper
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/type/file_line.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb index 9f03771..8559cfa 100644 --- a/lib/puppet/type/file_line.rb +++ b/lib/puppet/type/file_line.rb @@ -23,18 +23,20 @@ Puppet::Type.newtype(:file_line) do EOT - ensurable + ensurable do + defaultto :present + end newparam(:name, :namevar => true) do - desc 'arbitrary name used as identity' + desc 'An arbitrary name used as the identity of the resource.' end newparam(:line) do - desc 'The line to be appended to the path.' + desc 'The line to be appended to the file located by the path parameter.' end newparam(:path) do - desc 'File to possibly append a line to.' + desc 'The file Puppet will ensure contains the line specified by the line parameter.' validate do |value| unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/)) raise(Puppet::Error, "File paths must be fully qualified, not '#{value}'") |