-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fixes #5378: We need a method for the mustache template #93
Fixes #5378: We need a method for the mustache template #93
Conversation
@@ -0,0 +1,49 @@ | |||
##################################################################################### | |||
# Copyright 2013 Normation SAS |
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 think you mean 2014 :)
Assuming you add the "mustache" attribute, and that there is an equivalent value for "non-mustache aka legacy" templates, I think this method has too much duplication with the original file_expand_template method. I would prefer that we continue using the "absolutely DRY" principle we have been up to here, and introduce a new bundle called What do you think? |
Also, in this case, the |
Last but not least, we should really have an automatic test (see the tests/acceptance) directory for this method too. |
Updated |
# @class_prefix file_template_expand_mustache | ||
# @class_parameter target_file | ||
# | ||
# This bundle will define a class file_template_expand_mustache_${target_file}_{kept,repaired,error,ok,reached} |
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.
These last comments are not up to date with the classes that will be generated
updated |
# | ||
##################################################################################### | ||
|
||
# @name File from template mustache |
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 looks kinda weird. This name will be displayed as the human name everywhere - in ncf-builder, and in Rudder's reporting. Can we reword it to "File from template (Mustache format)"?
Aside from these 2 comments, this looks great! We're still missing a test though. |
updated with test |
…e_mustache_template Fixes #5378: We need a method for the mustache template
PR rebased |
Wrong one! |
yes, just a failed test with rudder-dev |
Copied from file_template_expand.cf