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

Commit f26c6a6

Browse files
committed
Prepare v0.1.0 release.
1 parent 20083df commit f26c6a6

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

lib/plug_require_header.ex

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

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

9+
@doc """
10+
Initialises the plug given a keyword list of the following format.
11+
12+
[<connection_key>: <header_key>]
13+
14+
* The `<connection_key>` atom is the connection key to assign the value of the header.
15+
* The `<header_key>` binary is the header key to be required and extracted.
16+
"""
917
def init(options) do
1018
options |> List.first
1119
end
1220

21+
@doc """
22+
Extracts the required headers and assign them to the connection struct.
23+
"""
1324
def call(conn, {connection_key, header_key}) do
1425
extract_header_key(conn, connection_key, header_key)
1526
end

mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ defmodule PlugRequireHeader.Mixfile do
44
def project do
55
[
66
app: :plug_require_header,
7-
version: "0.1.0-dev",
8-
name: "GoodTimes",
7+
version: "0.1.0",
8+
name: "PlugRequireHeader",
99
source_url: "https://github.com/DevL/plug_require_header",
1010
elixir: "~> 1.0",
1111
deps: deps,

0 commit comments

Comments
 (0)