diff options
author | Kenny Ballou <kennyballou@users.noreply.github.com> | 2016-10-07 19:59:58 -0600 |
---|---|---|
committer | Sam Seay <sam@manuka.co> | 2016-10-08 14:59:58 +1300 |
commit | 0615b46466cece8ce2160cc5093365f6dfe2081e (patch) | |
tree | 02d14e88b8e4ab35e1998576ac896d53154a62ab /config | |
parent | 0584037b09355e8e574227dfa74aedb139d6a1a2 (diff) | |
download | recaptcha-0615b46466cece8ce2160cc5093365f6dfe2081e.tar.gz recaptcha-0615b46466cece8ce2160cc5093365f6dfe2081e.tar.xz |
Refactor configuration variable lookup (#13)
Refactor configuration variable lookup.
Change the `Application.get_env/3` calls to use `Recaptcha.Config.get_env/3` to perform the lookups. Doing so allows the project to defer environment variable lookup to runtime instead of only at compile-time.
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/config.exs b/config/config.exs index 3c34501..1b4e60c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -3,7 +3,7 @@ use Mix.Config config :recaptcha, verify_url: "https://www.google.com/recaptcha/api/siteverify", timeout: 5000, - public_key: System.get_env("RECAPTCHA_PUBLIC_KEY"), - secret: System.get_env("RECAPTCHA_PRIVATE_KEY") + public_key: {:system, "RECAPTCHA_PUBLIC_KEY"}, + secret: {:system, "RECAPTCHA_PRIVATE_KEY"} import_config "#{Mix.env}.exs" |