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

Type the inspec profile attributes #196

Merged
merged 1 commit into from Feb 16, 2017

Conversation

Projects
None yet
2 participants
@alexpop
Collaborator

alexpop commented Feb 16, 2017

Some document stores like ElasticSearch don't like values that change type. This change converts all profile attribute defaults to string and adds a 'type' key to store the original type.

Some testing improvements.

@alexpop alexpop self-assigned this Feb 16, 2017

type profiles attributes
Signed-off-by: Alex Pop <apop@chef.io>

@alexpop alexpop requested a review from arlimus Feb 16, 2017

@arlimus

This comment has been minimized.

Show comment
Hide comment
@arlimus

arlimus Feb 16, 2017

Contributor

I like it, thank you Alex!

fyi we had a discussion today on this field. InSpec is doing the right thing with keeping the type intact inside the JSON. however some systems just don't understand how to handle that.

2 workarounds, that keep the type intact, are adding a type field or double-encoding it into a json-string. we choose the former here.

Kudos Alex 👍

Contributor

arlimus commented Feb 16, 2017

I like it, thank you Alex!

fyi we had a discussion today on this field. InSpec is doing the right thing with keeping the type intact inside the JSON. however some systems just don't understand how to handle that.

2 workarounds, that keep the type intact, are adding a type field or double-encoding it into a json-string. we choose the former here.

Kudos Alex 👍

@arlimus arlimus merged commit 0a5888d into master Feb 16, 2017

2 checks passed

DCO This commit has a DCO Signed-off-by
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@arlimus arlimus removed the in progress label Feb 16, 2017

@adamleff adamleff deleted the ap/type-attributes branch Feb 16, 2017

@adamleff adamleff restored the ap/type-attributes branch Feb 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment