Skip to content
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 mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ defmodule ScrivenerHtml.Mixfile do
[
{:scrivener, "~> 1.2 or ~> 2.0"},
{:phoenix_html, "~> 2.2"},
{:phoenix, "~> 1.0 and < 1.5.0", optional: true},
{:phoenix, "~> 1.5", optional: true},
{:plug, "~> 1.1"},
{:ex_doc, "~> 0.19", only: :dev},
{:earmark, "~> 1.1", only: :dev}
Expand Down
25 changes: 13 additions & 12 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
%{
"decimal": {:hex, :decimal, "1.1.2", "79a769d4657b2d537b51ef3c02d29ab7141d2b486b516c109642d453ee08e00c", [:mix], []},
"earmark": {:hex, :earmark, "1.3.1", "73812f447f7a42358d3ba79283cfa3075a7580a3a2ed457616d6517ac3738cb9", [:mix], [], "hexpm"},
"earmark": {:hex, :earmark, "1.4.5", "62ffd3bd7722fb7a7b1ecd2419ea0b458c356e7168c1f5d65caf09b4fbdd13c8", [:mix], [], "hexpm", "b7d0e6263d83dc27141a523467799a685965bf8b13b6743413f19a7079843f4f"},
"ecto": {:hex, :ecto, "1.1.8", "0f0348e678fa5a450c266d69816808f97fbd82ade32cf88d4b09bbe8f8c27545", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, optional: false]}, {:mariaex, "~> 0.5.0 or ~> 0.6.0", [hex: :mariaex, optional: true]}, {:poison, "~> 1.0 or ~> 2.0", [hex: :poison, optional: true]}, {:poolboy, "~> 1.4", [hex: :poolboy, optional: false]}, {:postgrex, "~> 0.11.0", [hex: :postgrex, optional: true]}, {:sbroker, "~> 0.7", [hex: :sbroker, optional: true]}]},
"ex_doc": {:hex, :ex_doc, "0.19.3", "3c7b0f02851f5fc13b040e8e925051452e41248f685e40250d7e40b07b9f8c10", [:mix], [{:earmark, "~> 1.2", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
"makeup": {:hex, :makeup, "0.8.0", "9cf32aea71c7fe0a4b2e9246c2c4978f9070257e5c9ce6d4a28ec450a839b55f", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"},
"makeup_elixir": {:hex, :makeup_elixir, "0.13.0", "be7a477997dcac2e48a9d695ec730b2d22418292675c75aa2d34ba0909dcdeda", [:mix], [{:makeup, "~> 0.8", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.22.1", "9bb6d51508778193a4ea90fa16eac47f8b67934f33f8271d5e1edec2dc0eee4c", [:mix], [{:earmark, "~> 1.4.0", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "d957de1b75cb9f78d3ee17820733dc4460114d8b1e11f7ee4fd6546e69b1db60"},
"makeup": {:hex, :makeup, "1.0.3", "e339e2f766d12e7260e6672dd4047405963c5ec99661abdc432e6ec67d29ef95", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "2e9b4996d11832947731f7608fed7ad2f9443011b3b479ae288011265cdd3dad"},
"makeup_elixir": {:hex, :makeup_elixir, "0.14.1", "4f0e96847c63c17841d42c08107405a005a2680eb9c7ccadfd757bd31dabccfb", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f2438b1a80eaec9ede832b5c41cd4f373b38fd7aa33e3b22d9db79e640cbde11"},
"meck": {:hex, :meck, "0.8.4", "59ca1cd971372aa223138efcf9b29475bde299e1953046a0c727184790ab1520", [:rebar, :make], []},
"mime": {:hex, :mime, "1.3.0", "5e8d45a39e95c650900d03f897fbf99ae04f60ab1daa4a34c7a20a5151b7a5fe", [:mix], [], "hexpm"},
"nimble_parsec": {:hex, :nimble_parsec, "0.5.0", "90e2eca3d0266e5c53f8fbe0079694740b9c91b6747f2b7e3c5d21966bba8300", [:mix], [], "hexpm"},
"mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm", "6cbe761d6a0ca5a31a0931bf4c63204bceb64538e664a8ecf784a9a6f3b875f1"},
"nimble_parsec": {:hex, :nimble_parsec, "0.6.0", "32111b3bf39137144abd7ba1cce0914533b2d16ef35e8abc5ec8be6122944263", [:mix], [], "hexpm", "27eac315a94909d4dc68bc07a4a83e06c8379237c5ea528a9acff4ca1c873c52"},
"pavlov": {:git, "https://github.com/sproutapp/pavlov.git", "7f3c0d7c75c8c2875e21b495511a291194bfc85a", []},
"phoenix": {:hex, :phoenix, "1.4.0", "56fe9a809e0e735f3e3b9b31c1b749d4b436e466d8da627b8d82f90eaae714d2", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 1.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm"},
"phoenix_html": {:hex, :phoenix_html, "2.9.3", "1b5a2122cbf743aa242f54dced8a4f1cc778b8bd304f4b4c0043a6250c58e258", [:mix], [{:plug, "~> 1.0", [hex: :plug, optional: false]}]},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "1.1.1", "6668d787e602981f24f17a5fbb69cc98f8ab085114ebfac6cc36e10a90c8e93c", [:mix], [], "hexpm"},
"plug": {:hex, :plug, "1.7.1", "8516d565fb84a6a8b2ca722e74e2cd25ca0fc9d64f364ec9dbec09d33eb78ccd", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}], "hexpm"},
"plug_crypto": {:hex, :plug_crypto, "1.0.0", "18e49317d3fa343f24620ed22795ec29d4a5e602d52d1513ccea0b07d8ea7d4d", [:mix], [], "hexpm"},
"phoenix": {:hex, :phoenix, "1.5.3", "bfe0404e48ea03dfe17f141eff34e1e058a23f15f109885bbdcf62be303b49ff", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8e16febeb9640d8b33895a691a56481464b82836d338bb3a23125cd7b6157c25"},
"phoenix_html": {:hex, :phoenix_html, "2.14.2", "b8a3899a72050f3f48a36430da507dd99caf0ac2d06c77529b1646964f3d563e", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "58061c8dfd25da5df1ea0ca47c972f161beb6c875cd293917045b92ffe1bf617"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.0.0", "a1ae76717bb168cdeb10ec9d92d1480fec99e3080f011402c0a2d68d47395ffb", [:mix], [], "hexpm", "c52d948c4f261577b9c6fa804be91884b381a7f8f18450c5045975435350f771"},
"plug": {:hex, :plug, "1.10.3", "c9cebe917637d8db0e759039cc106adca069874e1a9034fd6e3fdd427fd3c283", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "01f9037a2a1de1d633b5a881101e6a444bcabb1d386ca1e00bb273a1f1d9d939"},
"plug_crypto": {:hex, :plug_crypto, "1.1.2", "bdd187572cc26dbd95b87136290425f2b580a116d3fb1f564216918c9730d227", [:mix], [], "hexpm", "6b8b608f895b6ffcfad49c37c7883e8df98ae19c6a28113b02aa1e9c5b22d6b5"},
"poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], [], "hexpm"},
"poolboy": {:hex, :poolboy, "1.5.1", "6b46163901cfd0a1b43d692657ed9d7e599853b3b21b95ae5ae0a777cf9b6ca8", [:rebar], []},
"scrivener": {:hex, :scrivener, "2.2.1", "5a84cdfc042e3c318a03f965d8197b8294676a8fff7c4a29e482a90c467ebf19", [:mix], []},
"scrivener": {:hex, :scrivener, "2.7.0", "fa94cdea21fad0649921d8066b1833d18d296217bfdf4a5389a2f45ee857b773", [:mix], [], "hexpm", "30da36a427f2519cf75993271fb7c5aad1759682a70f90d880a85c3d743d2c57"},
"telemetry": {:hex, :telemetry, "0.4.2", "2808c992455e08d6177322f14d3bdb6b625fbcfd233a73505870d8738a2f4599", [:rebar3], [], "hexpm", "2d1419bd9dda6a206d7b5852179511722e2b18812310d304620c7bd92a13fcef"},
}
82 changes: 41 additions & 41 deletions test/scrivener/html_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ defmodule Scrivener.HTMLTest do

describe "Phoenix conn()" do
test "handles no entries" do
use Phoenix.ConnTest
import Phoenix.ConnTest
Application.put_env(:scrivener_html, :view_style, :bootstrap)
Application.put_env(:scrivener_html, :routes_helper, MyApp.Router.Helpers)

Expand All @@ -339,7 +339,7 @@ defmodule Scrivener.HTMLTest do
"li",
[[32, "class", 61, 34, "active", 34]],
62,
[60, "a", [[32, "class", 61, 34, "", 34]], 62, "1", 60, 47, "a", 62],
[60, "a", [[32, "class", 61, 34, [], 34]], 62, "1", 60, 47, "a", 62],
60,
47,
"li",
Expand All @@ -366,7 +366,7 @@ defmodule Scrivener.HTMLTest do
end

test "allows other url parameters" do
use Phoenix.ConnTest
import Phoenix.ConnTest
Application.put_env(:scrivener_html, :view_style, :bootstrap)
Application.put_env(:scrivener_html, :routes_helper, MyApp.Router.Helpers)

Expand All @@ -387,7 +387,7 @@ defmodule Scrivener.HTMLTest do
end

describe "View Styles" do
use Phoenix.ConnTest
import Phoenix.ConnTest

test "renders Semantic UI styling" do
assert {:safe,
Expand Down Expand Up @@ -428,7 +428,7 @@ defmodule Scrivener.HTMLTest do
"li",
[[32, "class", 61, 34, "current", 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "1", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "1", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -437,9 +437,9 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "2", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "2", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -448,14 +448,14 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[
60,
"span",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
"&gt;&gt;",
[[[] | "&gt;"] | "&gt;"],
60,
47,
"span",
Expand Down Expand Up @@ -496,14 +496,14 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[
60,
"span",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
"&lt;&lt;",
[[[] | "&lt;"] | "&lt;"],
60,
47,
"span",
Expand All @@ -517,9 +517,9 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "1", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "1", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -528,9 +528,9 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "2", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "2", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -541,7 +541,7 @@ defmodule Scrivener.HTMLTest do
"li",
[[32, "class", 61, 34, "current", 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "3", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "3", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -550,9 +550,9 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "4", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "4", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -561,9 +561,9 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "5", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "5", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -572,9 +572,9 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "6", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "6", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -583,9 +583,9 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "7", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "7", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -594,9 +594,9 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "8", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "8", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -607,7 +607,7 @@ defmodule Scrivener.HTMLTest do
"li",
[[32, "class", 61, 34, "ellipsis", 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, [], 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -616,9 +616,9 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[60, "span", [[32, "class", 61, 34, "", 34]], 62, "10", 60, 47, "span", 62],
[60, "span", [[32, "class", 61, 34, [], 34]], 62, "10", 60, 47, "span", 62],
60,
47,
"li",
Expand All @@ -627,14 +627,14 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[
60,
"span",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
"&gt;&gt;",
[[[] | "&gt;"] | "&gt;"],
60,
47,
"span",
Expand Down Expand Up @@ -736,7 +736,7 @@ defmodule Scrivener.HTMLTest do
"li",
[[32, "class", 61, 34, "active", 34]],
62,
[60, "a", [[32, "class", 61, 34, "", 34]], 62, "1", 60, 47, "a", 62],
[60, "a", [[32, "class", 61, 34, [], 34]], 62, "1", 60, 47, "a", 62],
60,
47,
"li",
Expand All @@ -747,7 +747,7 @@ defmodule Scrivener.HTMLTest do
"li",
[[32, "class", 61, 34, "waves-effect", 34]],
62,
[60, "a", [[32, "class", 61, 34, "", 34]], 62, "2", 60, 47, "a", 62],
[60, "a", [[32, "class", 61, 34, [], 34]], 62, "2", 60, 47, "a", 62],
60,
47,
"li",
Expand All @@ -758,7 +758,7 @@ defmodule Scrivener.HTMLTest do
"li",
[[32, "class", 61, 34, "waves-effect", 34]],
62,
[60, "a", [[32, "class", 61, 34, "", 34]], 62, "&gt;&gt;", 60, 47, "a", 62],
[60, "a", [[32, "class", 61, 34, [], 34]], 62, [[[] | "&gt;"] | "&gt;"], 60, 47, "a", 62],
60,
47,
"li",
Expand Down Expand Up @@ -799,7 +799,7 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[
60,
Expand All @@ -820,7 +820,7 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[
60,
Expand All @@ -841,14 +841,14 @@ defmodule Scrivener.HTMLTest do
[
60,
"li",
[[32, "class", 61, 34, "", 34]],
[[32, "class", 61, 34, [], 34]],
62,
[
60,
"a",
[[32, "class", 61, 34, "pagination-link", 34]],
62,
"&gt;&gt;",
[[[] | "&gt;"] | "&gt;"],
60,
47,
"a",
Expand Down