From 0a11709be2b06134de6acc64b14bbc13f46728d9 Mon Sep 17 00:00:00 2001 From: Jaap Frolich Date: Mon, 7 May 2018 10:07:03 +0800 Subject: [PATCH 1/2] fix issue with Phoenix.HTML.html_escape sometimes returning IOLists --- lib/ex_admin/form.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ex_admin/form.ex b/lib/ex_admin/form.ex index abfd58e2..6aed46b6 100644 --- a/lib/ex_admin/form.ex +++ b/lib/ex_admin/form.ex @@ -1367,7 +1367,7 @@ defmodule ExAdmin.Form do def escape_value(nil), do: nil def escape_value(value) when is_map(value), do: value def escape_value(value) do - Phoenix.HTML.html_escape(value) |> elem(1) + to_string(Phoenix.HTML.html_escape(value) |> elem(1)) end @doc false From 8c62dcda91a570faf8ac1d518296f9c6abc39a6c Mon Sep 17 00:00:00 2001 From: Jaap Frolich Date: Thu, 7 Jun 2018 13:11:12 +0800 Subject: [PATCH 2/2] fix warning in release --- mix.exs | 48 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/mix.exs b/mix.exs index b36d8590..ee92d228 100644 --- a/mix.exs +++ b/mix.exs @@ -4,19 +4,25 @@ defmodule ExAdmin.Mixfile do @version "0.9.1-dev" def project do - [ app: :ex_admin, + [ + app: :ex_admin, version: @version, elixir: "~> 1.4", - elixirc_paths: elixirc_paths(Mix.env), - compilers: [:phoenix, :gettext] ++ Mix.compilers, - build_embedded: Mix.env == :prod, - start_permanent: Mix.env == :prod, + elixirc_paths: elixirc_paths(Mix.env()), + compilers: [:phoenix, :gettext] ++ Mix.compilers(), + build_embedded: Mix.env() == :prod, + start_permanent: Mix.env() == :prod, name: "ExAdmin", docs: [extras: ["README.md"], main: "ExAdmin"], deps: deps(), package: package(), test_coverage: [tool: ExCoveralls], - preferred_cli_env: ["coveralls": :test, "coveralls.detail": :test, "coveralls.post": :test, "coveralls.html": :test], + preferred_cli_env: [ + coveralls: :test, + "coveralls.detail": :test, + "coveralls.post": :test, + "coveralls.html": :test + ], description: """ An Elixir Phoenix Auto Administration Package. """ @@ -24,17 +30,30 @@ defmodule ExAdmin.Mixfile do end def application do - [ applications: applications(Mix.env)] + [applications: applications(Mix.env())] end defp applications(:test) do [:plug, :cowboy | applications(:prod)] end + defp applications(_) do - [:gettext, :phoenix, :ecto, :inflex, :scrivener, :scrivener_ecto, :csvlixir, :logger, :ex_queb, :xain] + [ + :gettext, + :phoenix, + :ecto, + :inflex, + :scrivener, + :scrivener_ecto, + :csvlixir, + :logger, + :ex_queb, + :xain + ] end + defp elixirc_paths(:test), do: ["lib", "web", "test/support"] - defp elixirc_paths(_), do: ["lib", "web"] + defp elixirc_paths(_), do: ["lib", "web"] defp deps do [ @@ -50,7 +69,7 @@ defmodule ExAdmin.Mixfile do {:scrivener_ecto, "~> 1.1"}, {:xain, "~> 0.6"}, {:csvlixir, "~> 1.0.0"}, - {:exactor, "~> 2.2.0"}, + {:exactor, "~> 2.2.0", warn_missing: false}, {:ex_doc, "~> 0.11", only: :dev}, {:earmark, "~> 0.1", only: :dev}, {:ex_queb, "~> 1.0"}, @@ -61,9 +80,12 @@ defmodule ExAdmin.Mixfile do end defp package do - [ maintainers: ["Stephen Pallen", "Roman Smirnov"], + [ + maintainers: ["Stephen Pallen", "Roman Smirnov"], licenses: ["MIT"], - links: %{ "Github" => "https://github.com/smpallen99/ex_admin" }, - files: ~w(lib priv web README.md package.json mix.exs LICENSE brunch-config.js AdminLte-LICENSE)] + links: %{"Github" => "https://github.com/smpallen99/ex_admin"}, + files: + ~w(lib priv web README.md package.json mix.exs LICENSE brunch-config.js AdminLte-LICENSE) + ] end end