Skip to content

Commit ff1715e

Browse files
author
Ale Ornelas
committed
fix: build on heroku
1 parent 8ea45b0 commit ff1715e

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

compile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
node_modules/.bin/postcss --verbose --ext=css -m --dir=./priv/static/assets ./assets/css
21
cd assets
3-
node build.ts
2+
../node_modules/.bin/ts-node build.ts
43
cd ../
54
mix phx.digest
65
mix sentry_recompile

lib/opencov/endpoint.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ defmodule Librecov.Endpoint do
3939
plug(Plug.Parsers,
4040
parsers: [:urlencoded, :multipart, :json],
4141
pass: ["*/*"],
42-
json_decoder: Jason
42+
json_decoder: Jason,
43+
length: 100_000_000
4344
)
4445

4546
plug(Sentry.PlugContext)

lib/web/managers/job_manager.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ defmodule Librecov.JobManager do
6262
def create_from_json!(build, params) do
6363
{source_files, params} = Map.pop(params, "source_files", [])
6464
params = Map.put(params, "files_count", Enum.count(source_files))
65+
params = Map.update(params, "run_at", nil, fn time -> String.replace(time, " +", "+") end)
6566
job = Ecto.build_assoc(build, :jobs) |> changeset(params) |> Repo.insert!()
6667

6768
Enum.each(source_files, fn file_params ->

lib/web/views/common_view.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Librecov.CommonView do
22
import Librecov.Helpers.Number
33
def format_coverage(%{current_coverage: coverage}), do: format_coverage(coverage)
4-
def format_coverage(num) when is_float(num), do: "#{Float.round(num, 1)}%"
4+
def format_coverage(num) when is_float(num), do: "#{Decimal.round(Decimal.from_float(num), 2)}%"
55
def format_coverage(_), do: "NA"
66

77
def coverage_color(%{current_coverage: coverage}), do: coverage_color(coverage)

0 commit comments

Comments
 (0)