Fix rubocop offenses - Requires Ruby 3.1+

This commit is contained in:
Sebastian Serth
2022-11-25 10:53:14 +01:00
parent bdf474e684
commit 574e99eddd
93 changed files with 315 additions and 315 deletions

View File

@@ -11,7 +11,7 @@ module AuthenticatedUrlHelper
COOKIE_EXPIRATION = 30.seconds
def sign(url, object)
payload = {object_id: object.id, object_type: object.class.name, url: url, exp: TOKEN_EXPIRATION.from_now.to_i}
payload = {object_id: object.id, object_type: object.class.name, url:, exp: TOKEN_EXPIRATION.from_now.to_i}
token = JWT.encode payload, TOKEN_SECRET, TOKEN_ALGORITHM
add_query_parameters(url, {TOKEN_PARAM => token})
@@ -58,7 +58,7 @@ module AuthenticatedUrlHelper
def prepare_short_living_cookie(value)
{
value: value,
value:,
expires: COOKIE_EXPIRATION.from_now,
httponly: true,
same_site: :strict,