Allow symbol value via ENV
This PR converts string starting with : to symbol. Allows symbol value via ENV.
Config::Options when overriding settings via ENV variables is enabled and parsing ENV variable values is enabled should recognize strings starting with : as symbols.
But strings starting with :: will be left intact.
Ex:
# Given the following environment:
SETTINGS__SECTION__SERVER_TYPE=:remote
SETTINGS__SECTION__SERVER_ACCESS=::ENABLED
# The following settings will be available:
Settings.section.server_type # => :remote
Settings.section.server_access # => '::ENABLED'
String#strip is used for removing whitespace characters from string inputs, such as: ' :remote ', ' : ', ' : remote '
.gsub is used to replace characters with the help of regex pattern match
.tr to covert to snakecase
.downcase to transform uppercase letters to lowercase
Ref: https://github.com/rubyconfig/config/issues/286
The tests have passed, can the PR be reviewed?
Closing because this is stale. I'm open to the idea, but the particular implementation here needs some work.