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

Add array-based include support #1

Open
barneywilliams opened this issue Oct 12, 2011 · 2 comments
Open

Add array-based include support #1

barneywilliams opened this issue Oct 12, 2011 · 2 comments

Comments

@barneywilliams
Copy link
Member

It would be handy to be able to include a given YAML submodule, but then after the fact override or merge in additional items. The proposed implementation is to allow the INCLUDE to be an array, and the inclusion of each file is done sequentially per specified ordering of array.

Would also be convenient to be able to specify the secondary items to merge into the base submodule verbatim instead of need to specify a separate file for overriding just 1 or 2 simple elements. Not sure it this would be feasible nor am I sure how that would be specified in the master YAML file.

@sw17ch
Copy link
Contributor

sw17ch commented Oct 12, 2011

Is this an appropriate example for the first issue?

main.yml

---
INCLUDE:
  - first_include.yml
  - second_include.yml
  - third_include.yml

first_include.yml

---
a: 1
b: 2
c: 3

second_include.yml

---
c: 5
d: 6
e: 7

third_include.yml

---
e: 10
f: 11
g: 12

combined.yml

---
a: 1
b: 2
c: 5
d: 6
e: 10
f: 11
g: 12

@barneywilliams
Copy link
Member Author

Yeah, looks good and straightforward to me. Would be good to write up a
little blurb talking about your motivations for throwing this together, as
well as how it applies to Ceedling as well. Also, noting why you thought it
would make a good standalone piece of code for general Ruby consumption.

"You have enemies? Good. That means youve stood up for something, sometime
in your life." ~ Winston Churchill

On Wed, Oct 12, 2011 at 12:07 PM, John Van Enk <
[email protected]>wrote:

Is this an appropriate example for the first issue?

main.yml

---
INCLUDE:
 - first_include.yml
 - second_include.yml
 - third_include.yml

first_include.yml

---
a: 1
b: 2
c: 3

second_include.yml

---
c: 5
d: 6
e: 7

third_include.yml

---
e: 10
f: 11
g: 12

combined.yml

---
a: 1
b: 2
c: 5
d: 6
e: 10
f: 11
g: 12

Reply to this email directly or view it on GitHub:
#1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants