dry-configurable
dry-configurable copied to clipboard
A simple mixin to make Ruby classes configurable
Hiya, Really new to this project and dry-rb in general, so I don't expect to hit the mark on my first try, but this PR fixes #109 I'm curious if...
## Describe the bug Dry validation combined with `dry-configurable:0.13.0` raises a `Dry::Schema::MissingMessageError` exception when the validated attribute is an enum and the actual value isn't one of the listed enums....
## Describe the bug Right now `default:` value is evaluated at the time of declaration, so object is always created. For [karafka logger](https://github.com/karafka/karafka/blob/master/lib/karafka/setup/config.rb#L29) ```ruby setting :logger, ::Karafka::Instrumentation::Logger.new ``` this caused...
This would better support the use case in https://github.com/dry-rb/dry-system/pull/162 (see https://github.com/dry-rb/dry-system/pull/162#discussion_r613203242 for specific notes), in which all the settings from one class are "imported" into another for use there too....
This is something @solnic mentioned a while ago as a change he'd like to see for 1.0.0. Opening this so we can have the discussion as whether this is something...
RIght now, the [suggested way](https://dry-rb.org/gems/dry-configurable/0.8/testing/) to test configurable classes looks like this: ```ruby require "dry/configurable/test_interface" # this is your module/class that extended by Dry::Configurable module AwesomeModule enable_test_interface end before(:all) {...
This PR adopts a “copy in write” approach for handling `config` between classes and their subclasses, with a view to reducing memory usage as much as possible. The `config` object...
If you include or extend dry-configurable like so: ```ruby extend Dry::Configurable(default_undefined: true) ``` Then `Undefined` will become the default value for all settings instead of `nil` (when no setting-specific default...