0exp / qonfig

Powerful configuration Ruby-framework with a support for many commonly used config formats with a multi-functional API, developer-friendly DSL and object-oriented behavior.
MIT License
23 stars 8 forks source link

[pretty-print] Issues with pretty_print plugin #105

Closed tycooon closed 4 years ago

tycooon commented 4 years ago

Here is the example script:

require "qonfig"
require "pp"
require "set"

Qonfig.plugin(:pretty_print)

class Config < Qonfig::DataSet
  setting :ns do
    setting "foo.bar"
  end
end

pp Config.new # => Setting with <foo> key does not exist! (Qonfig::UnknownSettingError)
  1. A dot in namespaced setting key breaks the pretty_print.
  2. I have to manually require pp and set std libs which is not very handy.