<commit_before>module Hello
  module Rails
    module Controller
      
      extend ActiveSupport::Concern

      module ClassMethods
        def restrict_access_to_sudo_mode
          before_action(:restrict_access_to_sudo_mode)
        end
      end



      def deliver_password_forgot
        instance_eval(&Hello.config.forgot.deliver_password_forgot)
      end

      #
      # Session
      #

      included do
        helper_method :current_user, :hello_credential, :hello_session
        before_action :hello_keep_alive, if: :hello_session
      end

      def current_user
        hello_user
      end

      def create_hello_session(keep_me=false)
        expires_at = keep_me ? 30.days.from_now : 30.minutes.from_now
        s = Session.create!(credential: @credential, ua: user_agent, expires_at: expires_at)
        set_hello_session_token(s.token)
      end

      def clear_hello_session
        destroy_hello_session<commit_msg>removing unused code<commit_after>module Hello
  module Rails
    module Controller
      
      extend ActiveSupport::Concern

      module ClassMethods
        def restrict_access_to_sudo_mode
          before_action(:restrict_access_to_sudo_mode)
        end
      end



      #
      # Session
      #

      included do
        helper_method :current_user, :hello_credential, :hello_session
        before_action :hello_keep_alive, if: :hello_session
      end

      def current_user
        hello_user
      end

      def create_hello_session(keep_me=false)
        expires_at = keep_me ? 30.days.from_now : 30.minutes.from_now
        s = Session.create!(credential: @credential, ua: user_agent, expires_at: expires_at)
        set_hello_session_token(s.token)
      end

      def clear_hello_session
        destroy_hello_session
{'fraction_non_alphanumeric': 0.052572706935123045, 'fraction_numerical': 0.0044742729306487695, 'mean_word_length': 2.4737864077669904, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4201634', 'n_tokens_mistral': 560, 'n_tokens_neox': 518, 'n_words': 103}