veracross / consult

Configuration and secrets management for Rails
MIT License
12 stars 0 forks source link

Support multiple file sources for a single template #14

Closed sixfeetover closed 6 years ago

sixfeetover commented 6 years ago

This will concatenate the contents of each file together to form a single template, which will then be rendered once. This addresses #6.

Technically we support both :path and :paths at the same time, but that's a silly scenario. However, it's not worth preventing.

This also adds support for a vars block in the template configuration file, which could be useful for relatively static values, or situations where you are sharing a template across multiple code bases.

aharpervc commented 6 years ago

Should this code guarantee a newline between files?

sixfeetover commented 6 years ago

We discussed that, and I do not think so. The templates should just be formatted properly IMO.

We also discussed adding a join_delimiter setting in the template config, where you could specify something like \n. However, I'm not sure how needed that would be.