-
-
Notifications
You must be signed in to change notification settings - Fork 84
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 user/group/mode parameter to custom types #129
base: master
Are you sure you want to change the base?
Conversation
a2fe174
to
b4d8368
Compare
b4d8368
to
bd05228
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds conditional logic with regards to the regex's. Because of this the spec tests should test that invalid data triggers the errors as expected.
newproperty(:mode) do | ||
desc 'mode of the file' | ||
validate do |value| | ||
unless value =~ %r{^0\d\d\d$} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you test against stdlib's filemode type which has testing instead of this regex which does not really cover valid modes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give me any further hints what you mean ? I also have no idea how to use Stlib::Filemode type for this property. As far as I can see, if Stdlib::Filemode is used, we need some more logic to adapt for the setter/getter to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you can use type aliases in types (yes, that's confusing; naming is hard).
bd05228
to
11346f0
Compare
This partly implements Issue voxpupuli#95 (missing is default)
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
11346f0
to
114d852
Compare
This adds the possibility to directly specify user/group and mode for key, request, cert and dh.
In a second step the manifests could be simplified (no need for file resources setting permissions).