Skip to content

Conversation

@jasonkarns
Copy link

Rake ships with clean and clobber tasks out of the box. Now the audit Task can be (optionally) registered for cleaning.

It defaults to off so no change from current behavior. If opted-in, the audit-database path is added to rake's CLOBBER collection.

Clean is meant to remove temporary and generated files that are the result of "normal" application runs.
Clobber is intended to be a more exhaustive clean that returns the application's state to a "fresh cloned" state.

With these conventions, the ruby advisory db fits more cleanly (ha) into the "clobber" category.

prior art: Bundler's gem tasks itself:
https://github.com/ruby/rubygems/blob/master/bundler/lib/bundler/gem_tasks.rb#L3-L4

Bundler's tasks register the pkg path for clobbering unconditionally, but I think that makes sense given the limited scope of the pkg path. Since the ruby advisory db is written to a path outside of one's project, I believe the task should be more conservative in its deletion. Hence making it opt-in.

This PR does not yet have tests. If this enhancement is a viable candidate, I can add tests and documentation.

Rake ships with clean and clobber tasks out of the box.
Now the audit Task can be (optionally) registered for cleaning.

It defaults to off so no change from current behavior. If opted-in, the
audit-database path is added to rake's CLOBBER collection.

Clean is meant to remove temporary and generated files that are the
result of "normal" application runs.
Clobber is intended to be a more exhaustive clean that returns the
application's state to a "fresh cloned" state.

With these conventions, the ruby advisory db fits more cleanly (ha) into
the "clobber" category.
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.

1 participant