Skip to content

Commit a2c23da

Browse files
committed
refactor code loading conditionals in clients
1 parent f19c005 commit a2c23da

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/arangox/client/gun.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if Code.ensure_compiled(:gun) == {:module, :gun} do
1+
if Code.ensure_loaded?(:gun) do
22
defmodule Arangox.GunClient do
33
@moduledoc """
44
An HTTP client implementation of the \

lib/arangox/client/mint.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if Code.ensure_compiled(Mint.HTTP) == {:module, Mint.HTTP} do
1+
if Code.ensure_loaded?(Mint.HTTP1) do
22
defmodule Arangox.MintClient do
33
@moduledoc """
44
An HTTP client implementation of the \

lib/arangox/client/velocy.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if Code.ensure_compiled(VelocyPack) == {:module, VelocyPack} do
1+
if Code.ensure_loaded?(VelocyPack) do
22
defmodule Arangox.VelocyClient do
33
@moduledoc """
44
The default client. Implements the \

lib/arangox/connection.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ defmodule Arangox.Connection do
160160
do: {:ok, %{state | username: nil, password: nil}}
161161

162162
defp resolve_auth(%__MODULE__{client: VelocyClient} = state) do
163-
case VelocyClient.authorize(state) do
163+
case apply(VelocyClient, :authorize, [state]) do
164164
:ok ->
165165
{:ok, state}
166166

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Arangox.MixProject do
22
use Mix.Project
33

4-
@version "0.5.2"
4+
@version "0.5.3"
55
@description """
66
ArangoDB 3.3.9+ driver for Elixir with connection pooling, support for \
77
VelocyStream, active failover, transactions and streamed cursors.

0 commit comments

Comments
 (0)