From 0374df1d12a4c28fac72be9b9c0545d318c10385 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Tue, 23 Jun 2020 21:10:32 +0300 Subject: [PATCH] other files consistency --- lib/pleroma/{captcha => }/captcha.ex | 0 lib/pleroma/captcha/{captcha_service.ex => service.ex} | 0 lib/pleroma/{config => }/config_db.ex | 0 .../recipient_ship.ex} | 0 lib/pleroma/{gun => }/gun.ex | 0 lib/pleroma/{http => }/http.ex | 0 lib/pleroma/{reverse_proxy => }/reverse_proxy.ex | 0 lib/pleroma/web/{common_api => }/common_api.ex | 0 .../redirect_controller.ex} | 2 +- lib/pleroma/web/{federator => }/federator.ex | 0 lib/pleroma/web/feed/user_controller.ex | 3 +-- lib/pleroma/web/{media_proxy => }/media_proxy.ex | 0 .../web/media_proxy/{invalidations => invalidation}/http.ex | 0 .../web/media_proxy/{invalidations => invalidation}/script.ex | 0 .../web/metadata/providers/{opengraph.ex => open_graph.ex} | 0 lib/pleroma/web/o_status/o_status_controller.ex | 2 +- lib/pleroma/web/router.ex | 2 +- test/pleroma/web/feed/user_controller_test.exs | 2 +- 18 files changed, 5 insertions(+), 6 deletions(-) rename lib/pleroma/{captcha => }/captcha.ex (100%) rename lib/pleroma/captcha/{captcha_service.ex => service.ex} (100%) rename lib/pleroma/{config => }/config_db.ex (100%) rename lib/pleroma/conversation/{participation_recipient_ship.ex => participation/recipient_ship.ex} (100%) rename lib/pleroma/{gun => }/gun.ex (100%) rename lib/pleroma/{http => }/http.ex (100%) rename lib/pleroma/{reverse_proxy => }/reverse_proxy.ex (100%) rename lib/pleroma/web/{common_api => }/common_api.ex (100%) rename lib/pleroma/web/{fallback_redirect_controller.ex => fallback/redirect_controller.ex} (97%) rename lib/pleroma/web/{federator => }/federator.ex (100%) rename lib/pleroma/web/{media_proxy => }/media_proxy.ex (100%) rename lib/pleroma/web/media_proxy/{invalidations => invalidation}/http.ex (100%) rename lib/pleroma/web/media_proxy/{invalidations => invalidation}/script.ex (100%) rename lib/pleroma/web/metadata/providers/{opengraph.ex => open_graph.ex} (100%) diff --git a/lib/pleroma/captcha/captcha.ex b/lib/pleroma/captcha.ex similarity index 100% rename from lib/pleroma/captcha/captcha.ex rename to lib/pleroma/captcha.ex diff --git a/lib/pleroma/captcha/captcha_service.ex b/lib/pleroma/captcha/service.ex similarity index 100% rename from lib/pleroma/captcha/captcha_service.ex rename to lib/pleroma/captcha/service.ex diff --git a/lib/pleroma/config/config_db.ex b/lib/pleroma/config_db.ex similarity index 100% rename from lib/pleroma/config/config_db.ex rename to lib/pleroma/config_db.ex diff --git a/lib/pleroma/conversation/participation_recipient_ship.ex b/lib/pleroma/conversation/participation/recipient_ship.ex similarity index 100% rename from lib/pleroma/conversation/participation_recipient_ship.ex rename to lib/pleroma/conversation/participation/recipient_ship.ex diff --git a/lib/pleroma/gun/gun.ex b/lib/pleroma/gun.ex similarity index 100% rename from lib/pleroma/gun/gun.ex rename to lib/pleroma/gun.ex diff --git a/lib/pleroma/http/http.ex b/lib/pleroma/http.ex similarity index 100% rename from lib/pleroma/http/http.ex rename to lib/pleroma/http.ex diff --git a/lib/pleroma/reverse_proxy/reverse_proxy.ex b/lib/pleroma/reverse_proxy.ex similarity index 100% rename from lib/pleroma/reverse_proxy/reverse_proxy.ex rename to lib/pleroma/reverse_proxy.ex diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api.ex similarity index 100% rename from lib/pleroma/web/common_api/common_api.ex rename to lib/pleroma/web/common_api.ex diff --git a/lib/pleroma/web/fallback_redirect_controller.ex b/lib/pleroma/web/fallback/redirect_controller.ex similarity index 97% rename from lib/pleroma/web/fallback_redirect_controller.ex rename to lib/pleroma/web/fallback/redirect_controller.ex index 431ad5485..a7b36a34b 100644 --- a/lib/pleroma/web/fallback_redirect_controller.ex +++ b/lib/pleroma/web/fallback/redirect_controller.ex @@ -2,7 +2,7 @@ # Copyright © 2017-2020 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only -defmodule Fallback.RedirectController do +defmodule Pleroma.Web.Fallback.RedirectController do use Pleroma.Web, :controller require Logger diff --git a/lib/pleroma/web/federator/federator.ex b/lib/pleroma/web/federator.ex similarity index 100% rename from lib/pleroma/web/federator/federator.ex rename to lib/pleroma/web/federator.ex diff --git a/lib/pleroma/web/feed/user_controller.ex b/lib/pleroma/web/feed/user_controller.ex index 71eb1ea7e..bea07649b 100644 --- a/lib/pleroma/web/feed/user_controller.ex +++ b/lib/pleroma/web/feed/user_controller.ex @@ -5,7 +5,6 @@ defmodule Pleroma.Web.Feed.UserController do use Pleroma.Web, :controller - alias Fallback.RedirectController alias Pleroma.User alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.ActivityPubController @@ -17,7 +16,7 @@ defmodule Pleroma.Web.Feed.UserController do def feed_redirect(%{assigns: %{format: "html"}} = conn, %{"nickname" => nickname}) do with {_, %User{} = user} <- {:fetch_user, User.get_cached_by_nickname_or_id(nickname)} do - RedirectController.redirector_with_meta(conn, %{user: user}) + Pleroma.Web.Fallback.RedirectController.redirector_with_meta(conn, %{user: user}) end end diff --git a/lib/pleroma/web/media_proxy/media_proxy.ex b/lib/pleroma/web/media_proxy.ex similarity index 100% rename from lib/pleroma/web/media_proxy/media_proxy.ex rename to lib/pleroma/web/media_proxy.ex diff --git a/lib/pleroma/web/media_proxy/invalidations/http.ex b/lib/pleroma/web/media_proxy/invalidation/http.ex similarity index 100% rename from lib/pleroma/web/media_proxy/invalidations/http.ex rename to lib/pleroma/web/media_proxy/invalidation/http.ex diff --git a/lib/pleroma/web/media_proxy/invalidations/script.ex b/lib/pleroma/web/media_proxy/invalidation/script.ex similarity index 100% rename from lib/pleroma/web/media_proxy/invalidations/script.ex rename to lib/pleroma/web/media_proxy/invalidation/script.ex diff --git a/lib/pleroma/web/metadata/providers/opengraph.ex b/lib/pleroma/web/metadata/providers/open_graph.ex similarity index 100% rename from lib/pleroma/web/metadata/providers/opengraph.ex rename to lib/pleroma/web/metadata/providers/open_graph.ex diff --git a/lib/pleroma/web/o_status/o_status_controller.ex b/lib/pleroma/web/o_status/o_status_controller.ex index de1b0b3f0..9a4a350ae 100644 --- a/lib/pleroma/web/o_status/o_status_controller.ex +++ b/lib/pleroma/web/o_status/o_status_controller.ex @@ -5,7 +5,6 @@ defmodule Pleroma.Web.OStatus.OStatusController do use Pleroma.Web, :controller - alias Fallback.RedirectController alias Pleroma.Activity alias Pleroma.Object alias Pleroma.Plugs.RateLimiter @@ -13,6 +12,7 @@ defmodule Pleroma.Web.OStatus.OStatusController do alias Pleroma.Web.ActivityPub.ActivityPubController alias Pleroma.Web.ActivityPub.Visibility alias Pleroma.Web.Endpoint + alias Pleroma.Web.Fallback.Fallback.RedirectController alias Pleroma.Web.Metadata.PlayerView alias Pleroma.Web.Router diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index e22b31b4c..48bb834b9 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -737,7 +737,7 @@ defmodule Pleroma.Web.Router do get("/check_password", MongooseIMController, :check_password) end - scope "/", Fallback do + scope "/", Pleroma.Web.Fallback do get("/registration/:token", RedirectController, :registration_page) get("/:maybe_nickname_or_id", RedirectController, :redirector_with_meta) get("/api*path", RedirectController, :api_not_implemented) diff --git a/test/pleroma/web/feed/user_controller_test.exs b/test/pleroma/web/feed/user_controller_test.exs index 9a5610baa..a5dc0894b 100644 --- a/test/pleroma/web/feed/user_controller_test.exs +++ b/test/pleroma/web/feed/user_controller_test.exs @@ -206,7 +206,7 @@ defmodule Pleroma.Web.Feed.UserControllerTest do |> response(200) assert response == - Fallback.RedirectController.redirector_with_meta( + Pleroma.Web.Fallback.RedirectController.redirector_with_meta( conn, %{user: user} ).resp_body -- 2.45.2