Skip to content

Support the yaml extension for parameter files#203

Merged
patrobinson merged 5 commits intomasterfrom
yaml-and-yml
Feb 21, 2018
Merged

Support the yaml extension for parameter files#203
patrobinson merged 5 commits intomasterfrom
yaml-and-yml

Conversation

@patrobinson
Copy link
Copy Markdown
Contributor

No description provided.

@patrobinson patrobinson requested a review from viraptor December 14, 2017 01:01
@patrobinson patrobinson changed the title Support the yaml extention for parameter files Support the yaml extension for parameter files Dec 14, 2017
Comment thread lib/stack_master/stack_definition.rb Outdated
File.join(base_dir, 'parameters', a, "#{underscored_stack_name}.yml")
[
File.join(base_dir, 'parameters', a, "#{underscored_stack_name}.yml"),
File.join(base_dir, 'parameters', a, "#{underscored_stack_name}.yaml"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this merge both contents, or does it prefer yml? (and should that be documented somewhere?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, it prefers yml now and it's documented and tested

Patrick Robinson added 2 commits December 14, 2017 13:43
Prefer yml files over yaml files
Create tests to ensure the behaviour is consistent
File.join(base_dir, 'parameters', "#{underscored_stack_name}.yaml"),
File.join(base_dir, 'parameters', "#{underscored_stack_name}.yml"),
]
end
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we should rename these methods to _paths?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've refactored the repetitive bit out. Most of the time we'd only return one path now as it's using a Glob

@patrobinson patrobinson merged commit dab34f4 into master Feb 21, 2018
@patrobinson patrobinson deleted the yaml-and-yml branch February 21, 2018 03:41
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

Successfully merging this pull request may close these issues.

3 participants