Bug #32915
open
Transform setting keys to symbols automatically
Added by Lukas Zapletal about 3 years ago.
Updated about 3 years ago.
Description
I do not know why we use the super-weird :setting: "xyz" syntax but it is confusing. This is not a typical YAML. It is not a typical UNIX config. It's some kind of Ruby-YAML hybrid.
This patch converts all keys to symbols, we can do a followup puppet update and write all config files without the colons.
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/smart-proxy/pull/791 added
For what it's worth, we do the exact same thing in Foreman. It's the result of calling to_yaml on a hash with a symbol:
[4] pry(main)> puts ({a: 'b'}.to_yaml)
---
:a: b
In Python it's part of the string:
print(yaml.dump({':a': 'b'}))
:a: b
Also available in: Atom
PDF