<commit_before>class Authenticator
  attr_reader :auth, :developer

  def self.call(*args)
    new(*args).find_or_create_from_omniauth
  end

  def initialize(auth)
    @auth = auth
    @developer = Developer.where(
      uid: auth.info.uid,
      provider: auth.info.provider
    ).first
  end

  def find_or_create_from_omniauth
    if developer.nil?
      create_from_omniauth
    else
      developer
    end
  end

  private

  def create_from_omniauth
    Developer.create!(
      email: auth.info.email,
      password: <PASSWORD>[0, 20],
      first_name: auth.info.first_name,
      last_name: auth.info.last_name,
      uid: auth.uid,
      provider: auth.provider,
      access_token: auth.credentials.token,
    )
  end
end<commit_msg>Add more fields<commit_after>class Authenticator
  attr_reader :auth, :developer

  def self.call(*args)
    new(*args).find_or_create_from_omniauth
  end

  def initialize(auth)
    @auth = auth
    @developer = Developer.where(
      uid: auth.uid,
      provider: auth.provider
    ).first
  end

  def find_or_create_from_omniauth
    if developer.nil?
      create_from_omniauth
    else
      developer
    end
  end

  private

  def create_from_omniauth
    puts auth.extra.raw_info
    Developer.create!(
      email: auth.info.email,
      password: <PASSWORD>, 20],
      name: auth.info.name,
      uid: auth.uid,
      login: auth.info.nickname,
      city: auth.extra.raw_info.location,
      provider: auth.provider,
      available: (auth.extra.raw_info.hireable.nil? ? false : true),
      access_token: auth.credentials.token,
      data: auth.extra.raw_info
    )
  end
end
{'fraction_non_alphanumeric': 0.09151921903599756, 'fraction_numerical': 0.003050640634533252, 'mean_word_length': 2.6771300448430493, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '492897', 'n_tokens_mistral': 565, 'n_tokens_neox': 534, 'n_words': 113}