settingslogic
settingslogic copied to clipboard
A simple and straightforward settings solution that uses an ERB enabled YAML file and a singleton design pattern.
I've updated SettingsLogic to support multiple files, in order to allow local environments to override settings in source control managed global files as needed.
Consider this settings.yaml file: ``` defaults: &defaults foo: bar: "baz" q: "bert" development: "bert"} -- in other words, dev selectively overwrites the settings hash tree. What you get instead is...
...by delegating method_missing to Hash in the specific case. On newer rubies, Array#flatten calls #to_ary on everything in the array, which raises a MissingSetting error from a Settingslogic object. This...
We really liked the simplicity of this gem, but for our use we need the ability to layer configuration settings. Essentially, this allows you to provide an array of config...
Example: ``` class Defaults < Settingslogic .... suppress_errors true end Defaults.get('some.nonexistent.property') # Boom! ```
Hi, this pull request removes the extra tabs in the list of links. :smile:
Clean version of this pull-request: https://github.com/binarylogic/settingslogic/pull/36
Any plans to support %Z - Time zone abbreviation name?