summaryrefslogtreecommitdiff
path: root/lib/chef/resource/file.rb
Commit message (Collapse)AuthorAgeFilesLines
* chef-client => Chef::Dist::CLIENTMarc Chamberland2019-04-261-2/+3
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* Skip more resources and set others to desired state falseresource_descriptionsTim Smith2018-10-301-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove some default values in descriptionsTim Smith2018-07-251-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove smart quotesTim Smith2018-07-251-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove references to a docs sectionTim Smith2018-07-251-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add descriptions to file resourceTim Smith2018-07-251-7/+22
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Updates from the reviewmisc_resourceTim Smith2018-03-041-3/+3
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add new introduced and description resource properties to many resourceTim Smith2018-02-141-1/+2
| | | | | | Not all of them, but a good chunk. Signed-off-by: Tim Smith <tsmith@chef.io>
* Convert node map to last-writer-wins for tiesLamont Granquist2018-01-221-1/+1
| | | | | | | | | | | | We still bind preferentially by specificity, but for ties with specificity we now prefer last-writer-wins instead of the alphabetic by class name method we had before (that was never documented and I'm pretty certain nobody understood). So now `provides(:whatever) { true }` in a cookbook should always win over core. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add descriptions and @since comments to all resourcesTim Smith2017-12-191-0/+1
| | | | | | From the docs site Signed-off-by: Tim Smith <tsmith@chef.io>
* Cleanup some YARD warningsyard2Tim Smith2017-12-131-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix a few bad copyrightsTim Smith2016-10-201-1/+1
| | | | | | I think this happened when we merged the Opscode and Chef copyrights Signed-off-by: Tim Smith <tsmith@chef.io>
* add a test for non-utf8 chars in filenames in the file provider (#5335)Lamont Granquist2016-09-161-1/+1
| | | fix non-utf8 filename issues in the file provider (again)
* /etc/hosts needs to be non-atomic on dockerAndrew Brown2016-05-311-1/+1
|
* Switch to node attributes for docker detectionAndrew Brown2016-05-301-1/+1
| | | | | Using ::File.exists? makes Travis CI sad due to statically looking for files. We'll use node attributes provided by Ohai instead.
* Style fixesAndrew Brown2016-05-301-3/+2
| | | | Fixing rubocop errors found during CI
* File atomic update default: false on docker filesAndrew Brown2016-05-301-1/+7
| | | | | | If unspecified, the default setting for atomic updates on docker special files should be 'false' to avoid Errno::EBUSY. This allows for a cookbook author to override this behaviour if desired.
* autofixing whitespace copsLamont Granquist2016-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-021-2/+2
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Fix nil with properties:John Keiser2016-01-271-1/+1
| | | | | | 1. Warn when default values are invalid. 2. Never validate nil (on set or get) if there is no default. 3. Emit "will be invalid in Chef 13" warning when setting an invalid nil value.
* Use double quotes by defaultThom May2016-01-141-4/+4
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* sort propertiesLamont Granquist2015-12-141-3/+3
|
* remove unnecessary identity_attr declarationLamont Granquist2015-12-141-2/+0
|
* regex works fine inside the is arrayLamont Granquist2015-12-141-1/+1
|
* can be less verbose about creating ArraysLamont Granquist2015-12-141-1/+1
|
* why is 'identity' different than 'name_property'?Lamont Granquist2015-12-141-1/+1
|
* is: vs. regex: is differentLamont Granquist2015-12-141-1/+1
|
* stop mutating the default arrayLamont Granquist2015-12-141-1/+1
|
* unnecessary array argLamont Granquist2015-12-141-1/+1
|
* implement verifications as a propertyLamont Granquist2015-12-141-7/+3
| | | | | | the unit tests on this one did some excessive stubbing/mocking, i just let them create a real verification object which the 'true' or 'false' then failed (for real).
* convert to true/false/nil in propertiesLamont Granquist2015-12-141-7/+7
|
* make file resource use propertiesLamont Granquist2015-12-141-70/+9
|
* Overwrite resource_name with providesJohn Keiser2015-06-081-1/+0
|
* Add default_action and allowed_actions to Resource class, remove from LWRPJohn Keiser2015-06-011-2/+2
|
* Add use_automatic_resource_nameJohn Keiser2015-06-011-1/+1
|
* Make resource_name call providesJohn Keiser2015-06-011-1/+1
|
* Move resource_name up to Resource, and figure out its value automaticallyJohn Keiser2015-06-011-1/+0
|
* test state_for_resource_reporter on file resourceLamont Granquist2015-05-011-1/+1
| | | | and fix it to hit the right key.
* create Chef::Resource#state_for_resource_reporterLamont Granquist2015-05-011-0/+18
| | | | | | Use this to override the state reported by the resource reporter while avoiding the collision over Chef::Resource#state being used by some LWRPs.
* Change @user_verifications to @verificationsSteven Danna2015-02-171-3/+3
|
* Implement RFC 027 File VerificationSteven Danna2015-02-171-0/+14
| | | | | | | | This implements usable-suppliable file content verification per RFC 027. Users can supplie a block, string, or symbol to the `verify` resource attribute. Blocks will be called, string will be executed as shell commands (respecing the same options as not_if and only_if), and symbols can be used to access built-in registered validations.
* Chef-12 RC Provider ResolverLamont Granquist2014-10-241-3/+1
| | | | | makes resource and provider class resolution more dynamic. begins deprecation of Chef::Platform static mapping.
* PR #1428 review fixesSergey Sergeev2014-06-101-9/+0
| | | | | * remove unnecessary sensitive attribute definition in resource/file * call sensitive method on correct object in failure inpector
* If a resource is sensitive, it’s redacted from logs.Allen Goodman2013-11-151-1/+8
|
* Use symlink source when inspecting current permissionsdanielsdeleo2013-07-021-0/+2
| | | | | | | | | | | Fixes CHEF-4341 http://tickets.opscode.com/browse/CHEF-4341 When manage_symlink_source is enabled, File providers update current_resource with the security attributes of the source file. Subsequent actions (e.g., running FileAccessControl) use the values set on current_resource to determine if they need to modify the system, so setting them incorrect leads to a file resource being (not) updated incorrectly.
* Allow file resources to manage files via symlinkdanielsdeleo2013-06-261-0/+9
| | | | | | | | | | Fixes CHEF-4312 http://tickets.opscode.com/browse/CHEF-4312 Adds resource attribute `manage_symlink_source` to file resource and descendents. When true, file resources will manage the source file when a symlink exists at the destination path. When nil (default), the source file is managed, but a warning is emitted. When false, symlinks are not followed. In Chef 12, the default should be changed to false.
* Convert file_resource.atomic_update property values to boolean.sersut2013-06-031-1/+1
|
* Remove binmode property from file / remote_directory resources and always ↵sersut2013-05-301-9/+0
| | | | operate in binmode.
* Rename file config parameters to be file_atomic_update & ↵sersut2013-05-201-3/+3
| | | | file_staging_uses_destdir