Used to compare erlang sys.config configuration file with the elixir .exs configuration file.
If available in Hex, the package can be installed as:
- Add
config_comparator
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:config_comparator, "~> 0.1.0"}]
end
```
- Ensure
config_comparator
is started before your application:
```elixir
def application do
[applications: [:config_comparator]]
end
```
ConfigComparator.Comparator.compare({{path_to_sysconfig}}, {{path_to_elixir_config}})
Difference found: {{:foo, foo}, :foo}
In exs config: [%{country: "England"}]
But in sys.config: [%{country: "England"}, %{country: "Germany"}]
Difference found: {{:bar, bar}, :bar}
In exs config: 90
But in sys.config: 100
No difference found!
# config/config.exs
e.g.
config :config_comparator, ignored_keys:
[{{:a, :b}, :c},
{{:foo, :bar}, :hello_world}]