Skip to content

Commit 663180d

Browse files
committed
Merge branch 'develop'
2 parents 5557342 + a0e5e80 commit 663180d

File tree

7 files changed

+32
-12
lines changed

7 files changed

+32
-12
lines changed

config/config.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ config :asciinema, Oban,
105105
crontab: [
106106
{"0 * * * *", Asciinema.Workers.DeleteUnclaimedRecordings},
107107
{"* * * * *", Asciinema.Workers.MarkOfflineStreams},
108-
{"@daily", Asciinema.Workers.MigrateRecordingFiles}
108+
{"@reboot", Asciinema.Workers.MigrateRecordingFiles}
109109
]},
110110
Oban.Plugins.Lifeline,
111111
Oban.Plugins.Reindexer

lib/asciinema/emails/email.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ defmodule Asciinema.Emails.Email do
8989
|> from({"asciinema", from_address()})
9090
|> header("Date", Timex.format!(Timex.now(), "{RFC1123}"))
9191
|> header("Message-ID", message_id())
92+
|> header("Auto-Submitted", "auto-generated")
93+
|> header("X-Auto-Response-Suppress", "All")
94+
|> header("Precedence", "bulk")
9295
|> reply_to(reply_to_address())
9396
end
9497

lib/asciinema_web/controllers/error_json.ex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ defmodule AsciinemaWeb.ErrorJSON do
1212
end
1313

1414
def render("413.json", _assigns) do
15-
{_, limit, _, _} = AsciinemaWeb.Plug.Parsers.MULTIPART.init([])
16-
limit = format_byte_size(limit)
15+
limit = format_byte_size(AsciinemaWeb.Plug.Parsers.MULTIPART.length_limit())
1716

1817
%{
1918
type: "content_too_large",

lib/asciinema_web/controllers/stream_html/index.html.heex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323

2424
<p>
2525
<small class="text-muted">
26-
You need asciinema CLI version <a href="https://github.com/asciinema/asciinema/releases/tag/v3.0.0-rc.5">3.0 or later</a>.
26+
You need
27+
<a href="https://github.com/asciinema/asciinema/releases/tag/v3.0.0">asciinema CLI 3.0</a>
28+
or later.
2729
</small>
2830
</p>
2931

lib/asciinema_web/controllers/stream_html/show.html.heex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@
8989
/>
9090

9191
<small class="text-muted">
92-
You need <a href="https://docs.asciinema.org/manual/cli/">asciinema CLI</a>
93-
version <a href="https://github.com/asciinema/asciinema/releases/tag/v3.0.0-rc.5">3.0 or later</a>.
92+
You need
93+
<a href="https://github.com/asciinema/asciinema/releases/tag/v3.0.0">
94+
asciinema CLI 3.0
95+
</a>
96+
or later.
9497
</small>
9598

9699
<h2>Stream URL</h2>

lib/asciinema_web/controllers/user_html/show.html.heex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@
5454

5555
<p>
5656
<small class="text-muted">
57-
You need asciinema CLI version <a href="https://github.com/asciinema/asciinema/releases/tag/v3.0.0-rc.5">3.0 or later</a>.
57+
You need
58+
<a href="https://github.com/asciinema/asciinema/releases/tag/v3.0.0">
59+
asciinema CLI 3.0
60+
</a>
61+
or later.
5862
</small>
5963
</p>
6064

lib/asciinema_web/plug/parsers/multipart.ex

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
defmodule AsciinemaWeb.Plug.Parsers.MULTIPART do
22
@multipart Plug.Parsers.MULTIPART
33

4-
def init(opts) do
5-
opts = if length = config(:length), do: [{:length, length} | opts], else: opts
6-
7-
@multipart.init(opts)
8-
end
4+
def init(opts), do: opts
95

106
def parse(conn, "multipart", subtype, headers, opts) do
7+
opts = build_opts(opts)
118
@multipart.parse(conn, "multipart", subtype, headers, opts)
129
end
1310

1411
def parse(conn, _type, _subtype, _headers, _opts), do: {:next, conn}
1512

13+
def length_limit do
14+
{_, limit, _, _} = build_opts([])
15+
16+
limit
17+
end
18+
19+
defp build_opts(opts) do
20+
opts = if length = config(:length), do: [{:length, length} | opts], else: opts
21+
22+
@multipart.init(opts)
23+
end
24+
1625
defp config(key) do
1726
Keyword.get(Application.get_env(:asciinema, __MODULE__, []), key)
1827
end

0 commit comments

Comments
 (0)