aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2020-06-04 15:11:29 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2020-06-04 15:11:29 +0300
commit9eb90aa352d9f2a21e18deb052dcbdf33f9d340b (patch)
treecdca25284b30392975c8ccdef84053e3460af22d /lib
parentf90233576bab0f98524d3b3042a946342bba317a (diff)
downloadpleroma-9eb90aa352d9f2a21e18deb052dcbdf33f9d340b.tar.gz
Fix tests
Diffstat (limited to 'lib')
-rw-r--r--lib/mix/tasks/pleroma/frontend.ex8
-rw-r--r--lib/pleroma/web/templates/frontend/static/_user_card.html.eex4
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/mix/tasks/pleroma/frontend.ex b/lib/mix/tasks/pleroma/frontend.ex
index 8130a71ea..03169c8b8 100644
--- a/lib/mix/tasks/pleroma/frontend.ex
+++ b/lib/mix/tasks/pleroma/frontend.ex
@@ -151,15 +151,13 @@ defmodule Mix.Tasks.Pleroma.Frontend do
url = "#{gitlab_api_url(gitlab_base_url, project)}/releases"
%{status: 200, body: json} = Tesla.get!(http_client(), url)
- [%{"commit" => %{"short_id" => commit_id}, "name" => name} = data | _] =
+ [%{"commit" => %{"short_id" => commit_id}, "name" => name} | _] =
Enum.sort(json, fn r1, r2 ->
{:ok, date1, _offset} = DateTime.from_iso8601(r1["created_at"])
{:ok, date2, _offset} = DateTime.from_iso8601(r2["created_at"])
DateTime.compare(date1, date2) != :lt
end)
- IO.inspect(data)
-
%{
"name" => name,
"url" => build_url(gitlab_base_url, project, commit_id)
@@ -207,9 +205,7 @@ defmodule Mix.Tasks.Pleroma.Frontend do
do: "https://#{gitlab_base_url}/api/v4/projects/#{URI.encode_www_form(project)}"
defp build_url(gitlab_base_url, project, ref),
- do:
- "https://#{gitlab_base_url}/#{project}/-/jobs/artifacts/#{ref}/download?job=build"
- |> IO.inspect()
+ do: "https://#{gitlab_base_url}/#{project}/-/jobs/artifacts/#{ref}/download?job=build"
defp http_client do
middleware = [
diff --git a/lib/pleroma/web/templates/frontend/static/_user_card.html.eex b/lib/pleroma/web/templates/frontend/static/_user_card.html.eex
index 977b894d3..c29170ff5 100644
--- a/lib/pleroma/web/templates/frontend/static/_user_card.html.eex
+++ b/lib/pleroma/web/templates/frontend/static/_user_card.html.eex
@@ -1,10 +1,10 @@
<div class="p-author h-card">
<a class="u-url" rel="author noopener" href="<%= (@user.uri || @user.ap_id) %>">
<div class="avatar">
- <img class="u-photo" src="<%= User.avatar_url(@user) |> MediaProxy.url %>" width="48" height="48" alt="">
+ <img class="u-photo" src="<%= User.avatar_url(@user) |> Pleroma.Web.MediaProxy.url %>" width="48" height="48" alt="">
</div>
<span class="display-name">
- <bdi class="p-name"><%= raw Formatter.emojify(@user.name, @user.emoji) %></bdi>
+ <bdi class="p-name"><%= raw Pleroma.Emoji.Formatter.emojify(@user.name, @user.emoji) %></bdi>
<span class="nickname"><%= @user.nickname %></span>
</span>
</a>