Skip to content

Commit

Permalink
Prepare v0.1.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
DevL committed Mar 30, 2015
1 parent 20083df commit f26c6a6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 12 additions & 1 deletion lib/plug_require_header.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,25 @@ defmodule PlugRequireHeader do
import Plug.Conn
alias Plug.Conn.Status

@vsn "0.1.0-dev"
@vsn "0.1.0"
@doc false
def version, do: @vsn

@doc """
Initialises the plug given a keyword list of the following format.
[<connection_key>: <header_key>]
* The `<connection_key>` atom is the connection key to assign the value of the header.
* The `<header_key>` binary is the header key to be required and extracted.
"""
def init(options) do
options |> List.first
end

@doc """
Extracts the required headers and assign them to the connection struct.
"""
def call(conn, {connection_key, header_key}) do
extract_header_key(conn, connection_key, header_key)
end
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ defmodule PlugRequireHeader.Mixfile do
def project do
[
app: :plug_require_header,
version: "0.1.0-dev",
name: "GoodTimes",
version: "0.1.0",
name: "PlugRequireHeader",
source_url: "https://github.com/DevL/plug_require_header",
elixir: "~> 1.0",
deps: deps,
Expand Down

0 comments on commit f26c6a6

Please sign in to comment.