-
Admin Dashboard
+
Legendary.Admin Dashboard
- There are plenty of tasks that don't require custom code. Legendary integrates the Kaffy admin dashboard
+ There are plenty of tasks that don't require custom code. Legendary integrates the Kaffy admin dashboard
so that you can focus on what is unique to your application instead of churning out CRUD or editing database
rows by hand.
diff --git a/apps/content/lib/content_web/templates/posts/thumb.html.eex b/apps/content/lib/content_web/templates/posts/thumb.html.eex
index 13e7efbe..228486dd 100644
--- a/apps/content/lib/content_web/templates/posts/thumb.html.eex
+++ b/apps/content/lib/content_web/templates/posts/thumb.html.eex
@@ -1,6 +1,6 @@
<%= case @thumbs[@post.id] do %>
- <% thumb = %Content.Post{} -> %>
- <%= if thumb |> Content.Attachment.vertical?() do %>
+ <% thumb = %Legendary.Content.Post{} -> %>
+ <%= if thumb |> Legendary.Content.Attachment.vertical?() do %>
<%= img_tag thumb.guid %>
diff --git a/apps/content/lib/content_web/views/admin_home_view.ex b/apps/content/lib/content_web/views/admin_home_view.ex
index 2af6c7b8..7c484e8a 100644
--- a/apps/content/lib/content_web/views/admin_home_view.ex
+++ b/apps/content/lib/content_web/views/admin_home_view.ex
@@ -1,3 +1,3 @@
-defmodule Content.AdminHomeView do
- use Content, :view
+defmodule Legendary.Content.AdminHomeView do
+ use Legendary.Content, :view
end
diff --git a/apps/content/lib/content_web/views/admin_posts_view.ex b/apps/content/lib/content_web/views/admin_posts_view.ex
index 81a5b838..d10aa8b8 100644
--- a/apps/content/lib/content_web/views/admin_posts_view.ex
+++ b/apps/content/lib/content_web/views/admin_posts_view.ex
@@ -1,3 +1,3 @@
-defmodule Content.AdminPostsView do
- use Content, :view
+defmodule Legendary.Content.AdminPostsView do
+ use Legendary.Content, :view
end
diff --git a/apps/content/lib/content_web/views/error_helpers.ex b/apps/content/lib/content_web/views/error_helpers.ex
index 2e83f363..85e5ed5a 100644
--- a/apps/content/lib/content_web/views/error_helpers.ex
+++ b/apps/content/lib/content_web/views/error_helpers.ex
@@ -1,4 +1,4 @@
-defmodule Content.ErrorHelpers do
+defmodule Legendary.Content.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
@@ -39,9 +39,9 @@ defmodule Content.ErrorHelpers do
# should be written to the errors.po file. The :count option is
# set by Ecto and indicates we should also apply plural rules.
if count = opts[:count] do
- Gettext.dngettext(Content.Gettext, "errors", msg, msg, count, opts)
+ Gettext.dngettext(Legendary.Content.Gettext, "errors", msg, msg, count, opts)
else
- Gettext.dgettext(Content.Gettext, "errors", msg, opts)
+ Gettext.dgettext(Legendary.Content.Gettext, "errors", msg, opts)
end
end
end
diff --git a/apps/content/lib/content_web/views/error_view.ex b/apps/content/lib/content_web/views/error_view.ex
index 29b08bff..18585478 100644
--- a/apps/content/lib/content_web/views/error_view.ex
+++ b/apps/content/lib/content_web/views/error_view.ex
@@ -1,5 +1,5 @@
-defmodule Content.ErrorView do
- use Content, :view
+defmodule Legendary.Content.ErrorView do
+ use Legendary.Content, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
diff --git a/apps/content/lib/content_web/views/feeds_view.ex b/apps/content/lib/content_web/views/feeds_view.ex
index c4e6f60f..b768b144 100644
--- a/apps/content/lib/content_web/views/feeds_view.ex
+++ b/apps/content/lib/content_web/views/feeds_view.ex
@@ -1,10 +1,10 @@
-defmodule Content.FeedsView do
- use Content, :view
+defmodule Legendary.Content.FeedsView do
+ use Legendary.Content, :view
use Phoenix.HTML
alias Phoenix.HTML
alias Phoenix.HTML.Tag
- import Content.LayoutView, only: [title: 3, excerpt: 3]
+ import Legendary.Content.LayoutView, only: [title: 3, excerpt: 3]
def gravatar_url_for_email(email) do
email
@@ -38,7 +38,7 @@ defmodule Content.FeedsView do
def post_topmatter(conn, post) do
author =
post.author ||
- %Auth.User{
+ %Legendary.Auth.User{
email: "example@example.org",
display_name: "Anonymous",
homepage_url: "#"
diff --git a/apps/content/lib/content_web/views/layout_view.ex b/apps/content/lib/content_web/views/layout_view.ex
index 9bec107a..b1e7c224 100644
--- a/apps/content/lib/content_web/views/layout_view.ex
+++ b/apps/content/lib/content_web/views/layout_view.ex
@@ -1,5 +1,5 @@
-defmodule Content.LayoutView do
- use Content, :view
+defmodule Legendary.Content.LayoutView do
+ use Legendary.Content, :view
def feed_tag(conn, view_module, view_template, assigns) do
~E"""
@@ -12,40 +12,40 @@ defmodule Content.LayoutView do
"""
end
- def title(Content.PostsView, "index.html", assigns) do
+ def title(Legendary.Content.PostsView, "index.html", assigns) do
"Page #{assigns.page} | #{title(nil, nil, nil)}"
end
- def title(Content.FeedsView, "index.rss", %{category: category}) when not(is_nil(category)) do
+ def title(Legendary.Content.FeedsView, "index.rss", %{category: category}) when not(is_nil(category)) do
"#{category} | #{title(nil, nil, nil)}"
end
- def title(Content.PostsView, "show.html", assigns) do
+ def title(Legendary.Content.PostsView, "show.html", assigns) do
(assigns.post.title |> HtmlSanitizeEx.strip_tags()) <> " | " <> title(nil, nil, nil)
end
- def title(_, _, _), do: I18n.t! "en", "site.title"
+ def title(_, _, _), do: Legendary.I18n.t! "en", "site.title"
- def excerpt(Content.PostsView, "show.html", assigns) do
+ def excerpt(Legendary.Content.PostsView, "show.html", assigns) do
assigns.post.excerpt
|> HtmlSanitizeEx.strip_tags()
end
- def excerpt(Content.FeedsView, "index.rss", %{category: category}) when not(is_nil(category)) do
+ def excerpt(Legendary.Content.FeedsView, "index.rss", %{category: category}) when not(is_nil(category)) do
"#{category} | #{excerpt(nil, nil, nil)}"
end
- def excerpt(_, _, _), do: I18n.t! "en", "site.excerpt"
+ def excerpt(_, _, _), do: Legendary.I18n.t! "en", "site.excerpt"
def corresponding_feed_url(conn, _, _, %{category: nil}) do
- Content.Router.Helpers.index_feed_url(conn, :index)
+ Legendary.Content.Router.Helpers.index_feed_url(conn, :index)
end
- def corresponding_feed_url(conn, Content.PostsView, "index.html", %{category: category}) do
- Content.Router.Helpers.category_feed_url(conn, :index, category)
+ def corresponding_feed_url(conn, Legendary.Content.PostsView, "index.html", %{category: category}) do
+ Legendary.Content.Router.Helpers.category_feed_url(conn, :index, category)
end
def corresponding_feed_url(conn, _, _, _) do
- Content.Router.Helpers.index_feed_url(conn, :index)
+ Legendary.Content.Router.Helpers.index_feed_url(conn, :index)
end
end
diff --git a/apps/content/lib/content_web/views/menus_view.ex b/apps/content/lib/content_web/views/menus_view.ex
index 7b315554..479c5822 100644
--- a/apps/content/lib/content_web/views/menus_view.ex
+++ b/apps/content/lib/content_web/views/menus_view.ex
@@ -1,3 +1,3 @@
-defmodule Content.MenusView do
- use Content, :view
+defmodule Legendary.Content.MenusView do
+ use Legendary.Content, :view
end
diff --git a/apps/content/lib/content_web/views/page_view.ex b/apps/content/lib/content_web/views/page_view.ex
index 271c1cc2..431b95b9 100644
--- a/apps/content/lib/content_web/views/page_view.ex
+++ b/apps/content/lib/content_web/views/page_view.ex
@@ -1,3 +1,3 @@
-defmodule Content.PageView do
- use Content, :view
+defmodule Legendary.Content.PageView do
+ use Legendary.Content, :view
end
diff --git a/apps/content/lib/content_web/views/posts_view.ex b/apps/content/lib/content_web/views/posts_view.ex
index ddee1f96..b107e9c5 100644
--- a/apps/content/lib/content_web/views/posts_view.ex
+++ b/apps/content/lib/content_web/views/posts_view.ex
@@ -1,9 +1,9 @@
-defmodule Content.PostsView do
- use Content, :view
+defmodule Legendary.Content.PostsView do
+ use Legendary.Content, :view
use Phoenix.HTML
import Plug.Conn
- alias Content.Comment
- alias Content.Post
+ alias Legendary.Content.Comment
+ alias Legendary.Content.Post
alias Phoenix.HTML
alias Phoenix.HTML.Tag
@@ -59,7 +59,7 @@ defmodule Content.PostsView do
def post_topmatter(conn, post) do
author =
post.author ||
- %Auth.User{
+ %Legendary.Auth.User{
email: "example@example.org",
display_name: "Anonymous",
homepage_url: "#"
diff --git a/apps/content/lib/content_web/views/sitemap_view.ex b/apps/content/lib/content_web/views/sitemap_view.ex
index 10fadf9e..236f4c84 100644
--- a/apps/content/lib/content_web/views/sitemap_view.ex
+++ b/apps/content/lib/content_web/views/sitemap_view.ex
@@ -1,3 +1,3 @@
-defmodule Content.SitemapView do
- use Content, :view
+defmodule Legendary.Content.SitemapView do
+ use Legendary.Content, :view
end
diff --git a/apps/content/mix.exs b/apps/content/mix.exs
index 2422e620..b8934831 100644
--- a/apps/content/mix.exs
+++ b/apps/content/mix.exs
@@ -1,4 +1,4 @@
-defmodule Content.MixProject do
+defmodule Legendary.Content.MixProject do
use Mix.Project
def project do
@@ -25,7 +25,7 @@ defmodule Content.MixProject do
# Type `mix help compile.app` for more information.
def application do
[
- mod: {Content.Application, []},
+ mod: {Legendary.Content.Application, []},
extra_applications: [:logger, :runtime_tools, :sitemap]
]
end
diff --git a/apps/content/priv/repo/migrations/20180825175607_create_schema.exs b/apps/content/priv/repo/migrations/20180825175607_create_schema.exs
index fe23e175..4e5812f0 100644
--- a/apps/content/priv/repo/migrations/20180825175607_create_schema.exs
+++ b/apps/content/priv/repo/migrations/20180825175607_create_schema.exs
@@ -1,4 +1,4 @@
-defmodule Content.Repo.Migrations.CreateSchema do
+defmodule Legendary.Content.Repo.Migrations.CreateSchema do
use Ecto.Migration
def change do
diff --git a/apps/content/priv/repo/migrations/20201009173604_add_oban_jobs_table.exs b/apps/content/priv/repo/migrations/20201009173604_add_oban_jobs_table.exs
index 9cc6b38f..e181211b 100644
--- a/apps/content/priv/repo/migrations/20201009173604_add_oban_jobs_table.exs
+++ b/apps/content/priv/repo/migrations/20201009173604_add_oban_jobs_table.exs
@@ -1,4 +1,4 @@
-defmodule Content.Repo.Migrations.AddObanJobsTable do
+defmodule Legendary.Content.Repo.Migrations.AddObanJobsTable do
use Ecto.Migration
def up do
diff --git a/apps/content/priv/repo/seeds.exs b/apps/content/priv/repo/seeds.exs
index f67a3785..88c37a1b 100644
--- a/apps/content/priv/repo/seeds.exs
+++ b/apps/content/priv/repo/seeds.exs
@@ -5,7 +5,7 @@
# Inside the script, you can read and write to any of your
# repositories directly:
#
-# Content.Repo.insert!(%Content.SomeSchema{})
+# Legendary.Content.Repo.insert!(%Legendary.Content.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail if something goes wrong.
diff --git a/apps/content/test/content/attachment_test.exs b/apps/content/test/content/attachment_test.exs
index 16c40797..7210f6da 100644
--- a/apps/content/test/content/attachment_test.exs
+++ b/apps/content/test/content/attachment_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.AttachmentTest do
- use Content.DataCase
+defmodule Legendary.Content.AttachmentTest do
+ use Legendary.Content.DataCase
- alias Content.{Attachment, Postmeta, Posts, Repo}
+ alias Legendary.Content.{Attachment, Postmeta, Posts, Repo}
@create_attrs %{
id: 123,
@@ -22,7 +22,7 @@ defmodule Content.AttachmentTest do
value: "a:2:{s:5:\"width\";i:640;s:6:\"height\";i:480;}"
} |> Repo.insert()
- Content.Post
+ Legendary.Content.Post
|> preload([:metas])
|> Repo.get!(attachment.id)
end
@@ -35,14 +35,14 @@ defmodule Content.AttachmentTest do
key: "attachment_metadata",
value: "a:2:{s:5:\"width\";i:480;s:6:\"height\";i:640;}"
} |> Repo.insert()
- Content.Post
+ Legendary.Content.Post
|> preload([:metas])
|> Repo.get!(attachment.id)
end
def fixture(:unknown_dimensions) do
{:ok, attachment} = Posts.create_posts(@create_attrs)
- Content.Post
+ Legendary.Content.Post
|> preload([:metas])
|> Repo.get!(attachment.id)
end
diff --git a/apps/content/test/content/commentmeta_test.exs b/apps/content/test/content/commentmeta_test.exs
index a34b1940..c0a7e16b 100644
--- a/apps/content/test/content/commentmeta_test.exs
+++ b/apps/content/test/content/commentmeta_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.CommentmetaTest do
- use Content.DataCase
+defmodule Legendary.Content.CommentmetaTest do
+ use Legendary.Content.DataCase
- alias Content.{Commentmeta, Repo}
+ alias Legendary.Content.{Commentmeta, Repo}
test "can save a new commentmeta" do
%Commentmeta{}
diff --git a/apps/content/test/content/comments_test.exs b/apps/content/test/content/comments_test.exs
index b0f31824..f9cc3ce7 100644
--- a/apps/content/test/content/comments_test.exs
+++ b/apps/content/test/content/comments_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.CommentsTest do
- use Content.DataCase
+defmodule Legendary.Content.CommentsTest do
+ use Legendary.Content.DataCase
- alias Content.{Comment, Comments, Repo}
+ alias Legendary.Content.{Comment, Comments, Repo}
alias Ecto.Changeset
def fixture(:parent_comment) do
diff --git a/apps/content/test/content/link_test.exs b/apps/content/test/content/link_test.exs
index 7ecb960d..5b27f2df 100644
--- a/apps/content/test/content/link_test.exs
+++ b/apps/content/test/content/link_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.LinkTest do
- use Content.DataCase
+defmodule Legendary.Content.LinkTest do
+ use Legendary.Content.DataCase
- alias Content.{Link, Repo}
+ alias Legendary.Content.{Link, Repo}
test "can save a new link" do
%Link{}
diff --git a/apps/content/test/content/markup_field_test.exs b/apps/content/test/content/markup_field_test.exs
index 3be60557..59206b02 100644
--- a/apps/content/test/content/markup_field_test.exs
+++ b/apps/content/test/content/markup_field_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.MarkupFieldTest do
- use Content.DataCase
+defmodule Legendary.Content.MarkupFieldTest do
+ use Legendary.Content.DataCase
- import Content.MarkupField
+ import Legendary.Content.MarkupField
import Phoenix.HTML, only: [safe_to_string: 1]
import Phoenix.HTML.Form, only: [form_for: 3]
diff --git a/apps/content/test/content/option_test.exs b/apps/content/test/content/option_test.exs
index d8580689..0fbba703 100644
--- a/apps/content/test/content/option_test.exs
+++ b/apps/content/test/content/option_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.OptionTest do
- use Content.DataCase
+defmodule Legendary.Content.OptionTest do
+ use Legendary.Content.DataCase
- alias Content.{Option, Repo}
+ alias Legendary.Content.{Option, Repo}
test "can save a new link" do
%Option{}
diff --git a/apps/content/test/content/options_test.exs b/apps/content/test/content/options_test.exs
index d03080e2..a6e696e6 100644
--- a/apps/content/test/content/options_test.exs
+++ b/apps/content/test/content/options_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.OptionsTest do
- use Content.DataCase
+defmodule Legendary.Content.OptionsTest do
+ use Legendary.Content.DataCase
- alias Content.{Option, Options, Repo}
+ alias Legendary.Content.{Option, Options, Repo}
def fixture(:option) do
%Option{}
diff --git a/apps/content/test/content/postmeta_test.exs b/apps/content/test/content/postmeta_test.exs
index e44fd240..4ca756f0 100644
--- a/apps/content/test/content/postmeta_test.exs
+++ b/apps/content/test/content/postmeta_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.PostmetaTest do
- use Content.DataCase
+defmodule Legendary.Content.PostmetaTest do
+ use Legendary.Content.DataCase
- alias Content.{Postmeta, Repo}
+ alias Legendary.Content.{Postmeta, Repo}
test "can save a new postmeta" do
%Postmeta{}
diff --git a/apps/content/test/content/posts_test.exs b/apps/content/test/content/posts_test.exs
index 144566b5..a3f44412 100644
--- a/apps/content/test/content/posts_test.exs
+++ b/apps/content/test/content/posts_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.PostsTest do
- use Content.DataCase
+defmodule Legendary.Content.PostsTest do
+ use Legendary.Content.DataCase
- alias Content.{Post, Posts, Repo}
+ alias Legendary.Content.{Post, Posts, Repo}
setup do
admin_only_post =
diff --git a/apps/content/test/content/slugs_test.exs b/apps/content/test/content/slugs_test.exs
index 243d3abb..b7a9120f 100644
--- a/apps/content/test/content/slugs_test.exs
+++ b/apps/content/test/content/slugs_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.SlugsTest do
- use Content.DataCase
+defmodule Legendary.Content.SlugsTest do
+ use Legendary.Content.DataCase
- alias Content.{Post, Posts, Repo, Slugs}
+ alias Legendary.Content.{Post, Posts, Repo, Slugs}
alias Ecto.Changeset
@create_attrs %{
diff --git a/apps/content/test/content/term_relationship_test.exs b/apps/content/test/content/term_relationship_test.exs
index 6031d737..00506739 100644
--- a/apps/content/test/content/term_relationship_test.exs
+++ b/apps/content/test/content/term_relationship_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.TermRelationshipTest do
- use Content.DataCase
+defmodule Legendary.Content.TermRelationshipTest do
+ use Legendary.Content.DataCase
- alias Content.{Repo, TermRelationship}
+ alias Legendary.Content.{Repo, TermRelationship}
test "can save a new term relationship" do
%TermRelationship{}
diff --git a/apps/content/test/content/term_taxonomy_test.exs b/apps/content/test/content/term_taxonomy_test.exs
index 2939da71..9bd6438b 100644
--- a/apps/content/test/content/term_taxonomy_test.exs
+++ b/apps/content/test/content/term_taxonomy_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.TermTaxonomyTest do
- use Content.DataCase
+defmodule Legendary.Content.TermTaxonomyTest do
+ use Legendary.Content.DataCase
- alias Content.{Repo, TermTaxonomy}
+ alias Legendary.Content.{Repo, TermTaxonomy}
test "can save a new term taxonomy" do
%TermTaxonomy{}
diff --git a/apps/content/test/content/term_test.exs b/apps/content/test/content/term_test.exs
index 10cb8b35..36e47322 100644
--- a/apps/content/test/content/term_test.exs
+++ b/apps/content/test/content/term_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.TermTest do
- use Content.DataCase
+defmodule Legendary.Content.TermTest do
+ use Legendary.Content.DataCase
- alias Content.{Repo, Term}
+ alias Legendary.Content.{Repo, Term}
test "can save a new term" do
%Term{}
diff --git a/apps/content/test/content/termmeta_test.exs b/apps/content/test/content/termmeta_test.exs
index a4a1793e..05ae60c8 100644
--- a/apps/content/test/content/termmeta_test.exs
+++ b/apps/content/test/content/termmeta_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.TermmetaTest do
- use Content.DataCase
+defmodule Legendary.Content.TermmetaTest do
+ use Legendary.Content.DataCase
- alias Content.{Repo, Termmeta}
+ alias Legendary.Content.{Repo, Termmeta}
test "can save a new termmeta" do
%Termmeta{}
diff --git a/apps/content/test/content_web/controllers/comment_controller_test.exs b/apps/content/test/content_web/controllers/comment_controller_test.exs
index 6754710a..9190db0a 100644
--- a/apps/content/test/content_web/controllers/comment_controller_test.exs
+++ b/apps/content/test/content_web/controllers/comment_controller_test.exs
@@ -1,8 +1,8 @@
-defmodule Content.CommentControllerTest do
- use Content.ConnCase
+defmodule Legendary.Content.CommentControllerTest do
+ use Legendary.Content.ConnCase
- alias Content.Comments
- alias Content.Posts
+ alias Legendary.Content.Comments
+ alias Legendary.Content.Posts
@post_attrs %{id: 456, name: "blergh", status: "publish"}
@create_attrs %{id: 123, content: "Hello world", post_id: 456}
diff --git a/apps/content/test/content_web/controllers/feeds_controller_test.exs b/apps/content/test/content_web/controllers/feeds_controller_test.exs
index 5be1f240..a5bdf2e6 100644
--- a/apps/content/test/content_web/controllers/feeds_controller_test.exs
+++ b/apps/content/test/content_web/controllers/feeds_controller_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.FeedsControllerTest do
- use Content.ConnCase
+defmodule Legendary.Content.FeedsControllerTest do
+ use Legendary.Content.ConnCase
- alias Content.{Term, TermRelationship, TermTaxonomy, Posts, Repo}
+ alias Legendary.Content.{Term, TermRelationship, TermTaxonomy, Posts, Repo}
@post_attrs %{
id: 456,
diff --git a/apps/content/test/content_web/controllers/post_password_controller_test.exs b/apps/content/test/content_web/controllers/post_password_controller_test.exs
index b9904029..403ce12b 100644
--- a/apps/content/test/content_web/controllers/post_password_controller_test.exs
+++ b/apps/content/test/content_web/controllers/post_password_controller_test.exs
@@ -1,8 +1,7 @@
-defmodule Content.PostPasswordControllerTest do
- use Content.ConnCase
+defmodule Legendary.Content.PostPasswordControllerTest do
+ use Legendary.Content.ConnCase
use Plug.Test
- alias Content
import Plug.Conn
describe "create" do
diff --git a/apps/content/test/content_web/controllers/posts_controller_test.exs b/apps/content/test/content_web/controllers/posts_controller_test.exs
index b5b70b2f..f0a9d9c7 100644
--- a/apps/content/test/content_web/controllers/posts_controller_test.exs
+++ b/apps/content/test/content_web/controllers/posts_controller_test.exs
@@ -1,8 +1,7 @@
-defmodule Content.PostsControllerTest do
- use Content.ConnCase
+defmodule Legendary.Content.PostsControllerTest do
+ use Legendary.Content.ConnCase
- alias Content
- alias Content.{Comment, Options, Posts, Repo, Term, TermRelationship, TermTaxonomy}
+ alias Legendary.Content.{Comment, Options, Posts, Repo, Term, TermRelationship, TermTaxonomy}
@create_attrs %{
id: 123,
@@ -66,8 +65,8 @@ defmodule Content.PostsControllerTest do
def fixture(:posts) do
{:ok, post} = Posts.create_posts(@create_attrs)
{:ok, thumb} = Posts.create_posts(@thumb_attrs)
- {:ok, _meta} = %Content.Postmeta{post_id: post.id, key: "_thumbnail_id", value: Integer.to_string(thumb.id)} |> Repo.insert()
- {:ok, _option} = %Content.Option{name: "sticky_posts", value: "a:1:{i:0;i:123;}"} |> Repo.insert()
+ {:ok, _meta} = %Legendary.Content.Postmeta{post_id: post.id, key: "_thumbnail_id", value: Integer.to_string(thumb.id)} |> Repo.insert()
+ {:ok, _option} = %Legendary.Content.Option{name: "sticky_posts", value: "a:1:{i:0;i:123;}"} |> Repo.insert()
post
end
@@ -87,8 +86,8 @@ defmodule Content.PostsControllerTest do
def fixture(:front_post) do
{:ok, post} = Posts.create_posts(@create_attrs)
- {:ok, _option} = %Content.Option{name: "show_on_front", value: "page"} |> Repo.insert()
- {:ok, _option} = %Content.Option{name: "page_on_front", value: post.id |> Integer.to_string(10)} |> Repo.insert()
+ {:ok, _option} = %Legendary.Content.Option{name: "show_on_front", value: "page"} |> Repo.insert()
+ {:ok, _option} = %Legendary.Content.Option{name: "page_on_front", value: post.id |> Integer.to_string(10)} |> Repo.insert()
post
end
diff --git a/apps/content/test/content_web/controllers/sitemap_controller_test.exs b/apps/content/test/content_web/controllers/sitemap_controller_test.exs
index 853e0bff..8ea841ce 100644
--- a/apps/content/test/content_web/controllers/sitemap_controller_test.exs
+++ b/apps/content/test/content_web/controllers/sitemap_controller_test.exs
@@ -1,5 +1,5 @@
-defmodule Content.SitemapControllerTest do
- use Content.ConnCase
+defmodule Legendary.Content.SitemapControllerTest do
+ use Legendary.Content.ConnCase
describe "index" do
test "is the site index", %{conn: conn} do
diff --git a/apps/content/test/content_web/views/error_view_test.exs b/apps/content/test/content_web/views/error_view_test.exs
index ea70eb8a..04ed5432 100644
--- a/apps/content/test/content_web/views/error_view_test.exs
+++ b/apps/content/test/content_web/views/error_view_test.exs
@@ -1,14 +1,14 @@
-defmodule Content.ErrorViewTest do
- use Content.ConnCase, async: true
+defmodule Legendary.Content.ErrorViewTest do
+ use Legendary.Content.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
- assert render_to_string(Content.ErrorView, "404.html", []) == "Not Found"
+ assert render_to_string(Legendary.Content.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
- assert render_to_string(Content.ErrorView, "500.html", []) == "Internal Server Error"
+ assert render_to_string(Legendary.Content.ErrorView, "500.html", []) == "Internal Server Error"
end
end
diff --git a/apps/content/test/content_web/views/layout_view_test.exs b/apps/content/test/content_web/views/layout_view_test.exs
index 8a94146d..d266a36e 100644
--- a/apps/content/test/content_web/views/layout_view_test.exs
+++ b/apps/content/test/content_web/views/layout_view_test.exs
@@ -1,33 +1,33 @@
-defmodule Content.LayoutViewTest do
- use Content.ConnCase, async: true
+defmodule Legendary.Content.LayoutViewTest do
+ use Legendary.Content.ConnCase, async: true
- import Content.LayoutView
+ import Legendary.Content.LayoutView
describe "title/3" do
def default_title do
- I18n.t! "en", "site.title"
+ Legendary.I18n.t! "en", "site.title"
end
test "for index" do
- assert title(Content.PostsView, "index.html", %{page: 1}) =~ "Page 1 | #{default_title()}"
+ assert title(Legendary.Content.PostsView, "index.html", %{page: 1}) =~ "Page 1 | #{default_title()}"
end
test "for feed" do
- assert title(Content.FeedsView, "index.rss", %{category: "Category Test"}) =~ "Category Test | #{default_title()}"
+ assert title(Legendary.Content.FeedsView, "index.rss", %{category: "Category Test"}) =~ "Category Test | #{default_title()}"
end
test "for category" do
- assert title(Content.PostsView, "show.html", %{post: %{title: "Test"}}) =~ "Test | #{default_title()}"
+ assert title(Legendary.Content.PostsView, "show.html", %{post: %{title: "Test"}}) =~ "Test | #{default_title()}"
end
end
describe "excerpt/3" do
test "for a post" do
- assert excerpt(Content.PostsView, "show.html", %{post: %{excerpt: "Excerpt test"}}) =~ "Excerpt test"
+ assert excerpt(Legendary.Content.PostsView, "show.html", %{post: %{excerpt: "Excerpt test"}}) =~ "Excerpt test"
end
test "for a category" do
- assert excerpt(Content.FeedsView, "index.rss", %{category: "category-test"}) =~ "category-test |"
+ assert excerpt(Legendary.Content.FeedsView, "index.rss", %{category: "category-test"}) =~ "category-test |"
end
end
@@ -41,7 +41,7 @@ defmodule Content.LayoutViewTest do
end
test "with a non-nil category", %{conn: conn} do
- assert corresponding_feed_url(conn, Content.PostsView, "index.html", %{category: "test-category"}) == "/pages/category/test-category/feed.rss"
+ assert corresponding_feed_url(conn, Legendary.Content.PostsView, "index.html", %{category: "test-category"}) == "/pages/category/test-category/feed.rss"
end
test "without a category", %{conn: conn} do
diff --git a/apps/content/test/content_web/views/page_view_test.exs b/apps/content/test/content_web/views/page_view_test.exs
index 0a4ae804..d260be78 100644
--- a/apps/content/test/content_web/views/page_view_test.exs
+++ b/apps/content/test/content_web/views/page_view_test.exs
@@ -1,3 +1,3 @@
-defmodule Content.PageViewTest do
- use Content.ConnCase, async: true
+defmodule Legendary.Content.PageViewTest do
+ use Legendary.Content.ConnCase, async: true
end
diff --git a/apps/content/test/content_web/views/posts_view_test.exs b/apps/content/test/content_web/views/posts_view_test.exs
index 203cc6bd..a3ecc396 100644
--- a/apps/content/test/content_web/views/posts_view_test.exs
+++ b/apps/content/test/content_web/views/posts_view_test.exs
@@ -1,7 +1,7 @@
-defmodule Content.PostsViewTest do
- use Content.ConnCase
+defmodule Legendary.Content.PostsViewTest do
+ use Legendary.Content.ConnCase
- import Content.PostsView
+ import Legendary.Content.PostsView
import Phoenix.HTML, only: [safe_to_string: 1]
test "auto_paragraph_tags/1 with nil" do
diff --git a/apps/content/test/support/channel_case.ex b/apps/content/test/support/channel_case.ex
index 8fc1fdb0..2a95f843 100644
--- a/apps/content/test/support/channel_case.ex
+++ b/apps/content/test/support/channel_case.ex
@@ -1,4 +1,4 @@
-defmodule Content.ChannelCase do
+defmodule Legendary.Content.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
@@ -11,7 +11,7 @@ defmodule Content.ChannelCase do
we enable the SQL sandbox, so changes done to the database
are reverted at the end of every test. If you are using
PostgreSQL, you can even run database tests asynchronously
- by setting `use Content.ChannelCase, async: true`, although
+ by setting `use Legendary.Content.ChannelCase, async: true`, although
this option is not recommended for other databases.
"""
@@ -21,18 +21,18 @@ defmodule Content.ChannelCase do
quote do
# Import conveniences for testing with channels
import Phoenix.ChannelTest
- import Content.ChannelCase
+ import Legendary.Content.ChannelCase
# The default endpoint for testing
- @endpoint Content.Endpoint
+ @endpoint Legendary.Content.Endpoint
end
end
setup tags do
- :ok = Ecto.Adapters.SQL.Sandbox.checkout(Content.Repo)
+ :ok = Ecto.Adapters.SQL.Sandbox.checkout(Legendary.Content.Repo)
unless tags[:async] do
- Ecto.Adapters.SQL.Sandbox.mode(Content.Repo, {:shared, self()})
+ Ecto.Adapters.SQL.Sandbox.mode(Legendary.Content.Repo, {:shared, self()})
end
:ok
diff --git a/apps/content/test/support/conn_case.ex b/apps/content/test/support/conn_case.ex
index 987e75ee..b7e92fff 100644
--- a/apps/content/test/support/conn_case.ex
+++ b/apps/content/test/support/conn_case.ex
@@ -1,4 +1,4 @@
-defmodule Content.ConnCase do
+defmodule Legendary.Content.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
@@ -11,7 +11,7 @@ defmodule Content.ConnCase do
we enable the SQL sandbox, so changes done to the database
are reverted at the end of every test. If you are using
PostgreSQL, you can even run database tests asynchronously
- by setting `use Content.ConnCase, async: true`, although
+ by setting `use Legendary.Content.ConnCase, async: true`, although
this option is not recommended for other databases.
"""
@@ -22,18 +22,18 @@ defmodule Content.ConnCase do
# Import conveniences for testing with connections
import Plug.Conn
import Phoenix.ConnTest
- import Content.ConnCase
+ import Legendary.Content.ConnCase
import Mock
- alias Content.Router.Helpers, as: Routes
+ alias Legendary.Content.Router.Helpers, as: Routes
# The default endpoint for testing
- @endpoint Content.Endpoint
+ @endpoint Legendary.Content.Endpoint
defmacro as_admin(do: expression) do
quote do
with_mock Pow.Plug.RequireAuthenticated, [call: fn(conn, _opts) -> conn end] do
- with_mock AuthWeb.Plugs.RequireAdmin, [call: fn(conn, _opts) -> conn end] do
+ with_mock Legendary.AuthWeb.Plugs.RequireAdmin, [call: fn(conn, _opts) -> conn end] do
unquote(expression)
end
end
@@ -43,10 +43,10 @@ defmodule Content.ConnCase do
end
setup tags do
- :ok = Ecto.Adapters.SQL.Sandbox.checkout(Content.Repo)
+ :ok = Ecto.Adapters.SQL.Sandbox.checkout(Legendary.Content.Repo)
unless tags[:async] do
- Ecto.Adapters.SQL.Sandbox.mode(Content.Repo, {:shared, self()})
+ Ecto.Adapters.SQL.Sandbox.mode(Legendary.Content.Repo, {:shared, self()})
end
{:ok, conn: Phoenix.ConnTest.build_conn()}
diff --git a/apps/content/test/support/data_case.ex b/apps/content/test/support/data_case.ex
index c1b16489..72458df6 100644
--- a/apps/content/test/support/data_case.ex
+++ b/apps/content/test/support/data_case.ex
@@ -1,4 +1,4 @@
-defmodule Content.DataCase do
+defmodule Legendary.Content.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
@@ -19,20 +19,20 @@ defmodule Content.DataCase do
using do
quote do
- alias Content.Repo
+ alias Legendary.Content.Repo
import Ecto
import Ecto.Query
- import Content.DataCase
+ import Legendary.Content.DataCase
end
end
setup tags do
- :ok = Sandbox.checkout(Content.Repo)
+ :ok = Sandbox.checkout(Legendary.Content.Repo)
unless tags[:async] do
- Sandbox.mode(Content.Repo, {:shared, self()})
+ Sandbox.mode(Legendary.Content.Repo, {:shared, self()})
end
:ok
diff --git a/apps/content/test/test_helper.exs b/apps/content/test/test_helper.exs
index 9ab3ba67..241bce89 100644
--- a/apps/content/test/test_helper.exs
+++ b/apps/content/test/test_helper.exs
@@ -1,2 +1,2 @@
ExUnit.start()
-Ecto.Adapters.SQL.Sandbox.mode(Content.Repo, :manual)
+Ecto.Adapters.SQL.Sandbox.mode(Legendary.Content.Repo, :manual)
diff --git a/apps/core/lib/auth.ex b/apps/core/lib/auth.ex
index b24e2051..48b55241 100644
--- a/apps/core/lib/auth.ex
+++ b/apps/core/lib/auth.ex
@@ -1,6 +1,6 @@
-defmodule Auth do
+defmodule Legendary.Auth do
@moduledoc """
- Auth keeps the contexts that define your domain
+ Legendary.Auth keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
diff --git a/apps/core/lib/auth/roles.ex b/apps/core/lib/auth/roles.ex
index e28403c6..39293d9e 100644
--- a/apps/core/lib/auth/roles.ex
+++ b/apps/core/lib/auth/roles.ex
@@ -1,7 +1,7 @@
-defmodule Auth.Roles do
+defmodule Legendary.Auth.Roles do
def has_role?(userlike, role) when is_atom(role), do: has_role?(userlike, Atom.to_string(role))
def has_role?(nil, _), do: false
- def has_role?(user = %Auth.User{}, role) do
+ def has_role?(user = %Legendary.Auth.User{}, role) do
Enum.any?(user.roles || [], & &1 == role)
end
end
diff --git a/apps/core/lib/auth/user.ex b/apps/core/lib/auth/user.ex
index 6ef69c3f..931c48cd 100644
--- a/apps/core/lib/auth/user.ex
+++ b/apps/core/lib/auth/user.ex
@@ -1,4 +1,4 @@
-defmodule Auth.User do
+defmodule Legendary.Auth.User do
@moduledoc """
The baseline user schema module.
"""
@@ -40,7 +40,7 @@ defmodule Auth.User do
|> pow_extension_changeset(attrs)
end
- def reset_password_changeset(user = %Auth.User{}, params) do
+ def reset_password_changeset(user = %Legendary.Auth.User{}, params) do
user
|> new_password_changeset(params, @pow_config)
|> Changeset.validate_required([:password])
diff --git a/apps/core/lib/auth/user_admin.ex b/apps/core/lib/auth/user_admin.ex
index b069988e..cbbdb1bc 100644
--- a/apps/core/lib/auth/user_admin.ex
+++ b/apps/core/lib/auth/user_admin.ex
@@ -1,14 +1,14 @@
-defmodule Auth.UserAdmin do
+defmodule Legendary.Auth.UserAdmin do
import Ecto.Query, only: [from: 2]
- alias Auth.User
- alias Core.Repo
+ alias Legendary.Auth.User
+ alias Legendary.Core.Repo
def create_changeset(schema, attrs) do
- Auth.User.admin_changeset(schema, attrs)
+ Legendary.Auth.User.admin_changeset(schema, attrs)
end
def update_changeset(schema, attrs) do
- Auth.User.admin_changeset(schema, attrs)
+ Legendary.Auth.User.admin_changeset(schema, attrs)
end
def widgets(_schema, _conn) do
diff --git a/apps/core/lib/auth_web.ex b/apps/core/lib/auth_web.ex
index e75cc255..5706531b 100644
--- a/apps/core/lib/auth_web.ex
+++ b/apps/core/lib/auth_web.ex
@@ -1,12 +1,12 @@
-defmodule AuthWeb do
+defmodule Legendary.AuthWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
- use AuthWeb, :controller
- use AuthWeb, :view
+ use Legendary.AuthWeb, :controller
+ use Legendary.AuthWeb, :view
The definitions below will be executed for every view,
controller, etc, so keep them short and clean, focused
@@ -19,11 +19,11 @@ defmodule AuthWeb do
def controller do
quote do
- use Phoenix.Controller, namespace: AuthWeb
+ use Phoenix.Controller, namespace: Legendary.AuthWeb
import Plug.Conn
- import CoreWeb.Gettext
- alias CoreWeb.Router.Helpers, as: Routes
+ import Legendary.CoreWeb.Gettext
+ alias Legendary.CoreWeb.Router.Helpers, as: Routes
end
end
@@ -31,7 +31,7 @@ defmodule AuthWeb do
quote do
use Phoenix.View,
root: "lib/auth_web/templates",
- namespace: AuthWeb
+ namespace: Legendary.AuthWeb
# Import convenience functions from controllers
import Phoenix.Controller,
@@ -54,7 +54,7 @@ defmodule AuthWeb do
def channel do
quote do
use Phoenix.Channel
- import CoreWeb.Gettext
+ import Legendary.CoreWeb.Gettext
end
end
@@ -66,20 +66,20 @@ defmodule AuthWeb do
# Import basic rendering functionality (render, render_layout, etc)
import Phoenix.View
- import CoreWeb.ErrorHelpers
- import CoreWeb.Helpers
- import CoreWeb.Gettext
- alias CoreWeb.Router.Helpers, as: Routes
+ import Legendary.CoreWeb.ErrorHelpers
+ import Legendary.CoreWeb.Helpers
+ import Legendary.CoreWeb.Gettext
+ alias Legendary.CoreWeb.Router.Helpers, as: Routes
end
end
def mailer_view do
quote do
use Phoenix.View, root: "lib/auth_web/templates",
- namespace: AuthWeb
+ namespace: Legendary.AuthWeb
use Phoenix.HTML
- import CoreWeb.EmailHelpers
+ import Legendary.CoreWeb.EmailHelpers
end
end
diff --git a/apps/core/lib/auth_web/helpers.ex b/apps/core/lib/auth_web/helpers.ex
index b6ae5041..fd359fb1 100644
--- a/apps/core/lib/auth_web/helpers.ex
+++ b/apps/core/lib/auth_web/helpers.ex
@@ -1,7 +1,7 @@
-defmodule AuthWeb.Helpers do
+defmodule Legendary.AuthWeb.Helpers do
def has_role?(conn = %Plug.Conn{}, role) do
conn
|> Pow.Plug.current_user()
- |> Auth.Roles.has_role?(role)
+ |> Legendary.Auth.Roles.has_role?(role)
end
end
diff --git a/apps/core/lib/auth_web/plugs/require_admin.ex b/apps/core/lib/auth_web/plugs/require_admin.ex
index b8112145..29ab1ce7 100644
--- a/apps/core/lib/auth_web/plugs/require_admin.ex
+++ b/apps/core/lib/auth_web/plugs/require_admin.ex
@@ -1,10 +1,10 @@
-defmodule AuthWeb.Plugs.RequireAdmin do
+defmodule Legendary.AuthWeb.Plugs.RequireAdmin do
@moduledoc """
A plug that returns 403 unauthorized if the user is not an admin. Used
to block out logged-in-only routes.
"""
import Plug.Conn
- alias Auth.{Roles, User}
+ alias Legendary.Auth.{Roles, User}
def init(opts) do
opts
diff --git a/apps/core/lib/auth_web/pow/mailer.ex b/apps/core/lib/auth_web/pow/mailer.ex
index 52c5c72d..42edee0f 100644
--- a/apps/core/lib/auth_web/pow/mailer.ex
+++ b/apps/core/lib/auth_web/pow/mailer.ex
@@ -1,15 +1,15 @@
-defmodule AuthWeb.Pow.Mailer do
+defmodule Legendary.AuthWeb.Pow.Mailer do
@moduledoc """
Mailer module for Pow which links it to our well-styled defaults.
"""
use Pow.Phoenix.Mailer
import Bamboo.Email
- use Bamboo.Phoenix, view: AuthWeb.EmailView
+ use Bamboo.Phoenix, view: Legendary.AuthWeb.EmailView
@impl true
def cast(%{user: user, subject: subject, text: text, html: html}) do
- CoreEmail.base_email()
+ Legendary.CoreEmail.base_email()
|> to(user.email)
|> subject(subject)
|> render(:pow_mail, html_body: html, text_body: text)
@@ -21,6 +21,6 @@ defmodule AuthWeb.Pow.Mailer do
# attacks. Synchronous e-mail delivery can reveal whether a user already
# exists in the system or not.
- CoreMailer.deliver_later(email)
+ Legendary.CoreMailer.deliver_later(email)
end
end
diff --git a/apps/core/lib/auth_web/views/error_view.ex b/apps/core/lib/auth_web/views/error_view.ex
index c0311c2d..c336c5e6 100644
--- a/apps/core/lib/auth_web/views/error_view.ex
+++ b/apps/core/lib/auth_web/views/error_view.ex
@@ -1,5 +1,5 @@
-defmodule AuthWeb.ErrorView do
- use AuthWeb, :view
+defmodule Legendary.AuthWeb.ErrorView do
+ use Legendary.AuthWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
diff --git a/apps/core/lib/auth_web/views/layout_view.ex b/apps/core/lib/auth_web/views/layout_view.ex
index 742252fe..09e9c8c7 100644
--- a/apps/core/lib/auth_web/views/layout_view.ex
+++ b/apps/core/lib/auth_web/views/layout_view.ex
@@ -1,3 +1,3 @@
-defmodule AuthWeb.LayoutView do
- use AuthWeb, :view
+defmodule Legendary.AuthWeb.LayoutView do
+ use Legendary.AuthWeb, :view
end
diff --git a/apps/core/lib/auth_web/views/page_view.ex b/apps/core/lib/auth_web/views/page_view.ex
index f9a7c32a..928ac84b 100644
--- a/apps/core/lib/auth_web/views/page_view.ex
+++ b/apps/core/lib/auth_web/views/page_view.ex
@@ -1,3 +1,3 @@
-defmodule AuthWeb.PageView do
- use AuthWeb, :view
+defmodule Legendary.AuthWeb.PageView do
+ use Legendary.AuthWeb, :view
end
diff --git a/apps/core/lib/auth_web/views/pow/email_view.ex b/apps/core/lib/auth_web/views/pow/email_view.ex
index da1081eb..47bc0867 100644
--- a/apps/core/lib/auth_web/views/pow/email_view.ex
+++ b/apps/core/lib/auth_web/views/pow/email_view.ex
@@ -1,7 +1,7 @@
-defmodule AuthWeb.EmailView do
+defmodule Legendary.AuthWeb.EmailView do
use Phoenix.View,
root: "lib/auth_web/templates",
- namespace: AuthWeb,
+ namespace: Legendary.AuthWeb,
pattern: "**/*"
import Phoenix.HTML, only: [raw: 1]
diff --git a/apps/core/lib/auth_web/views/pow/registration_view.ex b/apps/core/lib/auth_web/views/pow/registration_view.ex
index fab3bf16..89dcc6e6 100644
--- a/apps/core/lib/auth_web/views/pow/registration_view.ex
+++ b/apps/core/lib/auth_web/views/pow/registration_view.ex
@@ -1,3 +1,3 @@
-defmodule AuthWeb.Pow.RegistrationView do
- use AuthWeb, :view
+defmodule Legendary.AuthWeb.Pow.RegistrationView do
+ use Legendary.AuthWeb, :view
end
diff --git a/apps/core/lib/auth_web/views/pow/session_view.ex b/apps/core/lib/auth_web/views/pow/session_view.ex
index be9d29e1..b854623c 100644
--- a/apps/core/lib/auth_web/views/pow/session_view.ex
+++ b/apps/core/lib/auth_web/views/pow/session_view.ex
@@ -1,3 +1,3 @@
-defmodule AuthWeb.Pow.SessionView do
- use AuthWeb, :view
+defmodule Legendary.AuthWeb.Pow.SessionView do
+ use Legendary.AuthWeb, :view
end
diff --git a/apps/core/lib/auth_web/views/pow_email_confirmation/mailer_view.ex b/apps/core/lib/auth_web/views/pow_email_confirmation/mailer_view.ex
index e2c1fb38..f777a26a 100644
--- a/apps/core/lib/auth_web/views/pow_email_confirmation/mailer_view.ex
+++ b/apps/core/lib/auth_web/views/pow_email_confirmation/mailer_view.ex
@@ -1,5 +1,5 @@
-defmodule AuthWeb.PowEmailConfirmation.MailerView do
- use AuthWeb, :mailer_view
+defmodule Legendary.AuthWeb.PowEmailConfirmation.MailerView do
+ use Legendary.AuthWeb, :mailer_view
def subject(:email_confirmation, _assigns), do: "Confirm your email address"
end
diff --git a/apps/core/lib/auth_web/views/pow_reset_password/mailer_view.ex b/apps/core/lib/auth_web/views/pow_reset_password/mailer_view.ex
index 522b55c6..3b8e32f7 100644
--- a/apps/core/lib/auth_web/views/pow_reset_password/mailer_view.ex
+++ b/apps/core/lib/auth_web/views/pow_reset_password/mailer_view.ex
@@ -1,5 +1,5 @@
-defmodule AuthWeb.PowResetPassword.MailerView do
- use AuthWeb, :mailer_view
+defmodule Legendary.AuthWeb.PowResetPassword.MailerView do
+ use Legendary.AuthWeb, :mailer_view
def subject(:reset_password, _assigns), do: "Reset password link"
end
diff --git a/apps/core/lib/auth_web/views/pow_reset_password/reset_password_view.ex b/apps/core/lib/auth_web/views/pow_reset_password/reset_password_view.ex
index ddd2fed4..419bde86 100644
--- a/apps/core/lib/auth_web/views/pow_reset_password/reset_password_view.ex
+++ b/apps/core/lib/auth_web/views/pow_reset_password/reset_password_view.ex
@@ -1,5 +1,5 @@
-defmodule AuthWeb.PowResetPassword.ResetPasswordView do
- use AuthWeb, :view
+defmodule Legendary.AuthWeb.PowResetPassword.ResetPasswordView do
+ use Legendary.AuthWeb, :view
- import CoreWeb.Helpers
+ import Legendary.CoreWeb.Helpers
end
diff --git a/apps/core/lib/core.ex b/apps/core/lib/core.ex
index 9ac3e503..631942e5 100644
--- a/apps/core/lib/core.ex
+++ b/apps/core/lib/core.ex
@@ -1,6 +1,6 @@
-defmodule Core do
+defmodule Legendary.Core do
@moduledoc """
- Core keeps the contexts that define your domain
+ Legendary.Core keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
diff --git a/apps/core/lib/core/application.ex b/apps/core/lib/core/application.ex
index 4ca742af..50979305 100644
--- a/apps/core/lib/core/application.ex
+++ b/apps/core/lib/core/application.ex
@@ -1,4 +1,4 @@
-defmodule Core.Application do
+defmodule Legendary.Core.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
@@ -8,27 +8,27 @@ defmodule Core.Application do
def start(_type, _args) do
children = [
# Start the Ecto repository
- Core.Repo,
+ Legendary.Core.Repo,
# Start the Telemetry supervisor
- CoreWeb.Telemetry,
+ Legendary.CoreWeb.Telemetry,
# Start the PubSub system
- {Phoenix.PubSub, name: Core.PubSub},
+ {Phoenix.PubSub, name: Legendary.Core.PubSub},
# Start the Endpoint (http/https)
- CoreWeb.Endpoint,
- # Start a worker by calling: Core.Worker.start_link(arg)
- # {Core.Worker, arg}
+ Legendary.CoreWeb.Endpoint,
+ # Start a worker by calling: Legendary.Core.Worker.start_link(arg)
+ # {Legendary.Core.Worker, arg}
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
- opts = [strategy: :one_for_one, name: Core.Supervisor]
+ opts = [strategy: :one_for_one, name: Legendary.Core.Supervisor]
Supervisor.start_link(children, opts)
end
# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
def config_change(changed, _new, removed) do
- CoreWeb.Endpoint.config_change(changed, removed)
+ Legendary.CoreWeb.Endpoint.config_change(changed, removed)
:ok
end
end
diff --git a/apps/core/lib/core/map_utils.ex b/apps/core/lib/core/map_utils.ex
index f3337570..920e4b39 100644
--- a/apps/core/lib/core/map_utils.ex
+++ b/apps/core/lib/core/map_utils.ex
@@ -1,4 +1,4 @@
-defmodule Core.MapUtils do
+defmodule Legendary.Core.MapUtils do
@moduledoc """
Generic additional utility functions for Maps.
"""
diff --git a/apps/core/lib/core/repo.ex b/apps/core/lib/core/repo.ex
index 73cf8da7..95c3f507 100644
--- a/apps/core/lib/core/repo.ex
+++ b/apps/core/lib/core/repo.ex
@@ -1,4 +1,4 @@
-defmodule Core.Repo do
+defmodule Legendary.Core.Repo do
use Ecto.Repo,
otp_app: :core,
adapter: Ecto.Adapters.Postgres
diff --git a/apps/core/lib/core/shared_db_connection_pool.ex b/apps/core/lib/core/shared_db_connection_pool.ex
index 6fc25326..d4f757ff 100644
--- a/apps/core/lib/core/shared_db_connection_pool.ex
+++ b/apps/core/lib/core/shared_db_connection_pool.ex
@@ -1,4 +1,4 @@
-defmodule Core.SharedDBConnectionPool do
+defmodule Legendary.Core.SharedDBConnectionPool do
@moduledoc """
A shareable connection pool. We use this so that all the apps connecting to
one database can use on connection pool, even if they have different repos.
@@ -18,7 +18,7 @@ defmodule Core.SharedDBConnectionPool do
def child_spec({mod, opts}) do
opts = Keyword.put_new(opts, :name, key(opts))
- Supervisor.Spec.worker(Core.SharedDBConnectionPool, [{mod, opts}])
+ Supervisor.Spec.worker(Legendary.Core.SharedDBConnectionPool, [{mod, opts}])
end
defp key(opts) do
@@ -31,7 +31,7 @@ defmodule Core.SharedDBConnectionPool do
end
|> hash_opts()
- String.to_atom("Core.SharedDBConnectionPool.#{key_hash}")
+ String.to_atom("Legendary.Core.SharedDBConnectionPool.#{key_hash}")
end
defp hash_opts(opts) do
diff --git a/apps/core/lib/core_email.ex b/apps/core/lib/core_email.ex
index 1e7f84b5..a3c229c1 100644
--- a/apps/core/lib/core_email.ex
+++ b/apps/core/lib/core_email.ex
@@ -1,15 +1,15 @@
-defmodule CoreEmail do
+defmodule Legendary.CoreEmail do
@moduledoc """
The core library for email in the application. The functions here can be composed in the application to send
different emails.
"""
import Bamboo.Email
- use Bamboo.Phoenix, view: CoreWeb.CoreEmailView
+ use Bamboo.Phoenix, view: Legendary.CoreWeb.CoreEmailView
def base_email() do
new_email()
- |> put_html_layout({CoreWeb.CoreEmailView, "email.html"})
- |> put_text_layout({CoreWeb.CoreEmailView, "email.text"})
+ |> put_html_layout({Legendary.CoreWeb.CoreEmailView, "email.html"})
+ |> put_text_layout({Legendary.CoreWeb.CoreEmailView, "email.text"})
|> from(sender())
end
diff --git a/apps/core/lib/core_mailer.ex b/apps/core/lib/core_mailer.ex
index 4da30d06..ee636dfe 100644
--- a/apps/core/lib/core_mailer.ex
+++ b/apps/core/lib/core_mailer.ex
@@ -1,4 +1,4 @@
-defmodule CoreMailer do
+defmodule Legendary.CoreMailer do
@moduledoc """
The base mailer for email for the application.
"""
diff --git a/apps/core/lib/core_web.ex b/apps/core/lib/core_web.ex
index 79433cd4..a2cb233b 100644
--- a/apps/core/lib/core_web.ex
+++ b/apps/core/lib/core_web.ex
@@ -1,12 +1,12 @@
-defmodule CoreWeb do
+defmodule Legendary.CoreWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
- use CoreWeb, :controller
- use CoreWeb, :view
+ use Legendary.CoreWeb, :controller
+ use Legendary.CoreWeb, :view
The definitions below will be executed for every view,
controller, etc, so keep them short and clean, focused
@@ -19,11 +19,11 @@ defmodule CoreWeb do
def controller do
quote do
- use Phoenix.Controller, namespace: CoreWeb
+ use Phoenix.Controller, namespace: Legendary.CoreWeb
import Plug.Conn
- import CoreWeb.Gettext
- alias CoreWeb.Router.Helpers, as: Routes
+ import Legendary.CoreWeb.Gettext
+ alias Legendary.CoreWeb.Router.Helpers, as: Routes
end
end
@@ -31,7 +31,7 @@ defmodule CoreWeb do
quote do
use Phoenix.View,
root: "lib/core_web/templates",
- namespace: CoreWeb,
+ namespace: Legendary.CoreWeb,
pattern: "**/*"
# Import convenience functions from controllers
@@ -55,7 +55,7 @@ defmodule CoreWeb do
def channel do
quote do
use Phoenix.Channel
- import CoreWeb.Gettext
+ import Legendary.CoreWeb.Gettext
end
end
@@ -67,20 +67,20 @@ defmodule CoreWeb do
# Import basic rendering functionality (render, render_layout, etc)
import Phoenix.View
- import CoreWeb.ErrorHelpers
- import CoreWeb.Helpers
- import CoreWeb.Gettext
- alias CoreWeb.Router.Helpers, as: Routes
+ import Legendary.CoreWeb.ErrorHelpers
+ import Legendary.CoreWeb.Helpers
+ import Legendary.CoreWeb.Gettext
+ alias Legendary.CoreWeb.Router.Helpers, as: Routes
end
end
def mailer_view do
quote do
use Phoenix.View, root: "lib/auth_web/templates",
- namespace: AuthWeb
+ namespace: Legendary.AuthWeb
use Phoenix.HTML
- import CoreWeb.EmailHelpers
+ import Legendary.CoreWeb.EmailHelpers
end
end
diff --git a/apps/core/lib/core_web/channels/user_socket.ex b/apps/core/lib/core_web/channels/user_socket.ex
index d8d109e0..f1922380 100644
--- a/apps/core/lib/core_web/channels/user_socket.ex
+++ b/apps/core/lib/core_web/channels/user_socket.ex
@@ -1,8 +1,8 @@
-defmodule CoreWeb.UserSocket do
+defmodule Legendary.CoreWeb.UserSocket do
use Phoenix.Socket
## Channels
- # channel "room:*", CoreWeb.RoomChannel
+ # channel "room:*", Legendary.CoreWeb.RoomChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
@@ -27,7 +27,7 @@ defmodule CoreWeb.UserSocket do
# Would allow you to broadcast a "disconnect" event and terminate
# all active sockets and channels for a given user:
#
- # CoreWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})
+ # Legendary.CoreWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})
#
# Returning `nil` makes this socket anonymous.
@impl true
diff --git a/apps/core/lib/core_web/endpoint.ex b/apps/core/lib/core_web/endpoint.ex
index 58cfcfc0..c4795d3d 100644
--- a/apps/core/lib/core_web/endpoint.ex
+++ b/apps/core/lib/core_web/endpoint.ex
@@ -1,4 +1,4 @@
-defmodule CoreWeb.Endpoint do
+defmodule Legendary.CoreWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :core
def init(_, config) do
@@ -17,7 +17,7 @@ defmodule CoreWeb.Endpoint do
signing_salt: "LSBaXPn+"
]
- socket "/socket", CoreWeb.UserSocket,
+ socket "/socket", Legendary.CoreWeb.UserSocket,
websocket: true,
longpoll: false
@@ -65,5 +65,5 @@ defmodule CoreWeb.Endpoint do
plug Plug.Session, @session_options
plug Pow.Plug.Session, otp_app: :core
plug PowPersistentSession.Plug.Cookie
- plug CoreWeb.Router
+ plug Legendary.CoreWeb.Router
end
diff --git a/apps/core/lib/core_web/gettext.ex b/apps/core/lib/core_web/gettext.ex
index 369e5b00..c5127775 100644
--- a/apps/core/lib/core_web/gettext.ex
+++ b/apps/core/lib/core_web/gettext.ex
@@ -1,11 +1,11 @@
-defmodule CoreWeb.Gettext do
+defmodule Legendary.CoreWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
- import CoreWeb.Gettext
+ import Legendary.CoreWeb.Gettext
# Simple translation
gettext("Here is the string to translate")
diff --git a/apps/core/lib/core_web/router.ex b/apps/core/lib/core_web/router.ex
index 0b7cc87c..279e6d9c 100644
--- a/apps/core/lib/core_web/router.ex
+++ b/apps/core/lib/core_web/router.ex
@@ -1,5 +1,5 @@
-defmodule CoreWeb.Router do
- use CoreWeb, :router
+defmodule Legendary.CoreWeb.Router do
+ use Legendary.CoreWeb, :router
use Pow.Phoenix.Router
use Pow.Extension.Phoenix.Router,
extensions: [PowResetPassword, PowEmailConfirmation]
@@ -28,7 +28,7 @@ defmodule CoreWeb.Router do
scope "/" do
pipe_through :browser
- live_dashboard "/dashboard", metrics: CoreWeb.Telemetry
+ live_dashboard "/dashboard", metrics: Legendary.CoreWeb.Telemetry
end
end
end
diff --git a/apps/core/lib/core_web/telemetry.ex b/apps/core/lib/core_web/telemetry.ex
index 5c77a538..74d4f3cf 100644
--- a/apps/core/lib/core_web/telemetry.ex
+++ b/apps/core/lib/core_web/telemetry.ex
@@ -1,4 +1,4 @@
-defmodule CoreWeb.Telemetry do
+defmodule Legendary.CoreWeb.Telemetry do
@moduledoc """
Collects metrics for the application and allows them to be transmitted using the Telemetry framework.
"""
@@ -52,7 +52,7 @@ defmodule CoreWeb.Telemetry do
[
# A module, function and arguments to be invoked periodically.
# This function must call :telemetry.execute/3 and a metric must be added above.
- # {CoreWeb, :count_users, []}
+ # {Legendary.CoreWeb, :count_users, []}
]
end
end
diff --git a/apps/core/lib/core_web/views/core_email_view.ex b/apps/core/lib/core_web/views/core_email_view.ex
index 7db88188..a4caa72e 100644
--- a/apps/core/lib/core_web/views/core_email_view.ex
+++ b/apps/core/lib/core_web/views/core_email_view.ex
@@ -1,8 +1,8 @@
-defmodule CoreWeb.CoreEmailView do
+defmodule Legendary.CoreWeb.CoreEmailView do
use Phoenix.View,
root: "lib/core_web/templates",
- namespace: CoreWeb,
+ namespace: Legendary.CoreWeb,
pattern: "**/*"
- import CoreWeb.EmailHelpers
+ import Legendary.CoreWeb.EmailHelpers
end
diff --git a/apps/core/lib/core_web/views/email_helpers.ex b/apps/core/lib/core_web/views/email_helpers.ex
index 24fbc7b8..46d0d6fb 100644
--- a/apps/core/lib/core_web/views/email_helpers.ex
+++ b/apps/core/lib/core_web/views/email_helpers.ex
@@ -1,4 +1,4 @@
-defmodule CoreWeb.EmailHelpers do
+defmodule Legendary.CoreWeb.EmailHelpers do
@moduledoc """
HTML helpers for emails.
"""
@@ -102,7 +102,7 @@ defmodule CoreWeb.EmailHelpers do
def effective_styles(group, overrides \\ %{}) do
group
|> framework_styles()
- |> Core.MapUtils.deep_merge(application_styles(group))
+ |> Legendary.Core.MapUtils.deep_merge(application_styles(group))
|> Map.merge(overrides)
end
@@ -276,10 +276,10 @@ defmodule CoreWeb.EmailHelpers do
~E"""
<%= wrapper do %>
- <%= I18n.t! "en", "email.company.name" %>
+ <%= Legendary.I18n.t! "en", "email.company.name" %>
- <%= I18n.t! "en", "email.company.address" %>
- <%= I18n.t! "en", "email.company.phone" %>
+ <%= Legendary.I18n.t! "en", "email.company.address" %>
+ <%= Legendary.I18n.t! "en", "email.company.phone" %>
|
diff --git a/apps/core/lib/core_web/views/error_helpers.ex b/apps/core/lib/core_web/views/error_helpers.ex
index 5fe2de2b..ec20a587 100644
--- a/apps/core/lib/core_web/views/error_helpers.ex
+++ b/apps/core/lib/core_web/views/error_helpers.ex
@@ -1,4 +1,4 @@
-defmodule CoreWeb.ErrorHelpers do
+defmodule Legendary.CoreWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
@@ -49,9 +49,9 @@ defmodule CoreWeb.ErrorHelpers do
# should be written to the errors.po file. The :count option is
# set by Ecto and indicates we should also apply plural rules.
if count = opts[:count] do
- Gettext.dngettext(CoreWeb.Gettext, "errors", msg, msg, count, opts)
+ Gettext.dngettext(Legendary.CoreWeb.Gettext, "errors", msg, msg, count, opts)
else
- Gettext.dgettext(CoreWeb.Gettext, "errors", msg, opts)
+ Gettext.dgettext(Legendary.CoreWeb.Gettext, "errors", msg, opts)
end
end
end
diff --git a/apps/core/lib/core_web/views/error_view.ex b/apps/core/lib/core_web/views/error_view.ex
index 1b783139..4c678b63 100644
--- a/apps/core/lib/core_web/views/error_view.ex
+++ b/apps/core/lib/core_web/views/error_view.ex
@@ -1,5 +1,5 @@
-defmodule CoreWeb.ErrorView do
- use CoreWeb, :view
+defmodule Legendary.CoreWeb.ErrorView do
+ use Legendary.CoreWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
diff --git a/apps/core/lib/core_web/views/helpers.ex b/apps/core/lib/core_web/views/helpers.ex
index 8a6a7252..4af16e83 100644
--- a/apps/core/lib/core_web/views/helpers.ex
+++ b/apps/core/lib/core_web/views/helpers.ex
@@ -1,16 +1,16 @@
-defmodule CoreWeb.Helpers do
+defmodule Legendary.CoreWeb.Helpers do
@moduledoc """
HTML helpers for our styled (Fomantic UI) forms.
"""
use Phoenix.HTML
import Phoenix.Controller, only: [get_flash: 2]
- import CoreWeb.ErrorHelpers
+ import Legendary.CoreWeb.ErrorHelpers
def has_role?(conn = %Plug.Conn{}, role) do
conn
|> Pow.Plug.current_user()
- |> Auth.Roles.has_role?(role)
+ |> Legendary.Auth.Roles.has_role?(role)
end
def changeset_error_block(changeset) do
diff --git a/apps/core/lib/core_web/views/layout_view.ex b/apps/core/lib/core_web/views/layout_view.ex
index c628224f..7a63a3d2 100644
--- a/apps/core/lib/core_web/views/layout_view.ex
+++ b/apps/core/lib/core_web/views/layout_view.ex
@@ -1,3 +1,3 @@
-defmodule CoreWeb.LayoutView do
- use CoreWeb, :view
+defmodule Legendary.CoreWeb.LayoutView do
+ use Legendary.CoreWeb, :view
end
diff --git a/apps/core/lib/i18n.ex b/apps/core/lib/i18n.ex
index 31035a0d..48067edc 100644
--- a/apps/core/lib/i18n.ex
+++ b/apps/core/lib/i18n.ex
@@ -1,4 +1,4 @@
-defmodule I18n do
+defmodule Legendary.I18n do
@moduledoc """
The internationalization and strings module. Keeps strings outside the codebase and allows them to
be replaced on a per locale basis by editing yml files.
diff --git a/apps/core/lib/mix/tasks/create_admin.ex b/apps/core/lib/mix/tasks/create_admin.ex
index 5450db0c..cd1dbe92 100644
--- a/apps/core/lib/mix/tasks/create_admin.ex
+++ b/apps/core/lib/mix/tasks/create_admin.ex
@@ -4,8 +4,8 @@ defmodule Mix.Tasks.Legendary.CreateAdmin do
"""
use Mix.Task
- alias Auth.User
- alias Core.Repo
+ alias Legendary.Auth.User
+ alias Legendary.Core.Repo
alias Ecto.Changeset
@shortdoc "Create an admin user."
diff --git a/apps/core/mix.exs b/apps/core/mix.exs
index dff319ed..f7c98bd1 100644
--- a/apps/core/mix.exs
+++ b/apps/core/mix.exs
@@ -1,4 +1,4 @@
-defmodule Core.MixProject do
+defmodule Legendary.Core.MixProject do
use Mix.Project
def project do
@@ -52,7 +52,7 @@ defmodule Core.MixProject do
# Type `mix help compile.app` for more information.
def application do
[
- mod: {Core.Application, []},
+ mod: {Legendary.Core.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
diff --git a/apps/core/priv/repo/migrations/20200714154549_create_users.exs b/apps/core/priv/repo/migrations/20200714154549_create_users.exs
index e41e6276..ee12716d 100644
--- a/apps/core/priv/repo/migrations/20200714154549_create_users.exs
+++ b/apps/core/priv/repo/migrations/20200714154549_create_users.exs
@@ -1,4 +1,4 @@
-defmodule Core.Repo.Migrations.CreateUsers do
+defmodule Legendary.Core.Repo.Migrations.CreateUsers do
use Ecto.Migration
def change do
diff --git a/apps/core/priv/repo/migrations/20200715221321_add_pow_email_confirmation_to_users.exs b/apps/core/priv/repo/migrations/20200715221321_add_pow_email_confirmation_to_users.exs
index 75c535f1..4f3b7dc6 100644
--- a/apps/core/priv/repo/migrations/20200715221321_add_pow_email_confirmation_to_users.exs
+++ b/apps/core/priv/repo/migrations/20200715221321_add_pow_email_confirmation_to_users.exs
@@ -1,4 +1,4 @@
-defmodule Core.Repo.Migrations.AddPowEmailConfirmationToUsers do
+defmodule Legendary.Core.Repo.Migrations.AddPowEmailConfirmationToUsers do
use Ecto.Migration
def change do
diff --git a/apps/core/priv/repo/migrations/20200717182733_add_roles_to_users.exs b/apps/core/priv/repo/migrations/20200717182733_add_roles_to_users.exs
index 25ab058e..b25dbb24 100644
--- a/apps/core/priv/repo/migrations/20200717182733_add_roles_to_users.exs
+++ b/apps/core/priv/repo/migrations/20200717182733_add_roles_to_users.exs
@@ -1,4 +1,4 @@
-defmodule Core.Repo.Migrations.AddRolesToUsers do
+defmodule Legendary.Core.Repo.Migrations.AddRolesToUsers do
use Ecto.Migration
def change do
diff --git a/apps/core/priv/repo/migrations/20200721214958_add_nicename_to_users.exs b/apps/core/priv/repo/migrations/20200721214958_add_nicename_to_users.exs
index d1b88370..0c1fb4ad 100644
--- a/apps/core/priv/repo/migrations/20200721214958_add_nicename_to_users.exs
+++ b/apps/core/priv/repo/migrations/20200721214958_add_nicename_to_users.exs
@@ -1,4 +1,4 @@
-defmodule Core.Repo.Migrations.AddNicenameToUsers do
+defmodule Legendary.Core.Repo.Migrations.AddNicenameToUsers do
use Ecto.Migration
def change do
diff --git a/apps/core/priv/repo/migrations/20200721215212_add_url_to_users.exs b/apps/core/priv/repo/migrations/20200721215212_add_url_to_users.exs
index de433a16..1a201109 100644
--- a/apps/core/priv/repo/migrations/20200721215212_add_url_to_users.exs
+++ b/apps/core/priv/repo/migrations/20200721215212_add_url_to_users.exs
@@ -1,4 +1,4 @@
-defmodule Core.Repo.Migrations.AddUrlToUsers do
+defmodule Legendary.Core.Repo.Migrations.AddUrlToUsers do
use Ecto.Migration
def change do
diff --git a/apps/core/priv/repo/seeds.exs b/apps/core/priv/repo/seeds.exs
index 918d52bf..1258d23e 100644
--- a/apps/core/priv/repo/seeds.exs
+++ b/apps/core/priv/repo/seeds.exs
@@ -5,7 +5,7 @@
# Inside the script, you can read and write to any of your
# repositories directly:
#
-# Core.Repo.insert!(%Core.SomeSchema{})
+# Legendary.Core.Repo.insert!(%Legendary.Core.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail if something goes wrong.
diff --git a/apps/core/test/auth/roles_test.exs b/apps/core/test/auth/roles_test.exs
index afccc273..b9e159fc 100644
--- a/apps/core/test/auth/roles_test.exs
+++ b/apps/core/test/auth/roles_test.exs
@@ -1,9 +1,9 @@
-defmodule Auth.RolesTest do
- use Core.DataCase
+defmodule Legendary.Auth.RolesTest do
+ use Legendary.Core.DataCase
- import Auth.Roles
+ import Legendary.Auth.Roles
- alias Auth.User
+ alias Legendary.Auth.User
describe "has_role?/2" do
test "with no user" do
diff --git a/apps/core/test/auth/user_test.exs b/apps/core/test/auth/user_test.exs
index 17e1c17e..ebeb056c 100644
--- a/apps/core/test/auth/user_test.exs
+++ b/apps/core/test/auth/user_test.exs
@@ -1,9 +1,9 @@
-defmodule Auth.UserTest do
- use Core.DataCase
+defmodule Legendary.Auth.UserTest do
+ use Legendary.Core.DataCase
- import Auth.User
+ import Legendary.Auth.User
- alias Auth.User
+ alias Legendary.Auth.User
describe "admin_changeset/2" do
test "handles roles from text properly" do
diff --git a/apps/core/test/auth_web/helpers_test.exs b/apps/core/test/auth_web/helpers_test.exs
index 7c3f911f..20bc71b1 100644
--- a/apps/core/test/auth_web/helpers_test.exs
+++ b/apps/core/test/auth_web/helpers_test.exs
@@ -1,14 +1,14 @@
-defmodule AuthWeb.HelpersTest do
- use CoreWeb.ConnCase
+defmodule Legendary.AuthWeb.HelpersTest do
+ use Legendary.CoreWeb.ConnCase
- import AuthWeb.Helpers
+ import Legendary.AuthWeb.Helpers
describe "has_role?/2" do
test "with a user", %{conn: conn} do
conn =
conn
|> Pow.Plug.put_config(current_user_assigns_key: :current_user)
- |> Pow.Plug.assign_current_user(%Auth.User{roles: ["admin"]}, [])
+ |> Pow.Plug.assign_current_user(%Legendary.Auth.User{roles: ["admin"]}, [])
assert has_role?(conn, "admin")
refute has_role?(conn, "blooper")
diff --git a/apps/core/test/auth_web/plugs/require_admin_test.exs b/apps/core/test/auth_web/plugs/require_admin_test.exs
index f44fa7b8..35d2f09f 100644
--- a/apps/core/test/auth_web/plugs/require_admin_test.exs
+++ b/apps/core/test/auth_web/plugs/require_admin_test.exs
@@ -1,8 +1,8 @@
-defmodule AuthWeb.Plugs.RequireAdminTest do
- use CoreWeb.ConnCase
+defmodule Legendary.AuthWeb.Plugs.RequireAdminTest do
+ use Legendary.CoreWeb.ConnCase
- alias AuthWeb.Plugs.RequireAdmin
- alias Auth.User
+ alias Legendary.AuthWeb.Plugs.RequireAdmin
+ alias Legendary.Auth.User
setup %{conn: conn} do
%{conn: Pow.Plug.put_config(conn, current_user_assigns_key: :current_user)}
diff --git a/apps/core/test/auth_web/pow/mailer_test.exs b/apps/core/test/auth_web/pow/mailer_test.exs
index 7f663d94..de546b19 100644
--- a/apps/core/test/auth_web/pow/mailer_test.exs
+++ b/apps/core/test/auth_web/pow/mailer_test.exs
@@ -1,10 +1,10 @@
-defmodule AuthWeb.Pow.MailerTest do
+defmodule Legendary.AuthWeb.Pow.MailerTest do
use ExUnit.Case
use Bamboo.Test
- import AuthWeb.Pow.Mailer
+ import Legendary.AuthWeb.Pow.Mailer
- alias Auth.User
+ alias Legendary.Auth.User
def hello_email do
cast(%{
diff --git a/apps/core/test/auth_web/views/error_view_test.exs b/apps/core/test/auth_web/views/error_view_test.exs
index 5ca0cd6e..60abdc1e 100644
--- a/apps/core/test/auth_web/views/error_view_test.exs
+++ b/apps/core/test/auth_web/views/error_view_test.exs
@@ -1,14 +1,14 @@
-defmodule AuthWeb.ErrorViewTest do
- use CoreWeb.ConnCase, async: true
+defmodule Legendary.AuthWeb.ErrorViewTest do
+ use Legendary.CoreWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
- assert render_to_string(AuthWeb.ErrorView, "404.html", []) == "Not Found"
+ assert render_to_string(Legendary.AuthWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
- assert render_to_string(AuthWeb.ErrorView, "500.html", []) == "Internal Server Error"
+ assert render_to_string(Legendary.AuthWeb.ErrorView, "500.html", []) == "Internal Server Error"
end
end
diff --git a/apps/core/test/auth_web/views/layout_view_test.exs b/apps/core/test/auth_web/views/layout_view_test.exs
index abbfd642..e0371b0d 100644
--- a/apps/core/test/auth_web/views/layout_view_test.exs
+++ b/apps/core/test/auth_web/views/layout_view_test.exs
@@ -1,5 +1,5 @@
-defmodule AuthWeb.LayoutViewTest do
- use CoreWeb.ConnCase, async: true
+defmodule Legendary.AuthWeb.LayoutViewTest do
+ use Legendary.CoreWeb.ConnCase, async: true
# When testing helpers, you may want to import Phoenix.HTML and
# use functions such as safe_to_string() to convert the helper
diff --git a/apps/core/test/auth_web/views/page_view_test.exs b/apps/core/test/auth_web/views/page_view_test.exs
index c2c20457..a0a00580 100644
--- a/apps/core/test/auth_web/views/page_view_test.exs
+++ b/apps/core/test/auth_web/views/page_view_test.exs
@@ -1,3 +1,3 @@
-defmodule AuthWeb.PageViewTest do
- use CoreWeb.ConnCase, async: true
+defmodule Legendary.AuthWeb.PageViewTest do
+ use Legendary.CoreWeb.ConnCase, async: true
end
diff --git a/apps/core/test/core/core_email_test.exs b/apps/core/test/core/core_email_test.exs
index b0f720f2..4429ddcc 100644
--- a/apps/core/test/core/core_email_test.exs
+++ b/apps/core/test/core/core_email_test.exs
@@ -1,7 +1,7 @@
defmodule CoreEmailTest do
- use Core.DataCase
+ use Legendary.Core.DataCase
- import CoreEmail
+ import Legendary.CoreEmail
test "base_email/1" do
assert %Bamboo.Email{} = base_email()
diff --git a/apps/core/test/core/map_utils_test.exs b/apps/core/test/core/map_utils_test.exs
index 862d9b2f..e166f4e0 100644
--- a/apps/core/test/core/map_utils_test.exs
+++ b/apps/core/test/core/map_utils_test.exs
@@ -1,7 +1,7 @@
-defmodule Core.MapUtilsTest do
- use Core.DataCase
+defmodule Legendary.Core.MapUtilsTest do
+ use Legendary.Core.DataCase
- import Core.MapUtils
+ import Legendary.Core.MapUtils
test "deep_merge/2" do
assert deep_merge(
diff --git a/apps/core/test/core_web/views/email_helpers_test.exs b/apps/core/test/core_web/views/email_helpers_test.exs
index 98014b4a..378b0b11 100644
--- a/apps/core/test/core_web/views/email_helpers_test.exs
+++ b/apps/core/test/core_web/views/email_helpers_test.exs
@@ -1,7 +1,7 @@
-defmodule CoreWeb.EmailHelpersTest do
- use Core.DataCase
+defmodule Legendary.CoreWeb.EmailHelpersTest do
+ use Legendary.Core.DataCase
- import CoreWeb.EmailHelpers
+ import Legendary.CoreWeb.EmailHelpers
import Phoenix.HTML, only: [safe_to_string: 1]
test "framework_styles/0" do
@@ -92,6 +92,6 @@ defmodule CoreWeb.EmailHelpersTest do
test "footer/0" do
markup = safe_to_string(footer())
- assert markup =~ I18n.t! "en", "email.company.name"
+ assert markup =~ Legendary.I18n.t! "en", "email.company.name"
end
end
diff --git a/apps/core/test/core_web/views/error_helpers_test.exs b/apps/core/test/core_web/views/error_helpers_test.exs
index 0db085a2..39d04f8f 100644
--- a/apps/core/test/core_web/views/error_helpers_test.exs
+++ b/apps/core/test/core_web/views/error_helpers_test.exs
@@ -1,7 +1,7 @@
-defmodule CoreWeb.ErrorHelpersTest do
- use Core.DataCase
+defmodule Legendary.CoreWeb.ErrorHelpersTest do
+ use Legendary.Core.DataCase
- import CoreWeb.ErrorHelpers
+ import Legendary.CoreWeb.ErrorHelpers
import Phoenix.HTML, only: [safe_to_string: 1]
import Phoenix.HTML.Form, only: [form_for: 3]
diff --git a/apps/core/test/core_web/views/error_view_test.exs b/apps/core/test/core_web/views/error_view_test.exs
index 55812f9e..2ac37672 100644
--- a/apps/core/test/core_web/views/error_view_test.exs
+++ b/apps/core/test/core_web/views/error_view_test.exs
@@ -1,14 +1,14 @@
-defmodule CoreWeb.ErrorViewTest do
- use CoreWeb.ConnCase, async: true
+defmodule Legendary.CoreWeb.ErrorViewTest do
+ use Legendary.CoreWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
- assert render_to_string(CoreWeb.ErrorView, "404.html", []) == "Not Found"
+ assert render_to_string(Legendary.CoreWeb.ErrorView, "404.html", []) == "Not Found"
end
test "renders 500.html" do
- assert render_to_string(CoreWeb.ErrorView, "500.html", []) == "Internal Server Error"
+ assert render_to_string(Legendary.CoreWeb.ErrorView, "500.html", []) == "Internal Server Error"
end
end
diff --git a/apps/core/test/core_web/views/helpers_test.exs b/apps/core/test/core_web/views/helpers_test.exs
index 30ec8907..e0b8b6ba 100644
--- a/apps/core/test/core_web/views/helpers_test.exs
+++ b/apps/core/test/core_web/views/helpers_test.exs
@@ -1,7 +1,7 @@
-defmodule CoreWeb.HelpersTest do
- use CoreWeb.ConnCase
+defmodule Legendary.CoreWeb.HelpersTest do
+ use Legendary.CoreWeb.ConnCase
- import CoreWeb.Helpers
+ import Legendary.CoreWeb.Helpers
import Ecto.Changeset,
only: [cast: 3, validate_required: 2, apply_action: 2]
import Phoenix.HTML, only: [safe_to_string: 1]
@@ -40,7 +40,7 @@ defmodule CoreWeb.HelpersTest do
conn =
conn
|> Pow.Plug.put_config(current_user_assigns_key: :current_user)
- |> Pow.Plug.assign_current_user(%Auth.User{roles: ["admin"]}, [])
+ |> Pow.Plug.assign_current_user(%Legendary.Auth.User{roles: ["admin"]}, [])
assert has_role?(conn, "admin")
refute has_role?(conn, "blooper")
diff --git a/apps/core/test/core_web/views/layout_view_test.exs b/apps/core/test/core_web/views/layout_view_test.exs
index 26103b51..97235ba3 100644
--- a/apps/core/test/core_web/views/layout_view_test.exs
+++ b/apps/core/test/core_web/views/layout_view_test.exs
@@ -1,3 +1,3 @@
-defmodule CoreWeb.LayoutViewTest do
- use CoreWeb.ConnCase, async: true
+defmodule Legendary.CoreWeb.LayoutViewTest do
+ use Legendary.CoreWeb.ConnCase, async: true
end
diff --git a/apps/core/test/core_web/views/page_view_test.exs b/apps/core/test/core_web/views/page_view_test.exs
index e47ecb2b..6f35c62d 100644
--- a/apps/core/test/core_web/views/page_view_test.exs
+++ b/apps/core/test/core_web/views/page_view_test.exs
@@ -1,3 +1,3 @@
-defmodule CoreWeb.PageViewTest do
- use CoreWeb.ConnCase, async: true
+defmodule Legendary.CoreWeb.PageViewTest do
+ use Legendary.CoreWeb.ConnCase, async: true
end
diff --git a/apps/core/test/mix/legendary_test.exs b/apps/core/test/mix/legendary_test.exs
index f84497b1..6a0e60a7 100644
--- a/apps/core/test/mix/legendary_test.exs
+++ b/apps/core/test/mix/legendary_test.exs
@@ -1,5 +1,5 @@
defmodule Mix.LegendaryTest do
- use Core.DataCase
+ use Legendary.Core.DataCase
alias Mix.Phoenix.{Schema}
diff --git a/apps/core/test/support/channel_case.ex b/apps/core/test/support/channel_case.ex
index d4edcb78..791a1bce 100644
--- a/apps/core/test/support/channel_case.ex
+++ b/apps/core/test/support/channel_case.ex
@@ -1,4 +1,4 @@
-defmodule CoreWeb.ChannelCase do
+defmodule Legendary.CoreWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
@@ -11,7 +11,7 @@ defmodule CoreWeb.ChannelCase do
we enable the SQL sandbox, so changes done to the database
are reverted at the end of every test. If you are using
PostgreSQL, you can even run database tests asynchronously
- by setting `use CoreWeb.ChannelCase, async: true`, although
+ by setting `use Legendary.CoreWeb.ChannelCase, async: true`, although
this option is not recommended for other databases.
"""
@@ -21,18 +21,18 @@ defmodule CoreWeb.ChannelCase do
quote do
# Import conveniences for testing with channels
import Phoenix.ChannelTest
- import CoreWeb.ChannelCase
+ import Legendary.CoreWeb.ChannelCase
# The default endpoint for testing
- @endpoint CoreWeb.Endpoint
+ @endpoint Legendary.CoreWeb.Endpoint
end
end
setup tags do
- :ok = Ecto.Adapters.SQL.Sandbox.checkout(Core.Repo)
+ :ok = Ecto.Adapters.SQL.Sandbox.checkout(Legendary.Core.Repo)
unless tags[:async] do
- Ecto.Adapters.SQL.Sandbox.mode(Core.Repo, {:shared, self()})
+ Ecto.Adapters.SQL.Sandbox.mode(Legendary.Core.Repo, {:shared, self()})
end
:ok
diff --git a/apps/core/test/support/conn_case.ex b/apps/core/test/support/conn_case.ex
index 82469624..69f5c748 100644
--- a/apps/core/test/support/conn_case.ex
+++ b/apps/core/test/support/conn_case.ex
@@ -1,4 +1,4 @@
-defmodule CoreWeb.ConnCase do
+defmodule Legendary.CoreWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
@@ -11,7 +11,7 @@ defmodule CoreWeb.ConnCase do
we enable the SQL sandbox, so changes done to the database
are reverted at the end of every test. If you are using
PostgreSQL, you can even run database tests asynchronously
- by setting `use CoreWeb.ConnCase, async: true`, although
+ by setting `use Legendary.CoreWeb.ConnCase, async: true`, although
this option is not recommended for other databases.
"""
@@ -22,20 +22,20 @@ defmodule CoreWeb.ConnCase do
# Import conveniences for testing with connections
import Plug.Conn
import Phoenix.ConnTest
- import CoreWeb.ConnCase
+ import Legendary.CoreWeb.ConnCase
- alias CoreWeb.Router.Helpers, as: Routes
+ alias Legendary.CoreWeb.Router.Helpers, as: Routes
# The default endpoint for testing
- @endpoint CoreWeb.Endpoint
+ @endpoint Legendary.CoreWeb.Endpoint
end
end
setup tags do
- :ok = Ecto.Adapters.SQL.Sandbox.checkout(Core.Repo)
+ :ok = Ecto.Adapters.SQL.Sandbox.checkout(Legendary.Core.Repo)
unless tags[:async] do
- Ecto.Adapters.SQL.Sandbox.mode(Core.Repo, {:shared, self()})
+ Ecto.Adapters.SQL.Sandbox.mode(Legendary.Core.Repo, {:shared, self()})
end
{:ok, conn: Phoenix.ConnTest.build_conn()}
diff --git a/apps/core/test/support/data_case.ex b/apps/core/test/support/data_case.ex
index 98c2aaae..45253d44 100644
--- a/apps/core/test/support/data_case.ex
+++ b/apps/core/test/support/data_case.ex
@@ -1,4 +1,4 @@
-defmodule Core.DataCase do
+defmodule Legendary.Core.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
@@ -10,7 +10,7 @@ defmodule Core.DataCase do
we enable the SQL sandbox, so changes done to the database
are reverted at the end of every test. If you are using
PostgreSQL, you can even run database tests asynchronously
- by setting `use Core.DataCase, async: true`, although
+ by setting `use Legendary.Core.DataCase, async: true`, although
this option is not recommended for other databases.
"""
@@ -18,20 +18,20 @@ defmodule Core.DataCase do
using do
quote do
- alias Core.Repo
+ alias Legendary.Core.Repo
import Ecto
import Ecto.Changeset
import Ecto.Query
- import Core.DataCase
+ import Legendary.Core.DataCase
end
end
setup tags do
- :ok = Ecto.Adapters.SQL.Sandbox.checkout(Core.Repo)
+ :ok = Ecto.Adapters.SQL.Sandbox.checkout(Legendary.Core.Repo)
unless tags[:async] do
- Ecto.Adapters.SQL.Sandbox.mode(Core.Repo, {:shared, self()})
+ Ecto.Adapters.SQL.Sandbox.mode(Legendary.Core.Repo, {:shared, self()})
end
:ok
diff --git a/apps/core/test/test_helper.exs b/apps/core/test/test_helper.exs
index e7e3f452..e74a14a8 100644
--- a/apps/core/test/test_helper.exs
+++ b/apps/core/test/test_helper.exs
@@ -1,2 +1,2 @@
ExUnit.start()
-Ecto.Adapters.SQL.Sandbox.mode(Core.Repo, :manual)
+Ecto.Adapters.SQL.Sandbox.mode(Legendary.Core.Repo, :manual)
diff --git a/config/admin.exs b/config/admin.exs
index e5c48e15..22edf937 100644
--- a/config/admin.exs
+++ b/config/admin.exs
@@ -2,26 +2,26 @@ use Mix.Config
config :kaffy,
otp_app: :admin,
- ecto_repo: Admin.Repo,
+ ecto_repo: Legendary.Admin.Repo,
extensions: [
- Admin.Kaffy.EditorExtension,
+ Legendary.Admin.Kaffy.EditorExtension,
],
- router: Admin.Router,
- resources: &Admin.Kaffy.Config.create_resources/1
+ router: Legendary.Admin.Router,
+ resources: &Legendary.Admin.Kaffy.Config.create_resources/1
-config :admin, Admin,
+config :admin, Legendary.Admin,
resources: [
auth: [
- name: "Auth",
+ name: "Legendary.Auth",
resources: [
- user: [schema: Auth.User, admin: Auth.UserAdmin],
+ user: [schema: Legendary.Auth.User, admin: Legendary.Auth.UserAdmin],
]
],
content: [
- name: "Content",
+ name: "Legendary.Content",
resources: [
- post: [schema: Content.Post, admin: Content.PostAdmin, label: "Posts and Pages", id_column: :name],
- comment: [schema: Content.Comment, admin: Content.CommentAdmin],
+ post: [schema: Legendary.Content.Post, admin: Legendary.Content.PostAdmin, label: "Posts and Pages", id_column: :name],
+ comment: [schema: Legendary.Content.Comment, admin: Legendary.Content.CommentAdmin],
]
]
]
diff --git a/config/config.exs b/config/config.exs
index 367f0b08..669b11f0 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -1,11 +1,11 @@
use Mix.Config
[
- {:admin, Admin, false},
+ {:admin, Legendary.Admin, false},
{:app, AppWeb, true},
- {:core, AuthWeb, false},
- {:content, Content, false},
- {:core, CoreWeb, false},
+ {:core, Legendary.AuthWeb, false},
+ {:content, Legendary.Content, false},
+ {:core, Legendary.CoreWeb, false},
]
|> Enum.map(fn {otp_app, module, start_server} ->
endpoint = Module.concat(module, "Endpoint")
@@ -21,10 +21,10 @@ use Mix.Config
end)
[
- {:admin, Admin.Repo},
+ {:admin, Legendary.Admin.Repo},
{:app, App.Repo},
- {:content, Content.Repo},
- {:core, Core.Repo},
+ {:content, Legendary.Content.Repo},
+ {:core, Legendary.Core.Repo},
]
|> Enum.map(fn
{otp_app, repo} ->
@@ -33,17 +33,17 @@ end)
generators: [context_app: otp_app]
config otp_app, repo,
- pool: Core.SharedDBConnectionPool
+ pool: Legendary.Core.SharedDBConnectionPool
end)
config :core, :pow,
- user: Auth.User,
- repo: Core.Repo,
+ user: Legendary.Auth.User,
+ repo: Legendary.Core.Repo,
extensions: [PowEmailConfirmation, PowPersistentSession, PowResetPassword],
controller_callbacks: Pow.Extension.Phoenix.ControllerCallbacks,
- mailer_backend: AuthWeb.Pow.Mailer,
- web_mailer_module: AuthWeb,
- web_module: AuthWeb
+ mailer_backend: Legendary.AuthWeb.Pow.Mailer,
+ web_mailer_module: Legendary.AuthWeb,
+ web_module: Legendary.AuthWeb
config :core, email_from: "example@example.org"
@@ -60,10 +60,10 @@ config :linguist, pluralization_key: :count
config :content,
Oban,
- repo: Content.Repo,
+ repo: Legendary.Content.Repo,
queues: [default: 10],
crontab: [
- {"0 * * * *", Content.Sitemaps},
+ {"0 * * * *", Legendary.Content.Sitemaps},
]
import_config "email_styles.exs"
diff --git a/config/dev.exs b/config/dev.exs
index 7c58cba3..31f63c4d 100644
--- a/config/dev.exs
+++ b/config/dev.exs
@@ -7,11 +7,11 @@ use Mix.Config
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
[
- {:admin, Admin},
+ {:admin, Legendary.Admin},
{:app, AppWeb},
- {:core, AuthWeb},
- {:content, Content},
- {:core, CoreWeb},
+ {:core, Legendary.AuthWeb},
+ {:content, Legendary.Content},
+ {:core, Legendary.CoreWeb},
]
|> Enum.map(fn {otp_app, module} ->
config otp_app, Module.concat(module, "Endpoint"),
@@ -41,10 +41,10 @@ use Mix.Config
end)
[
- {:admin, Admin.Repo},
+ {:admin, Legendary.Admin.Repo},
{:app, App.Repo},
- {:content, Content.Repo},
- {:core, Core.Repo}
+ {:content, Legendary.Content.Repo},
+ {:core, Legendary.Core.Repo}
]
|> Enum.map(fn {otp_app, repo} ->
config otp_app, repo,
@@ -56,7 +56,7 @@ end)
pool_size: 10
end)
-config :core, CoreMailer, adapter: Bamboo.LocalAdapter
+config :core, Legendary.CoreMailer, adapter: Bamboo.LocalAdapter
# ## SSL Support
#
diff --git a/config/prod.exs b/config/prod.exs
index c4b10dd0..4bc1d701 100644
--- a/config/prod.exs
+++ b/config/prod.exs
@@ -13,10 +13,10 @@ use Mix.Config
secret_key_base = System.get_env("SECRET_KEY_BASE")
[
- {:admin, Admin, false},
+ {:admin, Legendary.Admin, false},
{:app, AppWeb, true},
- {:content, Content, false},
- {:core, CoreWeb, false},
+ {:content, ContentWeb, false},
+ {:core, Legendary.CoreWeb, false},
]
|> Enum.map(fn {otp_app, module, start_server} ->
endpoint = Module.concat(module, "Endpoint")
@@ -45,7 +45,7 @@ end)
# If you are doing OTP releases, you need to instruct Phoenix
# to start each relevant endpoint:
#
-# config :admin, Admin.Endpoint, server: true
+# config :admin, Legendary.Admin.Endpoint, server: true
#
# Then you can assemble a release by calling `mix release`.
# See `mix help release` for more information.
@@ -53,10 +53,10 @@ end)
database_url = System.get_env("DATABASE_URL")
[
- {:admin, Admin.Repo},
+ {:admin, Legendary.Admin.Repo},
{:app, App.Repo},
- {:content, Content.Repo},
- {:core, Core.Repo}
+ {:content, Legendary.Content.Repo},
+ {:core, Legendary.Core.Repo}
]
|> Enum.map(fn {otp_app, repo} ->
config otp_app, repo,
@@ -69,7 +69,7 @@ end)
# If you are doing OTP releases, you need to instruct Phoenix
# to start each relevant endpoint:
#
-# config :auth_web, AuthWeb.Endpoint, server: true
+# config :auth_web, Legendary.AuthWeb.Endpoint, server: true
#
# Then you can assemble a release by calling `mix release`.
# See `mix help release` for more information.
@@ -79,7 +79,7 @@ end)
# To get SSL working, you will need to add the `https` key
# to the previous section and set your `:url` port to 443:
#
-# config :content, Content.Endpoint,
+# config :content, Legendary.Content.Endpoint,
# ...
# url: [host: "example.com", port: 443],
# https: [
@@ -103,7 +103,7 @@ end)
# We also recommend setting `force_ssl` in your endpoint, ensuring
# no data is ever sent via http, always redirecting to https:
#
-# config :content, Content.Endpoint,
+# config :content, Legendary.Content.Endpoint,
# force_ssl: [hsts: true]
#
# Check `Plug.SSL` for all available options in `force_ssl`.
diff --git a/config/test.exs b/config/test.exs
index f63bc104..3c082b62 100644
--- a/config/test.exs
+++ b/config/test.exs
@@ -3,11 +3,11 @@ use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
[
- {:admin, Admin},
+ {:admin, Legendary.Admin},
{:app, AppWeb},
- {:core, AuthWeb},
- {:content, Content},
- {:core, CoreWeb},
+ {:core, Legendary.AuthWeb},
+ {:content, Legendary.Content},
+ {:core, Legendary.CoreWeb},
]
|> Enum.map(fn {otp_app, module} ->
config otp_app, Module.concat(module, "Endpoint"),
@@ -22,10 +22,10 @@ end)
# Run `mix help test` for more information.
[
- {:admin, Admin.Repo},
+ {:admin, Legendary.Admin.Repo},
{:app, App.Repo},
- {:content, Content.Repo},
- {:core, Core.Repo}
+ {:content, Legendary.Content.Repo},
+ {:core, Legendary.Core.Repo}
]
|> Enum.map(fn {otp_app, repo} ->
config otp_app, repo,
@@ -36,7 +36,7 @@ end)
pool: Ecto.Adapters.SQL.Sandbox
end)
-config :core, CoreMailer, adapter: Bamboo.TestAdapter
+config :core, Legendary.CoreMailer, adapter: Bamboo.TestAdapter
config :content, Oban, crontab: false, queues: false, plugins: false
diff --git a/mix.exs b/mix.exs
index da0d3813..0d43a283 100644
--- a/mix.exs
+++ b/mix.exs
@@ -3,6 +3,7 @@ defmodule Legendary.Mixfile do
def project do
[
+ name: "Legendary",
apps_path: "apps",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,