Skip to content

Added suport to drive calling janitor_directory through attribute settin...#2

Open
arieplugge wants to merge 3 commits into
xeon22:masterfrom
arieplugge:master
Open

Added suport to drive calling janitor_directory through attribute settin...#2
arieplugge wants to merge 3 commits into
xeon22:masterfrom
arieplugge:master

Conversation

@arieplugge

Copy link
Copy Markdown

...gs.

See the README

  • Fixed a few things
  • when it encounters a directory the file delete fails obviously, only
    include real files in the list.
  • declare windosw a supported platform, I have tested it.
    Forward slahs as separator though: F:/backup/log as a directory
  • one instance of an empty array catch was missing
  • recursive did not work properly.
  • bumped the version to 1.0.4

…tings.

See the README
+ Fixed a few things
- when it encounters a directory the file delete fails obviously, only
  include real files in the list.
- declare windosw a supported platform, I have tested it.
  Forward slahs as separator though: F:/backup/log as a directory
- one instance of an empty array catch was missing
- recursive did not work properly.
- bumped the version to 1.0.4
@svanharmelen

Copy link
Copy Markdown

👍

@MrMMorris

Copy link
Copy Markdown

+1 this fixed my problem with the LWRP not being loaded and getting an error

However, the regex examples in the README still don't work. the first example is missing the closing backslash I think? so ruby syntax checker complains. The other 2 result in undefined methodeach' for #Janitor::Directory:0x00000004d211b8`

I also think it should be noted that at least one of the attributes (exclude_all, include_only, age, size) is required for the LWRP to work or you run into the same error as above. I had tried to just have janitor_directory '/foor/bar' because I wanted to clear out everything in the directory.

Either way, thanks for the fix!

@MrMMorris

Copy link
Copy Markdown

@arieplugge I have submitted a PR on your fork to fix the issues I experienced

arieplugge#1

@xeon22

xeon22 commented Nov 20, 2014

Copy link
Copy Markdown
Owner

This update will need some rework to integrate it properly now that the other changes have been merged. Also, I don't like the idea of shipping a default recipe in this library only cookbook. The intended use here is to include this cookbook in your own via a depends, and use the resources from there.

llsouzabr added a commit to llsouzabr/chef-janitor that referenced this pull request Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants