Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delete_regex #605

Merged
merged 1 commit into from May 16, 2016
Merged

Add delete_regex #605

merged 1 commit into from May 16, 2016

Conversation

jyaworski
Copy link

To maintain backwards compatibility, add a third parameter to the delete
function to specify what type the second should be interpreted as. This
is needed for cases where the regex matcher is overzealous.

This was uncovered while testing this against @smoeding's sendmail module as seen here:

smoeding/puppet-sendmail#8

@smoeding
Copy link
Contributor

Either that or introduce a new function delete_regex to clearly indicate a new functionality.

Trying to add the regex functionality to the delete function without giving the user control where the parameter should be used as literal or as regex is a disaster waiting to happen. Just think of all the characters (like '.', '*' or '?') that have a special meaning when used in a regex.

@hunner
Copy link
Contributor

hunner commented May 13, 2016

Yeah, I think delete_regex would make more sense from a UX perspective :)

To maintain backwards compatibility, add a delete_regex function instead
of modifying delete itself.
@jyaworski jyaworski changed the title Add a third param for the delete function Add delete_regex May 13, 2016
@jyaworski
Copy link
Author

@hunner done.

@jonnytdevops jonnytdevops merged commit b7e1f89 into puppetlabs:master May 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants