Project

General

Profile

Actions

Bug #32915

open

Transform setting keys to symbols automatically

Added by Lukas Zapletal almost 3 years ago. Updated almost 3 years ago.

Status:
Ready For Testing
Priority:
Normal
Category:
Core
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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.

Actions #1

Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/791 added
Actions #2

Updated by Ewoud Kohl van Wijngaarden almost 3 years ago

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

Actions

Also available in: Atom PDF