defmodule PhoenixKit do @moduledoc """ PhoenixKit """ @doc """ Returns the current version of PhoenixKit. ## Examples iex> PhoenixKit.version() "1.1.0" """ @spec version() :: String.t() def version do Application.spec(:phoenix_kit, :vsn) |> to_string() end @doc """ Validates if PhoenixKit is properly configured. Checks for required configuration keys and returns a status. ## Examples iex> PhoenixKit.configured?() false """ @spec configured?() :: boolean() def configured? do case Application.get_env(:phoenix_kit, :repo) do nil -> false _repo -> true end end @doc """ Returns PhoenixKit configuration. ## Examples iex> PhoenixKit.config() %{repo: []} """ @spec config() :: map() def config do :phoenix_kit |> Application.get_all_env() |> Enum.into(%{}) end end