From b2c2013b4df7c0e5b9d637dcbc663c9ccffb902d Mon Sep 17 00:00:00 2001 From: Moritz Date: Fri, 26 Dec 2025 21:40:12 +0100 Subject: [PATCH] refactor: extract sql_sandbox config to Mv.Config module Centralize application-wide configuration values for better maintainability. --- lib/mv/config.ex | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/mv/config.ex diff --git a/lib/mv/config.ex b/lib/mv/config.ex new file mode 100644 index 0000000..5e6ba90 --- /dev/null +++ b/lib/mv/config.ex @@ -0,0 +1,24 @@ +defmodule Mv.Config do + @moduledoc """ + Configuration helper functions for the application. + + Provides centralized access to configuration values to avoid + magic strings/atoms scattered throughout the codebase. + """ + + @doc """ + Returns whether SQL sandbox mode is enabled. + + SQL sandbox mode is typically enabled in test environments + to allow concurrent database access in tests. + + ## Returns + + - `true` if SQL sandbox is enabled + - `false` otherwise + """ + @spec sql_sandbox?() :: boolean() + def sql_sandbox? do + Application.get_env(:mv, :sql_sandbox, false) + end +end