mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +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
|
||||
true ->
|
||||
Ejabberd.Config.Store.stop
|
||||
Ejabberd.Config.Store.start_link
|
||||
Ejabberd.Config.Store.stop()
|
||||
Ejabberd.Config.Store.start_link()
|
||||
do_init(file_path)
|
||||
false ->
|
||||
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
|
||||
# First we need to start manually the store to be available
|
||||
# during the compilation of the config file.
|
||||
Ejabberd.Config.Store.start_link
|
||||
Ejabberd.Config.Store.start_link()
|
||||
Ejabberd.Config.init(:ejabberd_config.path())
|
||||
|
||||
Mix.shell.info "ejabberd modules"
|
||||
Mix.shell().info "ejabberd modules"
|
||||
|
||||
Ejabberd.Config.Store.get(:modules)
|
||||
|> Enum.reverse # Because of how mods are stored inside the store
|
||||
|> format_mods
|
||||
|> Mix.shell.info
|
||||
|> Mix.shell().info
|
||||
end
|
||||
|
||||
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(),
|
||||
elixirc_paths: ["lib"],
|
||||
compile_path: ".",
|
||||
compilers: [:asn1] ++ Mix.compilers,
|
||||
compilers: [:asn1] ++ Mix.compilers(),
|
||||
erlc_options: erlc_options(),
|
||||
erlc_paths: ["asn1", "src"],
|
||||
# Elixir tests are starting the part of ejabberd they need
|
||||
@ -260,7 +260,7 @@ defmodule Ejabberd.MixProject do
|
||||
end
|
||||
|
||||
# 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 ->
|
||||
:ok
|
||||
false ->
|
||||
@ -339,7 +339,7 @@ defmodule Mix.Tasks.Compile.Asn1 do
|
||||
def run(args) do
|
||||
{opts, _, _} = OptionParser.parse(args, switches: [force: :boolean])
|
||||
|
||||
project = Mix.Project.config
|
||||
project = Mix.Project.config()
|
||||
source_paths = project[:asn1_paths] || ["asn1"]
|
||||
dest_paths = project[:asn1_target] || ["src"]
|
||||
mappings = Enum.zip(source_paths, dest_paths)
|
||||
@ -361,7 +361,7 @@ defmodule Mix.Tasks.Compile.Asn1 do
|
||||
end
|
||||
|
||||
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())
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user