Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Commit 7faabd1

Browse files
committed
Fix Elixir 1.2+ deprecation warnings
1 parent d221620 commit 7faabd1

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ An Elixir Plug for requiring and extracting a given header.
1212
Update your `mix.exs` file and run `mix deps.get`.
1313
```elixir
1414
defp deps do
15-
[{:plug_require_header, "~> 0.7"}]
15+
[{:plug_require_header, "~> 0.8"}]
1616
end
1717
```
1818

@@ -81,7 +81,7 @@ defmodule MyPhoenixApp.MyOtherController do
8181
def index(conn, _params) do
8282
conn
8383
|> put_status(Status.code :ok)
84-
|> text "The API key used is: #{conn.assigns[:api_key]}"
84+
|> text("The API key used is: #{conn.assigns[:api_key]}")
8585
end
8686

8787
def handle_missing_header(conn, {_connection_assignment_key, missing_header_key}) do

lib/plug_require_header.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule PlugRequireHeader do
22
import Plug.Conn
33
alias Plug.Conn.Status
44

5-
@vsn "0.7.0"
5+
@vsn "0.8.0"
66
@doc false
77
def version, do: @vsn
88

mix.exs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule PlugRequireHeader.Mixfile do
44
def project do
55
[
66
app: :plug_require_header,
7-
version: "0.7.0",
7+
version: "0.8.0",
88
name: "PlugRequireHeader",
99
source_url: "https://github.com/DevL/plug_require_header",
1010
elixir: "~> 1.0",
@@ -35,11 +35,11 @@ defmodule PlugRequireHeader.Mixfile do
3535

3636
defp deps do
3737
[
38-
{:plug, "~> 1.0"},
38+
{:plug, "~> 1.1"},
3939
{:poison, "~> 1.5"},
40-
{:earmark, "~> 0.1", only: :dev},
41-
{:ex_doc, "~> 0.10", only: :dev},
42-
{:inch_ex, only: :docs}
40+
{:earmark, "~> 0.2", only: :dev},
41+
{:ex_doc, "~> 0.11", only: :dev},
42+
{:inch_ex, ">= 0.4.0", only: :docs}
4343
]
4444
end
4545
end

mix.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
%{"earmark": {:hex, :earmark, "0.1.19"},
2-
"ex_doc": {:hex, :ex_doc, "0.11.1"},
1+
%{"earmark": {:hex, :earmark, "0.2.1"},
2+
"ex_doc": {:hex, :ex_doc, "0.11.3"},
33
"inch_ex": {:hex, :inch_ex, "0.4.0"},
4-
"plug": {:hex, :plug, "1.0.3"},
5-
"poison": {:hex, :poison, "1.5.0"}}
4+
"plug": {:hex, :plug, "1.1.0"},
5+
"poison": {:hex, :poison, "1.5.2"}}

test/test_helper.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ defmodule TestAppWithCallbackAndMultipleRequiredHeaders do
5151
end
5252

5353
def callback(conn, {connection_key, _}) do
54-
conn |> assign connection_key, "is missing"
54+
conn |> assign(connection_key, "is missing")
5555
end
5656
end
5757

0 commit comments

Comments
 (0)