giant massive dep upgrade and dialyxir-found error emporium #371
|
@ -1,3 +1,4 @@
|
|||
# credo:disable-for-this-file
|
||||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
|
|
@ -115,7 +115,6 @@ defmodule Mix.Tasks.Pleroma.Database do
|
|||
|
||||
nil
|
||||
|> Pleroma.Workers.Cron.PruneDatabaseWorker.perform()
|
||||
|> IO.inspect()
|
||||
end
|
||||
|
||||
def run(["fix_likes_collections"]) do
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# credo:disable-for-this-file
|
||||
defmodule Mix.Tasks.Pleroma.Diagnostics do
|
||||
alias Pleroma.Repo
|
||||
alias Pleroma.User
|
||||
|
|
|
@ -247,9 +247,13 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
|||
config_dir = Path.dirname(config_path)
|
||||
psql_dir = Path.dirname(psql_path)
|
||||
|
||||
[config_dir, psql_dir, static_dir, uploads_dir]
|
||||
|> Enum.reject(&File.exists?/1)
|
||||
|> Enum.map(&File.mkdir_p!/1)
|
||||
to_create =
|
||||
[config_dir, psql_dir, static_dir, uploads_dir]
|
||||
|> Enum.reject(&File.exists?/1)
|
||||
|
||||
for dir <- to_create do
|
||||
File.mkdir_p!(dir)
|
||||
end
|
||||
|
||||
shell_info("Writing config to #{config_path}.")
|
||||
|
||||
|
|
|
@ -10,14 +10,10 @@ defmodule Mix.Tasks.Pleroma.Search do
|
|||
|
||||
def run(["import", "activities" | _rest]) do
|
||||
start_pleroma()
|
||||
IO.inspect(Pleroma.Config.get([Pleroma.Search.Elasticsearch.Cluster, :indexes, :activities]))
|
||||
|
||||
IO.inspect(
|
||||
Elasticsearch.Index.Bulk.upload(
|
||||
Pleroma.Search.Elasticsearch.Cluster,
|
||||
"activities",
|
||||
Pleroma.Config.get([Pleroma.Search.Elasticsearch.Cluster, :indexes, :activities])
|
||||
)
|
||||
Elasticsearch.Index.Bulk.upload(
|
||||
Pleroma.Search.Elasticsearch.Cluster,
|
||||
"activities",
|
||||
Pleroma.Config.get([Pleroma.Search.Elasticsearch.Cluster, :indexes, :activities])
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -378,9 +378,9 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||
def run(["show", nickname]) do
|
||||
start_pleroma()
|
||||
|
||||
nickname
|
||||
|> User.get_cached_by_nickname()
|
||||
|> IO.inspect()
|
||||
user = nickname
|
||||
|> User.get_cached_by_nickname()
|
||||
shell_info("#{inspect(user)}")
|
||||
end
|
||||
|
||||
def run(["send_confirmation", nickname]) do
|
||||
|
@ -389,7 +389,6 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||
with %User{} = user <- User.get_cached_by_nickname(nickname) do
|
||||
user
|
||||
|> Pleroma.Emails.UserEmail.account_confirmation_email()
|
||||
|> IO.inspect()
|
||||
|> Pleroma.Emails.Mailer.deliver!()
|
||||
|
||||
shell_info("#{nickname}'s email sent")
|
||||
|
@ -465,7 +464,7 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||
|
||||
with %User{local: true} = user <- User.get_cached_by_nickname(nickname) do
|
||||
blocks = User.following_ap_ids(user)
|
||||
IO.inspect(blocks, limit: :infinity)
|
||||
IO.puts("#{inspect(blocks)}")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ defmodule Pleroma.Activity.HTML do
|
|||
|
||||
def invalidate_cache_for(activity_id) do
|
||||
keys = get_cache_keys_for(activity_id)
|
||||
Enum.map(keys, &@cachex.del(:scrubber_cache, &1))
|
||||
for key <- keys do
|
||||
@cachex.del(:scrubber_cache, key)
|
||||
end
|
||||
@cachex.del(:scrubber_management_cache, activity_id)
|
||||
end
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ defmodule Pleroma.Web do
|
|||
plug_module.skip_plug(conn)
|
||||
rescue
|
||||
UndefinedFunctionError ->
|
||||
raise "`#{plug_module}` is not skippable. Append `use Pleroma.Web, :plug` to its code."
|
||||
reraise("`#{plug_module}` is not skippable. Append `use Pleroma.Web, :plug` to its code.", __STACKTRACE__)
|
||||
end
|
||||
end
|
||||
)
|
||||
|
|
|
@ -27,7 +27,9 @@ defmodule Pleroma.Web.AkkomaAPI.TranslationController do
|
|||
|> json(%{source: source_languages, target: dest_languages})
|
||||
else
|
||||
{:enabled, false} -> json(conn, %{})
|
||||
e -> IO.inspect(e)
|
||||
e ->
|
||||
Logger.error("Translation language list error: #{inspect(e)}")
|
||||
{:error, e}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
6
mix.exs
6
mix.exs
|
@ -197,7 +197,11 @@ defmodule Pleroma.Mixfile do
|
|||
## dev & test
|
||||
{:ex_doc, "~> 0.22", only: :dev, runtime: false},
|
||||
{:ex_machina, "~> 2.4", only: :test},
|
||||
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
|
||||
{:credo,
|
||||
git: "https://github.com/rrrene/credo.git",
|
||||
ref: "1c1b99ea41a457761383d81aaf6a606913996fe7",
|
||||
only: [:dev, :test],
|
||||
runtime: false},
|
||||
{:mock, "~> 0.3.5", only: :test},
|
||||
{:excoveralls, "0.15.1", only: :test},
|
||||
{:mox, "~> 1.0", only: :test},
|
||||
|
|
2
mix.lock
2
mix.lock
|
@ -17,7 +17,7 @@
|
|||
"cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"},
|
||||
"cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"},
|
||||
"cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"},
|
||||
"credo": {:hex, :credo, "1.6.7", "323f5734350fd23a456f2688b9430e7d517afb313fbd38671b8a4449798a7854", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "41e110bfb007f7eda7f897c10bf019ceab9a0b269ce79f015d54b0dcf4fc7dd3"},
|
||||
"credo": {:git, "https://github.com/rrrene/credo.git", "1c1b99ea41a457761383d81aaf6a606913996fe7", [ref: "1c1b99ea41a457761383d81aaf6a606913996fe7"]},
|
||||
"crypt": {:git, "https://github.com/msantos/crypt.git", "f75cd55325e33cbea198fb41fe41871392f8fb76", [ref: "f75cd55325e33cbea198fb41fe41871392f8fb76"]},
|
||||
"custom_base": {:hex, :custom_base, "0.2.1", "4a832a42ea0552299d81652aa0b1f775d462175293e99dfbe4d7dbaab785a706", [:mix], [], "hexpm", "8df019facc5ec9603e94f7270f1ac73ddf339f56ade76a721eaa57c1493ba463"},
|
||||
"db_connection": {:hex, :db_connection, "2.4.3", "3b9aac9f27347ec65b271847e6baeb4443d8474289bd18c1d6f4de655b70c94d", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c127c15b0fa6cfb32eed07465e05da6c815b032508d4ed7c116122871df73c12"},
|
||||
|
|
|
@ -163,4 +163,8 @@ defmodule Credo.Check.Consistency.FileLocation do
|
|||
line_no: 1
|
||||
)
|
||||
end
|
||||
|
||||
defp append_issues_and_timings(_issues, exec) do
|
||||
exec
|
||||
end
|
||||
end
|
||||
|
|
|
@ -288,7 +288,7 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do
|
|||
get(conn, "/api/v1/timelines/public")
|
||||
|> json_response_and_validate_schema(200)
|
||||
|
||||
assert length(response) == 0
|
||||
assert response == []
|
||||
end
|
||||
|
||||
test "doesn't return replies if follow is posting with users from blocked domain" do
|
||||
|
@ -527,7 +527,7 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do
|
|||
|> assign(:token, insert(:oauth_token, user: user_two, scopes: ["read:statuses"]))
|
||||
|
||||
# Only direct should be visible here
|
||||
res_conn = get(conn_user_two, "api/v1/timelines/direct")
|
||||
res_conn = get(conn_user_two, "/api/v1/timelines/direct")
|
||||
|
||||
assert [status] = json_response_and_validate_schema(res_conn, :ok)
|
||||
|
||||
|
@ -546,7 +546,7 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do
|
|||
assert %{"visibility" => "direct"} = status
|
||||
|
||||
# Both should be visible here
|
||||
res_conn = get(conn_user_two, "api/v1/timelines/home")
|
||||
res_conn = get(conn_user_two, "/api/v1/timelines/home")
|
||||
|
||||
[_s1, _s2] = json_response_and_validate_schema(res_conn, :ok)
|
||||
|
||||
|
@ -559,14 +559,14 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do
|
|||
})
|
||||
end)
|
||||
|
||||
res_conn = get(conn_user_two, "api/v1/timelines/direct")
|
||||
res_conn = get(conn_user_two, "/api/v1/timelines/direct")
|
||||
|
||||
statuses = json_response_and_validate_schema(res_conn, :ok)
|
||||
assert length(statuses) == 20
|
||||
|
||||
max_id = List.last(statuses)["id"]
|
||||
|
||||
res_conn = get(conn_user_two, "api/v1/timelines/direct?max_id=#{max_id}")
|
||||
res_conn = get(conn_user_two, "/api/v1/timelines/direct?max_id=#{max_id}")
|
||||
|
||||
assert [status] = json_response_and_validate_schema(res_conn, :ok)
|
||||
|
||||
|
@ -591,7 +591,7 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do
|
|||
visibility: "direct"
|
||||
})
|
||||
|
||||
res_conn = get(conn, "api/v1/timelines/direct")
|
||||
res_conn = get(conn, "/api/v1/timelines/direct")
|
||||
|
||||
[status] = json_response_and_validate_schema(res_conn, :ok)
|
||||
assert status["id"] == direct.id
|
||||
|
|
|
@ -133,7 +133,7 @@ defmodule Pleroma.Web.PleromaAPI.AccountControllerTest do
|
|||
|> get("/api/v1/pleroma/accounts/#{user.id}/favourites")
|
||||
|> json_response_and_validate_schema(200)
|
||||
|
||||
assert length(response) == 0
|
||||
assert response == []
|
||||
end
|
||||
|
||||
test "does not return others' favorited DM when user is not one of recipients", %{
|
||||
|
|
|
@ -123,7 +123,7 @@ defmodule Pleroma.Cluster do
|
|||
|
||||
defp start_peer({node_host, override_configs}) do
|
||||
log(node_host, "booting federated VM")
|
||||
{:ok, node} = :peer.start(%{host: ~c"127.0.0.1", name: node_name(node_host), args: vm_args()})
|
||||
{:ok, _pid, node} = :peer.start(%{host: ~c"127.0.0.1", name: node_name(node_host), args: vm_args()})
|
||||
add_code_paths(node)
|
||||
load_apps_and_transfer_configuration(node, override_configs)
|
||||
ensure_apps_started(node)
|
||||
|
|
Loading…
Reference in New Issue