Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xain chokes on IOList #436

Open
wants to merge 2 commits into
base: phx-1.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ex_admin/form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
48 changes: 35 additions & 13 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,56 @@ 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.
"""
]
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
[
Expand All @@ -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"},
Expand All @@ -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