Skip to content

Commit f09248d

Browse files
committed
Let Elixir manage applications
And start optional dependencies in tests. This fixes warnings on Elixir v1.11. Closes #427. Closes #429.
1 parent d658bce commit f09248d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mix.exs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,9 @@ defmodule Tesla.Mixfile do
2727
#
2828
# Type `mix help compile.app` for more information
2929
def application do
30-
[applications: apps(Mix.env())]
30+
[extra_applications: [:logger, :ssl, :inets]]
3131
end
3232

33-
def apps(:test), do: apps(:dev) ++ [:httparrot, :hackney, :ibrowse, :gun, :finch]
34-
def apps(_), do: [:logger, :ssl, :inets]
35-
3633
defp description do
3734
"HTTP client library, with support for middleware and multiple adapters."
3835
end
@@ -78,7 +75,7 @@ defmodule Tesla.Mixfile do
7875
{:httparrot, "~> 1.2", only: :test},
7976
{:ex_doc, "~> 0.21", only: :dev},
8077
{:mix_test_watch, "~> 1.0", only: :dev},
81-
{:dialyxir, "~> 1.0", only: [:dev, :test]},
78+
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
8279
{:inch_ex, "~> 2.0", only: :docs}
8380
]
8481
end

test/test_helper.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
clients = [:ibrowse, :hackney, :gun, :finch, :castore, :mint]
2+
Enum.map(clients, &Application.ensure_all_started/1)
3+
14
ExUnit.configure(trace: false)
25
ExUnit.start()

0 commit comments

Comments
 (0)