From: Christopher Date: Fri, 20 Mar 2020 21:54:07 +0000 (-0500) Subject: move configs to router namespace X-Git-Url: http://git.entropealabs.com/?a=commitdiff_plain;h=refs%2Fheads%2Frouter-implementation;p=wampex_router.git move configs to router namespace --- diff --git a/config/config.exs b/config/config.exs index 7a4a5ae..1321bb3 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,12 +1,12 @@ use Mix.Config -config :wampex, Wampex.Router.Authentication.Repo, +config :wampex_router, Wampex.Router.Authentication.Repo, database: "authentication", hostname: "localhost", port: 26_257, username: "root" -config :cluster_kv, +config :wampex_router, topologies: [ kv: [ strategy: Cluster.Strategy.Epmd, @@ -19,6 +19,6 @@ config :cluster_kv, ] ] -config :wampex, +config :wampex_router, ecto_repos: [Wampex.Router.Authentication.Repo], keylen: 32 diff --git a/lib/router/authentication/repo.ex b/lib/router/authentication/repo.ex index 9fe8e40..e423625 100644 --- a/lib/router/authentication/repo.ex +++ b/lib/router/authentication/repo.ex @@ -1,5 +1,5 @@ defmodule Wampex.Router.Authentication.Repo do use Ecto.Repo, - otp_app: :wampex, + otp_app: :wampex_router, adapter: Ecto.Adapters.Postgres end diff --git a/lib/router/authentication/user.ex b/lib/router/authentication/user.ex index 65bf4f9..8d3e8a2 100644 --- a/lib/router/authentication/user.ex +++ b/lib/router/authentication/user.ex @@ -42,7 +42,7 @@ defmodule Wampex.Router.Authentication.User do end def create(authid: authid, password: password, realm: realm) do - keylen = Application.get_env(:wampex, :keylen) + keylen = Application.get_env(:wampex_router, :keylen) salt = Crypto.random_string(keylen) iterations = Enum.random(10_000..50_000) diff --git a/test/wampex_test.exs b/test/wampex_test.exs index 3544821..7a12881 100644 --- a/test/wampex_test.exs +++ b/test/wampex_test.exs @@ -27,7 +27,7 @@ defmodule WampexTest do @device "as987d9a8sd79a87ds" setup_all do - topologies = Application.get_env(:cluster_kv, :topologies) + topologies = Application.get_env(:wampex_router, :topologies) [ server: