Skip to content

Commit 39e2eaa

Browse files
authored
deps: Update Erlang/Elixir (#501)
1 parent d62ab7a commit 39e2eaa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+120
-85
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77

88
jobs:
99
lint:
10-
runs-on: ubuntu-20.04 # Remember to update this when changing Erlang version. See https://github.com/erlef/setup-beam
10+
runs-on: ubuntu-22.04 # Remember to update this when changing Erlang version. See https://github.com/erlef/setup-beam
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: erlef/setup-beam@v1
@@ -18,7 +18,7 @@ jobs:
1818
run: mix format --check-formatted
1919

2020
test:
21-
runs-on: ubuntu-20.04 # Remember to update this when changing Erlang version. See https://github.com/erlef/setup-beam
21+
runs-on: ubuntu-22.04 # Remember to update this when changing Erlang version. See https://github.com/erlef/setup-beam
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2424
services:

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77

88
jobs:
99
cypress:
10-
runs-on: ubuntu-20.04 # Remember to update this when changing Erlang version. See https://github.com/erlef/setup-beam
10+
runs-on: ubuntu-22.04 # Remember to update this when changing Erlang version. See https://github.com/erlef/setup-beam
1111
services:
1212
db:
1313
image: captainfact/dev-db:latest

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
erlang 23.3.4.18
2-
elixir 1.12.3-otp-23
1+
erlang 26.2.5.16
2+
elixir 1.16.3-otp-26

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM elixir:1.12.3-alpine
1+
FROM elixir:1.16.3-otp-26-alpine
22
RUN apk update && apk upgrade
33
RUN apk add bash imagemagick curl gcc make libc-dev libgcc && rm -rf /var/cache/apk/*
44

apps/cf/lib/accounts/user_permissions.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ defmodule CF.Accounts.UserPermissions do
6565
# output a warning if we identify such an issue
6666
if action_count >= limit + @limit_warning_threshold,
6767
do:
68-
Logger.warn(fn ->
68+
Logger.warning(fn ->
6969
"User #{user.username} (#{user.id}) overthrown its limit for [#{action_type} #{entity}] (#{action_count}/#{limit})"
7070
end)
7171

apps/cf/lib/authenticator/oauth.ex

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,13 @@ defmodule CF.Authenticator.OAuth do
118118
fb_user_id: infos.uid,
119119
name: infos.name,
120120
email: infos.email,
121-
password: NotQwerty123.RandomPassword.gen_password()
121+
password: strong_random_password()
122122
}
123123
end
124+
125+
defp strong_random_password do
126+
:crypto.strong_rand_bytes(16)
127+
|> Base.url_encode64()
128+
|> binary_part(0, 16)
129+
end
124130
end

apps/cf/lib/llms/statements_creator.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ defmodule CF.LLMs.StatementsCreator do
101101

102102
{:error, error} ->
103103
if retries > 0 do
104-
Logger.warn("Failed to get LLM suggested statements: #{inspect(error)}. Retrying...")
104+
Logger.warning("Failed to get LLM suggested statements: #{inspect(error)}. Retrying...")
105105
Process.sleep(1000)
106106
get_llm_suggested_statements(video, captions, retries - 1)
107107
else

apps/cf/lib/mailer/templates/_layout.html.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
<td style="word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;" align="left">
123123
<div style="font-size:14px;cursor:auto;color:#000000;font-family:Ubuntu, Lato, Tahoma, sans-serif;line-height:22px;text-align:left;">
124124
<br>
125-
<%= render @view_module, @view_template, assigns %>
125+
<%= @inner_content %>
126126
<br>
127127
</div>
128128
</td>

apps/cf/lib/mailer/templates/_layout.text.eex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= render @view_module, @view_template, assigns %>
1+
<%= @inner_content %>
22

33

44
--------------------------------------------------------------------------------
@@ -10,4 +10,4 @@ Forum: https://forum.captainfact.io/
1010
Discord: https://discord.captainfact.io
1111
Github: https://github.com/CaptainFact
1212
Facebook: https://www.facebook.com/CaptainFact.io/
13-
Twitter: https://twitter.com/CaptainFact_io
13+
Twitter: https://twitter.com/CaptainFact_io

apps/cf/lib/notifications/notification_builder.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ defmodule CF.Notifications.NotificationBuilder do
6363
do: :removed_statement
6464

6565
defp notification_type(%{type: type, entity: entity}, _) do
66-
Logger.warn("Don't know how to generate a notification for #{type} #{entity}")
66+
Logger.warning("Don't know how to generate a notification for #{type} #{entity}")
6767
:default
6868
end
6969
end

0 commit comments

Comments
 (0)