Current section

68 Versions

Jump to

Compare versions

20 files changed
+271 additions
-432 deletions
  @@ -1,5 +1,12 @@
1 1 # Changelog
2 2
3 + ## v2.2.0
4 +
5 + * Changes
6 + * Moved the database functions to within Openmaize
7 + * The openmaize_ecto and openmaize_ecto_test files are no longer needed and can be deleted
8 + * Replaced `db_module` setting (used in several plugs) with `repo` and `user_model`
9 +
3 10 ## v2.1.0
4 11
5 12 * Enhancements
  @@ -4,7 +4,7 @@ Authentication library for Plug-based applications in Elixir
4 4
5 5 ## Upgrading to the newest version
6 6
7 - Please check the `UPGRADE_2.1.md` guide in this directory for details.
7 + Please check the `UPGRADE_2.2.md` guide in this directory for details.
8 8
9 9 ## Goals
10 10
  @@ -24,7 +24,7 @@ tested with the Phoenix Web Framework.
24 24
25 25 ```elixir
26 26 defp deps do
27 - [{:openmaize, "~> 2.1"}]
27 + [{:openmaize, "~> 2.2"}]
28 28 end
29 29 ```
  @@ -3,17 +3,14 @@
3 3 {<<"description">>,<<"Authentication library for Elixir using Plug">>}.
4 4 {<<"elixir">>,<<"~> 1.2">>}.
5 5 {<<"files">>,
6 - [<<"lib/mix/openmaize.ex">>,<<"lib/mix/tasks/openmaize.gen.ectodb.ex">>,
7 - <<"lib/mix/tasks/openmaize.gen.phoenixauth.ex">>,<<"lib/openmaize.ex">>,
8 - <<"lib/openmaize/authenticate.ex">>,<<"lib/openmaize/config.ex">>,
9 - <<"lib/openmaize/confirm/base.ex">>,<<"lib/openmaize/confirm_email.ex">>,
10 - <<"lib/openmaize/database.ex">>,<<"lib/openmaize/login.ex">>,
11 - <<"lib/openmaize/login/name.ex">>,<<"lib/openmaize/onetime_pass.ex">>,
12 - <<"lib/openmaize/password.ex">>,<<"lib/openmaize/remember.ex">>,
13 - <<"lib/openmaize/reset_password.ex">>,<<"lib/openmaize/utils.ex">>,
14 - <<"priv/templates/database/openmaize_ecto.ex">>,
15 - <<"priv/templates/database/openmaize_ecto_test.exs">>,
16 - <<"priv/templates/phoenixauth/app.html.eex">>,
6 + [<<"lib/mix/openmaize.ex">>,<<"lib/mix/tasks/openmaize.gen.phoenixauth.ex">>,
7 + <<"lib/openmaize.ex">>,<<"lib/openmaize/authenticate.ex">>,
8 + <<"lib/openmaize/config.ex">>,<<"lib/openmaize/confirm/base.ex">>,
9 + <<"lib/openmaize/confirm_email.ex">>,<<"lib/openmaize/database.ex">>,
10 + <<"lib/openmaize/login.ex">>,<<"lib/openmaize/login/name.ex">>,
11 + <<"lib/openmaize/onetime_pass.ex">>,<<"lib/openmaize/password.ex">>,
12 + <<"lib/openmaize/remember.ex">>,<<"lib/openmaize/reset_password.ex">>,
13 + <<"lib/openmaize/utils.ex">>,<<"priv/templates/phoenixauth/app.html.eex">>,
17 14 <<"priv/templates/phoenixauth/authorize.ex">>,
18 15 <<"priv/templates/phoenixauth/index.html.eex">>,
19 16 <<"priv/templates/phoenixauth/mailer.ex">>,
  @@ -58,10 +55,10 @@
58 55 [{<<"app">>,<<"comeonin">>},
59 56 {<<"name">>,<<"comeonin">>},
60 57 {<<"optional">>,false},
61 - {<<"requirement">>,<<"~> 2.5">>}],
58 + {<<"requirement">>,<<"~> 2.6">>}],
62 59 [{<<"app">>,<<"ecto">>},
63 60 {<<"name">>,<<"ecto">>},
64 - {<<"optional">>,true},
61 + {<<"optional">>,false},
65 62 {<<"requirement">>,<<"~> 2.0">>}],
66 63 [{<<"app">>,<<"postgrex">>},
67 64 {<<"name">>,<<"postgrex">>},
  @@ -71,4 +68,4 @@
71 68 {<<"name">>,<<"not_qwerty123">>},
72 69 {<<"optional">>,true},
73 70 {<<"requirement">>,<<"~> 1.2">>}]]}.
74 - {<<"version">>,<<"2.1.5">>}.
71 + {<<"version">>,<<"2.2.0">>}.
  @@ -2,10 +2,8 @@ defmodule Mix.Openmaize do
2 2 @moduledoc """
3 3 Helper functions for the mix generators.
4 4
5 - There are two mix generators available - `openmaize.gen.phoenixauth`
6 - and `openmaize.gen.ectodb`.
7 - See the documentation for Mix.Tasks.Openmaize.Gen.Phoenixauth and
8 - Mix.Tasks.Openmaize.Gen.Ectodb for more information.
5 + There is one mix generator available - `openmaize.gen.phoenixauth`.
6 + See the documentation for Mix.Tasks.Openmaize.Gen.Phoenixauth.
9 7 """
10 8
11 9 @doc """
  @@ -1,44 +0,0 @@
1 - defmodule Mix.Tasks.Openmaize.Gen.Ectodb do
2 - use Mix.Task
3 -
4 - @moduledoc """
5 - Create modules for tasks that use Ecto to call the database.
6 -
7 - In most cases, you will not need to call this task directly,
8 - as it is called by `openmaize.gen.phoenixauth`.
9 - """
10 -
11 - @doc false
12 - def run(args) do
13 - switches = [confirm: :boolean]
14 - {opts, _argv, _} = OptionParser.parse(args, switches: switches)
15 -
16 - base = Openmaize.Utils.base_module
17 - srcdir = Path.join [Application.app_dir(:openmaize, "priv"), "templates", "database"]
18 -
19 - files = [{:eex, "openmaize_ecto.ex", "web/models/openmaize_ecto.ex"},
20 - {:eex, "openmaize_ecto_test.exs", "test/models/openmaize_ecto_test.exs"}]
21 -
22 - Mix.Openmaize.copy_files(srcdir, files, base: base, confirm: opts[:confirm])
23 - |> instructions
24 - end
25 -
26 - @doc false
27 - def instructions(oks) do
28 - if :ok in oks do
29 - Mix.shell.info """
30 -
31 - Please check the generated files. Certain details in them, such as
32 - paths, user details, etc., will most likely need to be changed.
33 -
34 - See the documentation for Openmaize.Config for further details
35 - on how to configure Openmaize.
36 - """
37 - else
38 - Mix.shell.info """
39 -
40 - No files have been installed.
41 - """
42 - end
43 - end
44 - end
Loading more files…