diff options
-rw-r--r-- | lib/pleroma/gun/connection_pool/reclaimer.ex | 2 | ||||
-rw-r--r-- | lib/pleroma/gun/connection_pool/worker.ex | 2 | ||||
-rw-r--r-- | lib/pleroma/instances.ex | 4 | ||||
-rw-r--r-- | lib/pleroma/web/activity_pub/i_ds.ex (renamed from lib/pleroma/web/activity_pub/ids.ex) | 0 | ||||
-rw-r--r-- | lib/pleroma/web/activity_pub/pipeline.ex | 12 | ||||
-rw-r--r-- | lib/pleroma/web/activity_pub/side_effects.ex | 2 | ||||
-rw-r--r-- | test/pleroma/web/activity_pub/object_validators/article_note_validator_test.exs | 2 | ||||
-rw-r--r-- | test/pleroma/web/admin_api/controllers/user_controller_test.exs | 3 | ||||
-rw-r--r-- | test/pleroma/web/feed/user_controller_test.exs | 4 |
9 files changed, 17 insertions, 14 deletions
diff --git a/lib/pleroma/gun/connection_pool/reclaimer.ex b/lib/pleroma/gun/connection_pool/reclaimer.ex index 74c957b0b..4c643d7cb 100644 --- a/lib/pleroma/gun/connection_pool/reclaimer.ex +++ b/lib/pleroma/gun/connection_pool/reclaimer.ex @@ -5,7 +5,7 @@ defmodule Pleroma.Gun.ConnectionPool.Reclaimer do use GenServer, restart: :temporary - defp registry(), do: Pleroma.Gun.ConnectionPool + defp registry, do: Pleroma.Gun.ConnectionPool def start_monitor do pid = diff --git a/lib/pleroma/gun/connection_pool/worker.ex b/lib/pleroma/gun/connection_pool/worker.ex index c15a98dfa..a3fa75386 100644 --- a/lib/pleroma/gun/connection_pool/worker.ex +++ b/lib/pleroma/gun/connection_pool/worker.ex @@ -6,7 +6,7 @@ defmodule Pleroma.Gun.ConnectionPool.Worker do alias Pleroma.Gun use GenServer, restart: :temporary - defp registry(), do: Pleroma.Gun.ConnectionPool + defp registry, do: Pleroma.Gun.ConnectionPool def start_link([key | _] = opts) do GenServer.start_link(__MODULE__, opts, name: {:via, Registry, {registry(), key}}) diff --git a/lib/pleroma/instances.ex b/lib/pleroma/instances.ex index 79c6029ae..12f69feff 100644 --- a/lib/pleroma/instances.ex +++ b/lib/pleroma/instances.ex @@ -5,7 +5,7 @@ defmodule Pleroma.Instances do @moduledoc "Instances context." - defp adapter(), do: Pleroma.Instances.Instance + defp adapter, do: Pleroma.Instances.Instance def filter_reachable(urls_or_hosts), do: adapter().filter_reachable(urls_or_hosts) def reachable?(url_or_host), do: adapter().reachable(url_or_host) @@ -14,7 +14,7 @@ defmodule Pleroma.Instances do def set_unreachable(url_or_host, unreachable_since \\ nil), do: adapter().set_unreachable(url_or_host, unreachable_since) - def get_consistently_unreachable(), do: adapter().get_consistently_unreachable() + def get_consistently_unreachable, do: adapter().get_consistently_unreachable() def set_consistently_unreachable(url_or_host), do: set_unreachable(url_or_host, reachability_datetime_threshold()) diff --git a/lib/pleroma/web/activity_pub/ids.ex b/lib/pleroma/web/activity_pub/i_ds.ex index eab19b7fe..eab19b7fe 100644 --- a/lib/pleroma/web/activity_pub/ids.ex +++ b/lib/pleroma/web/activity_pub/i_ds.ex diff --git a/lib/pleroma/web/activity_pub/pipeline.ex b/lib/pleroma/web/activity_pub/pipeline.ex index 97c0dc0bd..904d535b4 100644 --- a/lib/pleroma/web/activity_pub/pipeline.ex +++ b/lib/pleroma/web/activity_pub/pipeline.ex @@ -21,12 +21,12 @@ defmodule Pleroma.Web.ActivityPub.Pipeline do # Elixir 1.9 compiler complains unless we do it like this defp fallback(a, b), do: a || b - defp side_effects(), do: fallback(@side_effects, ActivityPub.SideEffects) - defp federator(), do: fallback(@federator, Federator) - defp object_validator(), do: fallback(@object_validator, ActivityPub.ObjectValidator) - defp mrf(), do: fallback(@mrf, ActivityPub.MRF) - defp activity_pub(), do: fallback(@activity_pub, ActivityPub.ActivityPub) - defp config(), do: fallback(@config, Pleroma.Config) + defp side_effects, do: fallback(@side_effects, ActivityPub.SideEffects) + defp federator, do: fallback(@federator, Federator) + defp object_validator, do: fallback(@object_validator, ActivityPub.ObjectValidator) + defp mrf, do: fallback(@mrf, ActivityPub.MRF) + defp activity_pub, do: fallback(@activity_pub, ActivityPub.ActivityPub) + defp config, do: fallback(@config, Pleroma.Config) @spec common_pipeline(map(), keyword()) :: {:ok, Activity.t() | Object.t(), keyword()} | {:error, any()} diff --git a/lib/pleroma/web/activity_pub/side_effects.ex b/lib/pleroma/web/activity_pub/side_effects.ex index ff699cf51..c72072a7c 100644 --- a/lib/pleroma/web/activity_pub/side_effects.ex +++ b/lib/pleroma/web/activity_pub/side_effects.ex @@ -36,7 +36,7 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do # Elixir 1.9 compiler complains unless we do it like this defp fallback(a, b), do: a || b - defp ap_streamer(), do: fallback(@ap_streamer, ActivityPub) + defp ap_streamer, do: fallback(@ap_streamer, ActivityPub) @impl true def handle(object, meta \\ []) diff --git a/test/pleroma/web/activity_pub/object_validators/article_note_validator_test.exs b/test/pleroma/web/activity_pub/object_validators/article_note_validator_test.exs index 40d3f6a18..ab0589ac6 100644 --- a/test/pleroma/web/activity_pub/object_validators/article_note_validator_test.exs +++ b/test/pleroma/web/activity_pub/object_validators/article_note_validator_test.exs @@ -5,8 +5,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNoteValidatorTest do use Pleroma.DataCase, async: true - alias Pleroma.Web.ActivityPub.ObjectValidators.ArticleNoteValidator alias Pleroma.Web.ActivityPub.IDs + alias Pleroma.Web.ActivityPub.ObjectValidators.ArticleNoteValidator import Pleroma.Factory diff --git a/test/pleroma/web/admin_api/controllers/user_controller_test.exs b/test/pleroma/web/admin_api/controllers/user_controller_test.exs index 679d4275d..9c130b86e 100644 --- a/test/pleroma/web/admin_api/controllers/user_controller_test.exs +++ b/test/pleroma/web/admin_api/controllers/user_controller_test.exs @@ -403,7 +403,8 @@ defmodule Pleroma.Web.AdminAPI.UserControllerTest do end test "pagination works correctly with service users", %{conn: conn} do - service1 = User.get_or_create_service_actor_by_ap_id(Web.Endpoint.url() <> "/meido", "meido") + service1 = + User.get_or_create_service_actor_by_ap_id(Web.Endpoint.url() <> "/meido", "meido") insert_list(25, :user) diff --git a/test/pleroma/web/feed/user_controller_test.exs b/test/pleroma/web/feed/user_controller_test.exs index f794eaee9..6f6ff433f 100644 --- a/test/pleroma/web/feed/user_controller_test.exs +++ b/test/pleroma/web/feed/user_controller_test.exs @@ -217,7 +217,9 @@ defmodule Pleroma.Web.Feed.UserControllerTest do |> get("/users/#{user.nickname}") assert conn.status == 302 - assert redirected_to(conn) == "#{Pleroma.Web.Endpoint.url()}/users/#{user.nickname}/feed.atom" + + assert redirected_to(conn) == + "#{Pleroma.Web.Endpoint.url()}/users/#{user.nickname}/feed.atom" end test "with non-html / non-json format, it returns error when user is not found", %{conn: conn} do |