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

pretty config (that properly sorts) #175

Merged
merged 4 commits into from
Aug 22, 2015
Merged

Conversation

aj-jester
Copy link

Generate pretty consul config, initially suggested by @teaforthecat.

  • Can be toggled via pretty_config param, defaults to false.
  • Indentation length can also be toggled.
  • Updated config.pp and services.pp to use pretty generate.
  • Updated checks.pp and watches.pp to use consul_sorted_json().
  • Updated docs on how to use consul_sorted_json().

❗ view it without whitespace

@aj-jester aj-jester force-pushed the AJ-pretty-generate-config branch 5 times, most recently from b48b679 to 8248454 Compare August 22, 2015 03:44
aj-jester added 3 commits August 21, 2015 23:45
* Defaults to `false` to keep original behavior
* Toggle indent length
* Update config.pp with pretty params
* Update service.pp with pretty params
@teaforthecat
Copy link

Wow, nice work, this is great!

@aj-jester
Copy link
Author

Thanks! 😄

I updated the tests for the function as well and the credit goes to you (@teaforthecat) for writing such awesome tests in the original PR #165 👍

@aj-jester
Copy link
Author

I added this function to a gist so it can be used for other things as well https://gist.github.com/aj-jester/e0078c38db9eb7c1ef45

@solarkennedy
Copy link
Contributor

Thank you @aj-jester. I still think that json is for machines and that pretty printing is for jq, but I'm willing to concede because of the external demand. Thank you for submitting such a comprehensive PR!

solarkennedy added a commit that referenced this pull request Aug 22, 2015
@solarkennedy solarkennedy merged commit f71da01 into master Aug 22, 2015
@aj-jester
Copy link
Author

@solarkennedy Thanks dude. I agree with you, and I too prefer external tools for pretty. I just took this as a challenge for myself to see if it was even possible. I'm glad it turned out the way it did :bowtie:

@aj-jester aj-jester deleted the AJ-pretty-generate-config branch August 23, 2015 01:28
@teaforthecat
Copy link

This is very much appreciated. Thanks guys!

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