Closed wkozaczuk closed 6 years ago
Hey @wkozaczuk thank you so much for investing your time in this. Based on your description, the only problem was that resulting yaml had timestamp enclosed in quotes?
created: "2018-09-18"
vs.
created: 2018-09-18
?
If yes, then I would suggest we update expectations in unit tests instead. I don't see a problem if quote is in yaml - parsing quoted string should yield exactly same result as unquoted, right? In fact it's probably even better to have it quoted in case it contains some columns :
as they would break yaml syntax.
WDYT? Sorry to come up with the idea after you've done all the work to get rid of those quotes...
The yaml.v2 library apparently changed at some point to start quoting string values when marshaling to YAML if their value was found to be an RFC3339 timestamp.
This undesired change makes package YAML files produced by capstan to contain quoted 'created' field and break some unit tests.
To that extent this patch provides a "brute force" workaround by essentially replacing any quoted RFC3339 timestamp fields with its unquoted version.
Signed-off-by: Waldemar Kozaczuk jwkozaczuk@gmail.com