From bc9dc3bf1e7d2cb5b5289e6d1ef0443831bf2184 Mon Sep 17 00:00:00 2001 From: Leon Klingele Date: Sat, 15 Feb 2020 19:52:28 +0100 Subject: [PATCH] Update code formatting for Crystal 0.33.0 Crystal 0.33.0 introduced some changes to to the code formatter. Run "crystal tool format" so CI doesn't fail anymore. --- src/invidious.cr | 2 +- src/invidious/helpers/utils.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index a4584d4b..d2ff2a3d 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -60,7 +60,7 @@ REQUEST_HEADERS_WHITELIST = {"accept", "accept-encoding", "cache-control", "con RESPONSE_HEADERS_BLACKLIST = {"access-control-allow-origin", "alt-svc", "server"} HTTP_CHUNK_SIZE = 10485760 # ~10MB -CURRENT_BRANCH = {{ "#{`git branch | sed -n '/\* /s///p'`.strip}" }} +CURRENT_BRANCH = {{ "#{`git branch | sed -n '/* /s///p'`.strip}" }} CURRENT_COMMIT = {{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }} CURRENT_VERSION = {{ "#{`git describe --tags --abbrev=0`.strip}" }} diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.cr index 6fcfa8d2..e43ae71d 100644 --- a/src/invidious/helpers/utils.cr +++ b/src/invidious/helpers/utils.cr @@ -315,7 +315,7 @@ def get_referer(env, fallback = "/", unroll = true) end referer = referer.full_path - referer = "/" + referer.lstrip("\/\\") + referer = "/" + referer.lstrip("/\\") if referer == env.request.path referer = fallback