mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Update syntax of function calls as recommended by Elixir compiler
This commit is contained in:
parent
6d596063de
commit
40333066d6
@ -36,8 +36,8 @@ defmodule Ejabberd.Config do
|
|||||||
|
|
||||||
case force do
|
case force do
|
||||||
true ->
|
true ->
|
||||||
Ejabberd.Config.Store.stop
|
Ejabberd.Config.Store.stop()
|
||||||
Ejabberd.Config.Store.start_link
|
Ejabberd.Config.Store.start_link()
|
||||||
do_init(file_path)
|
do_init(file_path)
|
||||||
false ->
|
false ->
|
||||||
if not init_already_executed, do: do_init(file_path)
|
if not init_already_executed, do: do_init(file_path)
|
||||||
|
@ -14,15 +14,15 @@ defmodule Mix.Tasks.Ejabberd.Deps.Tree do
|
|||||||
def run(_argv) do
|
def run(_argv) do
|
||||||
# First we need to start manually the store to be available
|
# First we need to start manually the store to be available
|
||||||
# during the compilation of the config file.
|
# during the compilation of the config file.
|
||||||
Ejabberd.Config.Store.start_link
|
Ejabberd.Config.Store.start_link()
|
||||||
Ejabberd.Config.init(:ejabberd_config.path())
|
Ejabberd.Config.init(:ejabberd_config.path())
|
||||||
|
|
||||||
Mix.shell.info "ejabberd modules"
|
Mix.shell().info "ejabberd modules"
|
||||||
|
|
||||||
Ejabberd.Config.Store.get(:modules)
|
Ejabberd.Config.Store.get(:modules)
|
||||||
|> Enum.reverse # Because of how mods are stored inside the store
|
|> Enum.reverse # Because of how mods are stored inside the store
|
||||||
|> format_mods
|
|> format_mods
|
||||||
|> Mix.shell.info
|
|> Mix.shell().info
|
||||||
end
|
end
|
||||||
|
|
||||||
defp format_mods(mods) when is_list(mods) do
|
defp format_mods(mods) when is_list(mods) do
|
||||||
|
8
mix.exs
8
mix.exs
@ -8,7 +8,7 @@ defmodule Ejabberd.MixProject do
|
|||||||
elixir: elixir_required_version(),
|
elixir: elixir_required_version(),
|
||||||
elixirc_paths: ["lib"],
|
elixirc_paths: ["lib"],
|
||||||
compile_path: ".",
|
compile_path: ".",
|
||||||
compilers: [:asn1] ++ Mix.compilers,
|
compilers: [:asn1] ++ Mix.compilers(),
|
||||||
erlc_options: erlc_options(),
|
erlc_options: erlc_options(),
|
||||||
erlc_paths: ["asn1", "src"],
|
erlc_paths: ["asn1", "src"],
|
||||||
# Elixir tests are starting the part of ejabberd they need
|
# Elixir tests are starting the part of ejabberd they need
|
||||||
@ -260,7 +260,7 @@ defmodule Ejabberd.MixProject do
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Mix/Elixir lower than 1.11.0 use config/releases.exs instead of runtime.exs
|
# Mix/Elixir lower than 1.11.0 use config/releases.exs instead of runtime.exs
|
||||||
case Version.match?(System.version, "~> 1.11") do
|
case Version.match?(System.version(), "~> 1.11") do
|
||||||
true ->
|
true ->
|
||||||
:ok
|
:ok
|
||||||
false ->
|
false ->
|
||||||
@ -339,7 +339,7 @@ defmodule Mix.Tasks.Compile.Asn1 do
|
|||||||
def run(args) do
|
def run(args) do
|
||||||
{opts, _, _} = OptionParser.parse(args, switches: [force: :boolean])
|
{opts, _, _} = OptionParser.parse(args, switches: [force: :boolean])
|
||||||
|
|
||||||
project = Mix.Project.config
|
project = Mix.Project.config()
|
||||||
source_paths = project[:asn1_paths] || ["asn1"]
|
source_paths = project[:asn1_paths] || ["asn1"]
|
||||||
dest_paths = project[:asn1_target] || ["src"]
|
dest_paths = project[:asn1_target] || ["src"]
|
||||||
mappings = Enum.zip(source_paths, dest_paths)
|
mappings = Enum.zip(source_paths, dest_paths)
|
||||||
@ -361,7 +361,7 @@ defmodule Mix.Tasks.Compile.Asn1 do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def manifests, do: [manifest()]
|
def manifests, do: [manifest()]
|
||||||
defp manifest, do: Path.join(Mix.Project.manifest_path, @manifest)
|
defp manifest, do: Path.join(Mix.Project.manifest_path(), @manifest)
|
||||||
|
|
||||||
def clean, do: Erlang.clean(manifest())
|
def clean, do: Erlang.clean(manifest())
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user