From 875a6db91dcba95bd119242d6fcc163d3695fadb Mon Sep 17 00:00:00 2001 From: Jared White Date: Wed, 3 Apr 2024 13:46:13 -0700 Subject: [PATCH] fix cops --- lib/authtown.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/authtown.rb b/lib/authtown.rb index ca3998e..3a190fa 100644 --- a/lib/authtown.rb +++ b/lib/authtown.rb @@ -5,6 +5,7 @@ require "authtown/builder" require "authtown/view_mixin" +# rubocop:disable Layout/LineLength ### Simple migration strategy: # # Sequel.migration do @@ -35,12 +36,13 @@ # end # end # end +# rubocop:enable Layout/LineLength Thread.attr_accessor :authtown_state class Authtown::Current class << self def thread_state = Thread.current.authtown_state ||= {} - + def user=(new_user) thread_state[:user] = new_user end @@ -56,7 +58,7 @@ def user = thread_state[:user] config, rodauth_config: nil, account_landing_page: "/account/profile", - user_class_resolver: ->{ User } + user_class_resolver: -> { User } | config.authtown ||= {} @@ -73,7 +75,6 @@ def user = thread_state[:user] app.plugin(:sessions, secret:) app.plugin :rodauth do - enable :login, :logout, :create_account, :remember, :reset_password, :internal_request hmac_secret secret