<commit_before>class Users::SessionsController < Devise::SessionsController
  # before_action :configure_sign_in_params, only: [:create]
  # events binding
  after_persisting :raven_set_user_context
  after_destroy :raven_clear_user_context


  def raven_set_user_context
    Raven.user_context({
      'id' => self.user.id,
      'email' => self.user.email,
    })
  end

  def raven_clear_user_context
    Raven.user_context({})
  end
end

  # GET /resource/sign_in
  # def new
  #   super
  # end

  # POST /resource/sign_in
  # def create
  #   super<commit_msg>hacky workaround, will revist when I have better insight from Sentry<commit_after>class Users::SessionsController < Devise::SessionsController
  # before_action :configure_sign_in_params, only: [:create]
  # events binding
  #  after_persisting :raven_set_user_context
  #  after_destroy :raven_clear_user_context


  def raven_set_user_context
    Raven.user_context({
      'id' => self.user.id,
      'email' => self.user.email,
    })
  end

  def raven_clear_user_context
    Raven.user_context({})
  end

  # GET /resource/sign_in
  # def new
  #   super
  # end

  # POST /resource/sign_in
  # def create
  #   super
{'fraction_non_alphanumeric': 0.09167367535744322, 'fraction_numerical': 0.0, 'mean_word_length': 3.612403100775194, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2130021', 'n_tokens_mistral': 423, 'n_tokens_neox': 409, 'n_words': 82}