Skip to content

Commit b295c5d

Browse files
author
Michael Schaefermeyer
committed
Remove cowboy dep, 1.4 warnings
Closes #16
1 parent 47c421f commit b295c5d

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

lib/trailing_format_plug.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ defmodule TrailingFormatPlug do
55

66
def call(%{path_info: []} = conn, _opts), do: conn
77
def call(conn, _opts) do
8-
path = conn.path_info |> List.last |> String.split(".") |> Enum.reverse
8+
path = conn.path_info |> List.last() |> String.split(".") |> Enum.reverse()
99

1010
case path do
1111
[ _ ] ->
1212
conn
1313

1414
[ format | fragments ] ->
15-
new_path = fragments |> Enum.reverse |> Enum.join(".")
15+
new_path = fragments |> Enum.reverse() |> Enum.join(".")
1616
path_fragments = List.replace_at conn.path_info, -1, new_path
1717
params =
1818
Plug.Conn.fetch_query_params(conn).params

mix.exs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,22 @@ defmodule TrailingFormatPlug.Mixfile do
66
app: :trailing_format_plug,
77
version: "0.0.6",
88
elixir: ">= 1.0.0",
9-
deps: deps,
9+
deps: deps(),
1010
package: [
1111
maintainers: ["Michael Schaefermeyer"],
1212
licenses: ["Apache 2.0"],
1313
links: %{"Github" => "http://github.com/mschae/trailing_format_plug"}
1414
],
15-
description: description
15+
description: description()
1616
]
1717
end
1818

1919
def application do
20-
[applications: [:logger, :cowboy]]
20+
[applications: [:logger]]
2121
end
2222

2323
defp deps do
2424
[
25-
{:cowboy, "~> 1.0.0"},
2625
{:plug, "> 0.12.0"},
2726

2827
{:ex_doc, "~> 0.14.3", only: [:dev]}

0 commit comments

Comments
 (0)