<commit_before>require 'gh'
require 'travis/model'

class User < Travis::Model
  require 'travis/model/user/oauth'

  has_many :tokens, dependent: :destroy
  has_many :memberships, dependent: :destroy
  has_many :organizations, through: :memberships
  has_many :permissions, dependent: :destroy
  has_many :repositories, through: :permissions
  has_many :emails, dependent: :destroy

  attr_accessible :name, :login, :email, :github_id, :github_oauth_token, :gravatar_id, :locale, :education

  before_create :set_as_recent
  after_create :create_a_token
  after_commit :sync, on: :create

  serialize :github_scopes
  before_save :track_github_scopes

  serialize :github_oauth_token, Travis::Model::EncryptedColumn.new<commit_msg>add first_logged_in to attr_accessible<commit_after>require 'gh'
require 'travis/model'

class User < Travis::Model
  require 'travis/model/user/oauth'

  has_many :tokens, dependent: :destroy
  has_many :memberships, dependent: :destroy
  has_many :organizations, through: :memberships
  has_many :permissions, dependent: :destroy
  has_many :repositories, through: :permissions
  has_many :emails, dependent: :destroy

  attr_accessible :name, :login, :email, :github_id, :github_oauth_token, :gravatar_id, :locale, :education, :first_logged_in

  before_create :set_as_recent
  after_create :create_a_token
  after_commit :sync, on: :create

  serialize :github_scopes
  before_save :track_github_scopes

  serialize :github_oauth_token, Travis::Model::EncryptedColumn.new
{'fraction_non_alphanumeric': 0.09422694094226941, 'fraction_numerical': 0.0, 'mean_word_length': 6.654822335025381, 'pattern_counts': {'":': 0, '<': 5, '<?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': '888665', 'n_tokens_mistral': 516, 'n_tokens_neox': 488, 'n_words': 117}