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

(MODULES-1200) Fix inconsistent header across files #389

Merged
merged 1 commit into from
Feb 6, 2015
Merged

(MODULES-1200) Fix inconsistent header across files #389

merged 1 commit into from
Feb 6, 2015

Conversation

stdietrich
Copy link

Currently, the file headers are not consistent. Most of the files do not even have header, due to the usage of the content attribute of the file resource.

This PR fixes that, all files are now ERB templates and a single header is used across all files.
I tried to follow the request in the referenced ticket to use a concat style, e.g. global setting to enable/disable/modify the header.
However, I found no proper way to do this. This module consists of a lot of subclasses, which can be used independently of the main apt class.
Even with a global parameter, I had troubles with parse order. Adding this parameter to every subclass seems not like a clean way either.

My current implementation is a compromise with the _header.erb file.

One solution might be Hiera (quick hack: stdietrich/puppetlabs-apt@c9266d26d6ee9a63865480764f628902be500b13)

@daenney
Copy link

daenney commented Dec 1, 2014

I'm not okay with the use of scope.function_template(). The correct way of doing it is simply specifying two templates in the template() call, they get merged together into a single string as documented in the function reference.

@stdietrich
Copy link
Author

@daenney
I have updated the PR, scope.function_template() is no longer used.
Additionally, I fixed an issue in spec/classes/apt_spec.rb, where I did not properly escape the regex match.

@daenney
Copy link

daenney commented Dec 8, 2014

Argh, nokogiri and Ruby 1.8. Your PR is good, we just need to sort out a dependency issue before we can merge this.

@daenney
Copy link

daenney commented Jan 22, 2015

Can you debase this? It should pass now.

@stdietrich
Copy link
Author

Sorry for the delay, should be good to merge now.

daenney added a commit that referenced this pull request Feb 6, 2015
(MODULES-1200) Fix inconsistent header across files
@daenney daenney merged commit 83ae566 into puppetlabs:master Feb 6, 2015
@LukasAud LukasAud added the bugfix label Jun 6, 2023
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