diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cc3b510 --- /dev/null +++ b/LICENSE @@ -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. \ No newline at end of file diff --git a/README.md b/README.md index 5a6c3a7..f187ce0 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/mix.exs b/mix.exs index 0f3b1d8..ef75aa6 100644 --- a/mix.exs +++ b/mix.exs @@ -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