Closed robbmanes closed 6 years ago
I'm wondering if we should just change it to [\W]
at this point, i.e. anything that's not a letter or number.
Valid point - rebased commit to match \W
for any/all special characters. If you think I should add a spec for each one let me know and I'd be happy to do so.
@robbmanes There are some existing specs for testing stuff. They seem to pass, but if you wouldn't mind adding one, that would be great. You can pretty much copy this:
https://github.com/ManageIQ/azure-armrest/blob/master/spec/models/base_model_spec.rb#L217-L222
Sorry, don't think I was very clear; I did in the rebase for 50d3a91 - I meant if you wanted more symbols than the ones I was testing against (added pound sign and colon) like parenthesis or anything else other than the ones I already added.
@robbmanes oops, nah, that should be fine.
👍
Similarly to commit 845d11a (pr 329) it is possible for a colon to be present in keys of a BaseModel. This patch allows for colons to be converted to underscores like we do for periods and dollar signs.
Addresses https://bugzilla.redhat.com/show_bug.cgi?id=1548153