diff --git a/lib/kazan/server.ex b/lib/kazan/server.ex index b33f6ec..cb9c07a 100644 --- a/lib/kazan/server.ex +++ b/lib/kazan/server.ex @@ -34,19 +34,7 @@ defmodule Kazan.Server do """ @spec from_kubeconfig(String.t(), Keyword.t()) :: t def from_kubeconfig(config_file, options \\ []) do - # YamlElixir made a breaking change in a minor version, so we need to make - # sure we call the appropriate function for the version installed. - # Can hopefully get rid of this at some point. - Code.ensure_loaded(YamlElixir) - - func = - if Kernel.function_exported?(YamlElixir, :read_from_file!, 1) do - :read_from_file! - else - :read_from_file - end - - data = apply(YamlElixir, func, [config_file]) + data = YamlElixir.read_from_file!(config_file) basepath = config_file |> Path.absname() |> Path.dirname() diff --git a/mix.exs b/mix.exs index 125e79c..16ad924 100644 --- a/mix.exs +++ b/mix.exs @@ -41,7 +41,7 @@ defmodule Kazan.Mixfile do defp deps do [{:poison, "~> 2.0 or ~> 3.0"}, {:httpoison, "~> 0.10 or ~> 1.0"}, - {:yaml_elixir, "~> 1.3"}, + {:yaml_elixir, "~> 2.0"}, # Dev dependencies {:ex_doc, "~> 0.14", only: :dev},