<commit_before>class User < ActiveRecord::Base
  include Clearance::User

  has_many :rubygems, :through    => :ownerships,
                      :order      => "name ASC",
                      :conditions => "ownerships.approved = true"
  has_many :ownerships
  before_create :generate_api_key

  protected

    def generate_api_key
      self.api_key = "#{email}-#{Time.now.to_f}".to_md5
    end
end<commit_msg>move to conditions hash to ensure rdbms agnosticism<commit_after>class User < ActiveRecord::Base
  include Clearance::User

  has_many :rubygems, :through    => :ownerships,
                      :order      => "name ASC",
                      :conditions => { 'ownerships.approved' => true }
  has_many :ownerships
  before_create :generate_api_key

  protected

    def generate_api_key
      self.api_key = "#{email}-#{Time.now.to_f}".to_md5
    end
end
{'fraction_non_alphanumeric': 0.1044776119402985, 'fraction_numerical': 0.002296211251435132, 'mean_word_length': 2.603305785123967, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '1829412', 'n_tokens_mistral': 282, 'n_tokens_neox': 270, 'n_words': 58}