Skip to content

Commit

Permalink
Prepare for release and hex publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
trenpixster committed Jan 18, 2015
1 parent 9c8f4db commit 4ebf25b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 19 deletions.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2015 Nizar Venturini

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ end
## How can I use it?
Just add the following to your `router.ex`:
```
post "/register", UserController, :register
post "/logout", UserController, :logout
post "/login", UserController, :login
post "/register", Addict.Controller, :register
post "/logout", Addict.Controller, :logout
post "/login", Addict.Controller, :login
```

And use `AddictAuthenticated` plug to validate requests on your controllers:
Expand Down
36 changes: 20 additions & 16 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,35 @@ defmodule Addict.Mixfile do
[app: :addict,
version: "0.0.1",
elixir: "~> 1.0",
description: description,
package: package,
deps: deps]
end

# Configuration for the OTP application
#
# Type `mix help compile.app` for more information
def application do
[applications: [:phoenix, :cowboy, :logger, :ecto, :bcrypt]]
[applications: [:logger, :bcrypt]]
end

# Dependencies can be Hex packages:
#
# {:mydep, "~> 0.3.0"}
#
# Or git/path repositories:
#
# {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"}
#
# Type `mix help deps` for more examples and options

defp deps do
[{:phoenix, "~> 0.8.0"},
{:cowboy, "~> 1.0"},
{:postgrex, ">= 0.6.0"},
{:ecto, "~> 0.2.6"},
{:bcrypt, github: "opscode/erlang-bcrypt"},
{:mailgun, "~> 0.0.2"}]
end

defp package do
[# These are the default files included in the package
files: ["lib", "mix.exs", "README*", "LICENSE*"],
contributors: ["Nizar Venturini"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/trenpixster/addict"}
]
end

defp description do
"""
Addict allows you to manage users on your Phoenix app easily. Register, login and logout is available off-the-shelf.
"""
end

end

0 comments on commit 4ebf25b

Please sign in to comment.