Move helper functions of emoji manager task down in the file

This commit is contained in:
Ekaterina Vaartis 2019-04-18 15:47:49 +03:00
parent 06db3ee1a8
commit c5b7286b5f

View file

@ -11,22 +11,6 @@ defmodule Mix.Tasks.Pleroma.Emoji do
@default_manifest "https://git.pleroma.social/vaartis/emoji-index/raw/master/index.json" @default_manifest "https://git.pleroma.social/vaartis/emoji-index/raw/master/index.json"
defp fetch_manifest(from) do
Tesla.get!(from).body |> Poison.decode!()
end
defp parse_global_opts(args) do
OptionParser.parse(
args,
strict: [
manifest: :string
],
aliases: [
m: :manifest
]
)
end
def run(["ls-packs" | args]) do def run(["ls-packs" | args]) do
Application.ensure_all_started(:hackney) Application.ensure_all_started(:hackney)
@ -146,4 +130,20 @@ defmodule Mix.Tasks.Pleroma.Emoji do
end end
end end
end end
defp fetch_manifest(from) do
Tesla.get!(from).body |> Poison.decode!()
end
defp parse_global_opts(args) do
OptionParser.parse(
args,
strict: [
manifest: :string
],
aliases: [
m: :manifest
]
)
end
end end