<commit_before># Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time
  protect_from_forgery # See ActionController::RequestForgeryProtection for details

  # Scrub sensitive parameters from your log
  # filter_parameter_logging :password

protected

  def verify_access
    authenticate_or_request_with_http_digest("Mainpine Protected Area") do |username|
      'mainpine' if username == 'admin'
    end
  end

  # # If we want to change the access error message.
  # def authentication_request(controller, realm, message = nil)
  #   message ||= "HTTP Digest: Access denied.\n"
  #   authentication_header(controller, realm)
  #   controller.__send__ :render, :text => message, :status => :unauthorized
  # end

end<commit_msg>let's just use basic authentication for demo<commit_after># Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time
  protect_from_forgery # See ActionController::RequestForgeryProtection for details

  # Scrub sensitive parameters from your log
  # filter_parameter_logging :password

protected

  def verify_access
    authenticate_or_request_with_http_basic("Mainpine Protected Area") do |username, password|
      username == 'admin' && password == '<PASSWORD>'
    end
    # authenticate_or_request_with_http_digest("Mainpine Protected Area") do |username|
    #   'mainpine' if username == 'admin'
    # end
  end

  # # If we want to change the access error message.
  # def authentication_request(controller, realm, message = nil)
  #   message ||= "HTTP Digest: Access denied.\n"
  #   authentication_header(controller, realm)
  #   controller.__send__ :render, :text => message, :status => :unauthorized
  # end

end
{'fraction_non_alphanumeric': 0.07636186770428016, 'fraction_numerical': 0.0, 'mean_word_length': 4.620218579234972, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, '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': '4320029', 'n_tokens_mistral': 563, 'n_tokens_neox': 541, 'n_words': 198}