danielberkompas / cloak

Elixir encryption library designed for Ecto
MIT License
582 stars 55 forks source link

vault can be re-started #114

Closed predrag-rakic closed 8 months ago

predrag-rakic commented 2 years ago

Do not crash if vault is started more than once. Instead return {:error, {:already_started, <pid>}} so it can be handled by caller, which is proper OTP behavior I believe.

coveralls commented 2 years ago

Coverage Status

Coverage increased (+1.0%) to 98.98% when pulling 86add859f34b44ce0916302cc1c90a7caabc5d87 on predrag-rakic:pr/vault_restart into 6685152d968d7e61562872f100b0c5cb0bc0a186 on danielberkompas:master.

danielberkompas commented 8 months ago

This would be a breaking change, because init/1 must now return {:continue, :save_config} in order for the vault to work properly. Any users who have overridden the init/1 function would need to update their override or their vaults will break.

danielberkompas commented 8 months ago

This was fixed by #123.