<commit_before><% module_namespacing do -%>
class <%= class_name %>Authentication < ActiveRecord::Base
  belongs_to :<%= class_name.downcase %>
  belongs_to :authentication_provider

  serialize :params

<% if Rails::VERSION::MAJOR < 4 -%>
  attr_accessible :user_id, :authentication_provider_id, :uid, :token, :token_expires_at, :params

<% end -%>
  def self.create_from_omniauth(params, <%= class_name.downcase %>, provider)
    create(
      <%= class_name.downcase %>: <%= class_name.downcase %>,
      authentication_provider: provider,
      uid: params['uid'],
      token: params['credentials']['token'],
      token_expires_at: params['credentials']['expires_at'],
      params: params,
    )
  end
end
<% end -%><commit_msg>Convert epoch seconds to datetime for :token_expires_at<commit_after><% module_namespacing do -%>
class <%= class_name %>Authentication < ActiveRecord::Base
  belongs_to :<%= class_name.downcase %>
  belongs_to :authentication_provider

  serialize :params

<% if Rails::VERSION::MAJOR < 4 -%>
  attr_accessible :user_id, :authentication_provider_id, :uid, :token, :token_expires_at, :params

<% end -%>
  def self.create_from_omniauth(params, <%= class_name.downcase %>, provider)
    create(
      <%= class_name.downcase %>: <%= class_name.downcase %>,
      authentication_provider: provider,
      uid: params['uid'],
      token: params['credentials']['token'],
      token_expires_at: Time.at(params['credentials']['expires_at']).to_datetime,
      params: params,
    )
  end
end
<% end -%>
{'fraction_non_alphanumeric': 0.1506849315068493, 'fraction_numerical': 0.001304631441617743, 'mean_word_length': 4.702602230483271, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 21, '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': '4550625', 'n_tokens_mistral': 527, 'n_tokens_neox': 494, 'n_words': 94}