Home

Awesome

Conform

Master Hex.pm Version

See the full documentation here.

The definition of conform is "Adapt or conform oneself to new or different conditions". As this library is used to adapt your application to its deployed environment, I think it's rather fitting. It's also a play on the word configuration, and the fact that Conform uses an init-style configuration, maintained in a .conf file.

Deprecation Notice

IMPORTANT: I am discontinuing maintenance of this project moving forward, in favor of a replacement based on TOML, found here. It is has a formal specification and supports much richer ways of expressing complex data (maps and lists), and supports several Elixir data types out of the box. The toml-elixir library also provides a simple transformation mechnanism for extending the basic set of datatypes with your own (including structs and records). Everything you could accomplish with Conform is doable with toml-elixir, and in a cleaner, easier to maintain format. In addition, it has full support for Distillery 2.0's config provider framework, allowing you to natively configure your Elixir releases with TOML config files

If anyone is interested in taking over maintainership of this library, please reach out to me here via issue, or by email, and I'll be glad to discuss the transition with you.


Features

It provides the following features:

Rationale

Conform was designed for Elixir applications which are deployed via releases built with exrm or distillery. It was created in order to resolve some painful issues with the configuration mechanisms provided out of the box by both Erlang and Elixir.

Elixir offers a convenient configuration mechanism via config/config.exs, but it has downsides:

Conform is intended to fix these problems in the following way:

I'm glad to hear from anyone using this on what problems they are having, if any, and any ideas you may have. Feel free to open issues on the tracker or come find me in #elixir-lang on freenode.

License

The .conf parser in conform_parse.peg is licensed under Apache 2.0, per Basho.

The rest of this project is licensed under the MIT license. Use as you see fit.