Fix Style/PercentLiteralDelimiters type of Ameba issues

This commit is contained in:
Sijawusz Pur Rahnama 2026-01-11 22:36:58 +01:00
parent dd185c9379
commit b5b187ad88
3 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ module HTTP::Handler
end
class Kemal::RouteHandler
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
{% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %}
exclude ["/api/v1/*"], {{ method }}
{% end %}
@ -44,7 +44,7 @@ class Kemal::RouteHandler
end
class Kemal::ExceptionHandler
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
{% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %}
exclude ["/api/v1/*"], {{ method }}
{% end %}
@ -72,7 +72,7 @@ class FilteredCompressHandler < HTTP::CompressHandler
end
class AuthHandler < Kemal::Handler
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
{% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %}
only ["/api/v1/auth/*"], {{ method }}
{% end %}
@ -121,7 +121,7 @@ class AuthHandler < Kemal::Handler
end
class APIHandler < Kemal::Handler
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
{% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %}
only ["/api/v1/*"], {{ method }}
{% end %}
exclude ["/api/v1/auth/notifications"], "GET"

View File

@ -55,7 +55,7 @@ class Invidious::LogHandler < Kemal::BaseLogHandler
end
end
{% for level in %w(trace debug info warn error fatal) %}
{% for level in %w[trace debug info warn error fatal] %}
def {{ level.id }}(message : String)
if LogLevel::{{ level.id.capitalize }} >= @level
puts("#{Time.utc} [{{ level.id }}] #{message}".colorize(color(LogLevel::{{ level.id.capitalize }})))

View File

@ -116,7 +116,7 @@ def scope_includes_scope(scope, subset)
subset_endpoint = subset_endpoint.downcase
if methods.empty?
methods = %w(GET POST PUT HEAD DELETE PATCH OPTIONS)
methods = %w[GET POST PUT HEAD DELETE PATCH OPTIONS]
end
if methods & subset_methods != subset_methods