Skip to content

[MODULES-2370] file_line.rb: Fix line attribute validation #585

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

Merged
merged 1 commit into from Apr 7, 2016
Merged

[MODULES-2370] file_line.rb: Fix line attribute validation #585

merged 1 commit into from Apr 7, 2016

Conversation

ghost
Copy link

@ghost ghost commented Mar 28, 2016

file_line type: During validation, do not require line attribute if:

  • ensure is absent,
  • match is not empty,
  • and match_for_absence is true.

Also update spec tests to reflect this.

`file_line` type: During validation, do not require `line` attribute if:
* `ensure` is `absent`,
* `match` is not empty,
* and `match_for_absence` is `true`.

Also update `spec` tests to reflect this.
@aleksey-novikov
Copy link

@jearls Looks good! 👍

@jimr6007
Copy link

jimr6007 commented Apr 7, 2016

even with the "line" param specified and using stdlib version 4.11, should this functionality be working? Meaning, the ability to remove a line from a file if the "match" param matches any line in the file?

@hunner hunner merged commit be1ff3f into puppetlabs:master Apr 7, 2016
@ghost ghost deleted the MODULES-2370-update-validate-to-not-require-line-when-matching-for-absence branch September 12, 2016 20:30
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.

4 participants