Skip to content

Commit

Permalink
Rename App
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Aug 19, 2022
1 parent a296524 commit b506abb
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 28 deletions.
10 changes: 5 additions & 5 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
import Config

# Configure Mix tasks and generators
config :athena,
config :athena_logistics,
ecto_repos: [Athena.Repo],
generators: [context_app: :athena, binary_id: true]
generators: [context_app: :athena_logistics, binary_id: true]

config :athena, Athena.Repo,
config :athena_logistics, Athena.Repo,
migration_primary_key: [id: :uuid, type: :binary_id],
migration_foreign_key: [column: :id, type: :binary_id],
migration_timestamps: [type: :utc_datetime_usec]

# Configures the endpoint
config :athena, AthenaWeb.Endpoint,
config :athena_logistics, AthenaWeb.Endpoint,
url: [host: "localhost"],
render_errors: [view: AthenaWeb.ErrorView, accepts: ~w(html json)],
pubsub_server: Athena.PubSub,
live_view: [signing_salt: "rEImWHdz"]

config :athena, AthenaWeb.Gettext, default_locale: "de"
config :athena_logistics, AthenaWeb.Gettext, default_locale: "de"

# Configures Elixir's Logger
config :logger, :console,
Expand Down
4 changes: 2 additions & 2 deletions config/dev.exs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Config

config :athena, Athena.Repo, show_sensitive_data_on_connection_error: true
config :athena_logistics, Athena.Repo, show_sensitive_data_on_connection_error: true

config :athena, AthenaWeb.Endpoint,
config :athena_logistics, AthenaWeb.Endpoint,
debug_errors: true,
code_reloader: true,
check_origin: false,
Expand Down
2 changes: 1 addition & 1 deletion config/prod.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import Config

config :athena, AthenaWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
config :athena_logistics, AthenaWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
8 changes: 4 additions & 4 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Config

case config_env() do
:prod ->
config :athena, AthenaWeb.Endpoint, server: true
config :athena_logistics, AthenaWeb.Endpoint, server: true

_env ->
nil
Expand Down Expand Up @@ -42,7 +42,7 @@ database_connection_params =
[url: url]
end

config :athena,
config :athena_logistics,
Athena.Repo,
[
ssl: database_ssl,
Expand All @@ -63,7 +63,7 @@ port =
)
)

config :athena, AthenaWeb.Endpoint,
config :athena_logistics, AthenaWeb.Endpoint,
url: [
host: System.get_env("EXTERNAL_HOST", "localhost"),
port: System.get_env("EXTERNAL_PORT", "#{port}"),
Expand Down Expand Up @@ -92,7 +92,7 @@ config :logger,
)
)

config :athena, Plug.BasicAuth,
config :athena_logistics, Plug.BasicAuth,
username: System.get_env("BASIC_AUTH_USERNAME", "admin"),
password: System.get_env("BASIC_AUTH_PASSWORD", "admin"),
realm: System.get_env("BASIC_AUTH_REALM", "Admin Area")
4 changes: 2 additions & 2 deletions config/test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Config

config :athena, Athena.Repo, pool: Ecto.Adapters.SQL.Sandbox
config :athena_logistics, Athena.Repo, pool: Ecto.Adapters.SQL.Sandbox

config :athena, AthenaWeb.Endpoint,
config :athena_logistics, AthenaWeb.Endpoint,
server: false,
debug_errors: true
2 changes: 1 addition & 1 deletion lib/athena/release.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Athena.Release do
installed.
"""

@app :athena
@app :athena_logistics

def migrate do
load_app()
Expand Down
2 changes: 1 addition & 1 deletion lib/athena/repo.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule Athena.Repo do
use Ecto.Repo,
otp_app: :athena,
otp_app: :athena_logistics,
adapter: Ecto.Adapters.Postgres
end
10 changes: 5 additions & 5 deletions lib/athena/telemetry.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ defmodule Athena.Telemetry do
reporter_options: [
buckets: power_two_durations(-8, 16)
],
event_name: [:athena, :repo, :query],
event_name: [:athena_logistics, :repo, :query],
measurement: :total_time,
unit: {:native, :millisecond}
),
Expand All @@ -70,7 +70,7 @@ defmodule Athena.Telemetry do
reporter_options: [
buckets: power_two_durations(-8, 16)
],
event_name: [:athena, :repo, :query],
event_name: [:athena_logistics, :repo, :query],
measurement: :decode_time,
unit: {:native, :millisecond}
),
Expand All @@ -79,7 +79,7 @@ defmodule Athena.Telemetry do
reporter_options: [
buckets: power_two_durations(-8, 16)
],
event_name: [:athena, :repo, :query],
event_name: [:athena_logistics, :repo, :query],
measurement: :query_time,
unit: {:native, :millisecond}
),
Expand All @@ -88,7 +88,7 @@ defmodule Athena.Telemetry do
reporter_options: [
buckets: power_two_durations(-8, 16)
],
event_name: [:athena, :repo, :query],
event_name: [:athena_logistics, :repo, :query],
measurement: :queue_time,
unit: {:native, :millisecond}
),
Expand All @@ -97,7 +97,7 @@ defmodule Athena.Telemetry do
reporter_options: [
buckets: power_two_durations(-8, 16)
],
event_name: [:athena, :repo, :query],
event_name: [:athena_logistics, :repo, :query],
measurement: :idle_time,
unit: {:native, :millisecond}
),
Expand Down
6 changes: 3 additions & 3 deletions lib/athena_web/endpoint.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule AthenaWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :athena
use Phoenix.Endpoint, otp_app: :athena_logistics
use Absinthe.Phoenix.Endpoint

# The session will be stored in the cookie and signed,
Expand All @@ -26,7 +26,7 @@ defmodule AthenaWeb.Endpoint do
# when deploying your static files in production.
plug Plug.Static,
at: "/",
from: :athena,
from: :athena_logistics,
gzip: false,
only: ~w(css fonts images js favicon.ico robots.txt)

Expand All @@ -36,7 +36,7 @@ defmodule AthenaWeb.Endpoint do
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
plug Phoenix.LiveReloader
plug Phoenix.CodeReloader
plug Phoenix.Ecto.CheckRepoStatus, otp_app: :athena
plug Phoenix.Ecto.CheckRepoStatus, otp_app: :athena_logistics
end

plug Phoenix.LiveDashboard.RequestLogger,
Expand Down
2 changes: 1 addition & 1 deletion lib/athena_web/gettext.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ defmodule AthenaWeb.Gettext do
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
"""
use Gettext, otp_app: :athena
use Gettext, otp_app: :athena_logistics
end
2 changes: 1 addition & 1 deletion lib/athena_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,5 @@ defmodule AthenaWeb.Router do
end

defp auth(conn, _opts),
do: Plug.BasicAuth.basic_auth(conn, Application.fetch_env!(:athena, Plug.BasicAuth))
do: Plug.BasicAuth.basic_auth(conn, Application.fetch_env!(:athena_logistics, Plug.BasicAuth))
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Athena.MixProject do

def project do
[
app: :athena,
app: :athena_logistics,
version: "0.0.0",
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
Expand Down
2 changes: 1 addition & 1 deletion test/support/conn_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ defmodule AthenaWeb.ConnCase do
setup do
Gettext.put_locale(AthenaWeb.Gettext, "en")

config = Application.fetch_env!(:athena, Plug.BasicAuth)
config = Application.fetch_env!(:athena_logistics, Plug.BasicAuth)

header_content = "Basic " <> Base.encode64("#{config[:username]}:#{config[:password]}")

Expand Down

0 comments on commit b506abb

Please sign in to comment.