cookbook 'cleanup', '= 0.0.2'
The cleanup cookbook has been deprecated
Author provided reason for deprecation:
The cleanup cookbook has been deprecated and is no longer being maintained by its authors. Use of the cleanup cookbook is no longer recommended.
cleanup (4) Versions 0.0.2 Follow2
Installs/Configures cleanup
cookbook 'cleanup', '= 0.0.2', :supermarket
knife supermarket install cleanup
knife supermarket download cleanup
Description
This cookbook creates a cleanup
resource to handle the cleanup of arbitrary paths based on number of files or last modified dates.
Attributes
-
name
- String representing a path glob so wildcards are totally fine. -
dry_run
-true
/false
Defaults tofalse
. Iftrue
will disable actual file operations.` -
files
-true
/false
Defaults totrue
. If false will ignore files during cleanup. -
directories
-true
/false
Defaults totrue
. If false will ignore directories during cleanup. -
sort_by
-:atime
/:ctime
/:mtime
Defaults to:mtime
. Sort the files to be deleted by their (a)ccess, (c)reate or (m)odified time.
keep_last
and older_than
are mutally exclusive since I can't think of any way combining them makes sense.
-
keep_last
- Takes an integer. Will keep that many files starting from the most recent. -
older_than
- Takes a hash that looks like{:time_increment => time_quantity}
. Increments can be one of [:minutes, :hours, :days, :weeks] (months are hard).
Usage
Include the cookbook then just call the cleanup
resource from your recipe like this:
Keep the most recent 5 files
cleanup "/your/path/here/*" do keep_last 5 end
Delete files older than 1 week
cleanup "/your/path/here/*" do older_than :weeks => 1 end
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.0.2 passed this metric
Contributing File Metric
0.0.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.0.2 failed this metric
FC074: LWRP should use DSL to define resource's default action: cleanup/resources/default.rb:1
Run with Foodcritic Version 12.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
0.0.2 passed this metric
No Binaries Metric
0.0.2 passed this metric
Testing File Metric
0.0.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.2 passed this metric
0.0.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.0.2 failed this metric
FC074: LWRP should use DSL to define resource's default action: cleanup/resources/default.rb:1
Run with Foodcritic Version 12.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
0.0.2 passed this metric
No Binaries Metric
0.0.2 passed this metric
Testing File Metric
0.0.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.2 failed this metric
Run with Foodcritic Version 12.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.0.2 passed this metric
No Binaries Metric
0.0.2 passed this metric
Testing File Metric
0.0.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.2 passed this metric
0.0.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.2 failed this metric