Add load_metadata_json function#483
Merged
hunner merged 1 commit intopuppetlabs:masterfrom Jul 31, 2015
Merged
Conversation
Contributor
|
👍 |
Contributor
|
Can we have a few unit tests which check error handling and the major interactions in the function? |
Contributor
|
The two examples you might want to look at https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/spec/functions/has_ip_network_spec.rb for a set of simple tests and https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/spec/functions/assert_private_spec.rb for stubbing stuff on the scope and other things. |
f377cf4 to
d94733c
Compare
Contributor
Author
|
Hi David, I've created some really basic tests. Since the function looks on the filesystem for a file I'm not sure exactly how to test this part. |
d94733c to
794af1f
Compare
This function loads the metadata.json into a puppet variable. This enables a number of neat things such as: * Which version of the module am I using? 2.x? 3.x? * Which author of the module am I using? puppetlabs? example42?
794af1f to
f411ee7
Compare
hunner
added a commit
that referenced
this pull request
Jul 31, 2015
Add load_metadata_json function
Contributor
Author
|
Thanks a bunch to @hunner for helping me with this for #puppethack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This function loads the metadata.json into a puppet variable. This enables a number of neat things such as: