Skip to content

Commit

Permalink
Fix Elixir 1.2+ deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DevL committed Jan 22, 2016
1 parent d221620 commit 7faabd1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ An Elixir Plug for requiring and extracting a given header.
Update your `mix.exs` file and run `mix deps.get`.
```elixir
defp deps do
[{:plug_require_header, "~> 0.7"}]
[{:plug_require_header, "~> 0.8"}]
end
```

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

def handle_missing_header(conn, {_connection_assignment_key, missing_header_key}) do
Expand Down
2 changes: 1 addition & 1 deletion lib/plug_require_header.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule PlugRequireHeader do
import Plug.Conn
alias Plug.Conn.Status

@vsn "0.7.0"
@vsn "0.8.0"
@doc false
def version, do: @vsn

Expand Down
10 changes: 5 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule PlugRequireHeader.Mixfile do
def project do
[
app: :plug_require_header,
version: "0.7.0",
version: "0.8.0",
name: "PlugRequireHeader",
source_url: "https://github.com/DevL/plug_require_header",
elixir: "~> 1.0",
Expand Down Expand Up @@ -35,11 +35,11 @@ defmodule PlugRequireHeader.Mixfile do

defp deps do
[
{:plug, "~> 1.0"},
{:plug, "~> 1.1"},
{:poison, "~> 1.5"},
{:earmark, "~> 0.1", only: :dev},
{:ex_doc, "~> 0.10", only: :dev},
{:inch_ex, only: :docs}
{:earmark, "~> 0.2", only: :dev},
{:ex_doc, "~> 0.11", only: :dev},
{:inch_ex, ">= 0.4.0", only: :docs}
]
end
end
8 changes: 4 additions & 4 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%{"earmark": {:hex, :earmark, "0.1.19"},
"ex_doc": {:hex, :ex_doc, "0.11.1"},
%{"earmark": {:hex, :earmark, "0.2.1"},
"ex_doc": {:hex, :ex_doc, "0.11.3"},
"inch_ex": {:hex, :inch_ex, "0.4.0"},
"plug": {:hex, :plug, "1.0.3"},
"poison": {:hex, :poison, "1.5.0"}}
"plug": {:hex, :plug, "1.1.0"},
"poison": {:hex, :poison, "1.5.2"}}
2 changes: 1 addition & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule TestAppWithCallbackAndMultipleRequiredHeaders do
end

def callback(conn, {connection_key, _}) do
conn |> assign connection_key, "is missing"
conn |> assign(connection_key, "is missing")
end
end

Expand Down

0 comments on commit 7faabd1

Please sign in to comment.