<commit_before>class VehicleWarranty < ActiveRecord::Base
  include DocumentAssociable

  belongs_to :vehicle, inverse_of: :vehicle_warranties
  
  validates_presence_of :vehicle, :description
  validates_date :expiration_date
  
  scope :expired, -> (as_of: Date.current) { where("expiration_date < ?", as_of) }
  scope :expiring_soon, -> (as_of: Date.current, through: nil) { where(expiration_date: as_of..(through || as_of + 6.days)) }
  scope :default_order, -> { order(expiration_date: :desc) }

  def expired?
    expiration_date < Date.current
  end
end
<commit_msg>Enable tracking on vehicle_warranty<commit_after>class VehicleWarranty < ActiveRecord::Base
  include DocumentAssociable
  has_paper_trail

  belongs_to :vehicle, inverse_of: :vehicle_warranties
  
  validates_presence_of :vehicle, :description
  validates_date :expiration_date
  
  scope :expired, -> (as_of: Date.current) { where("expiration_date < ?", as_of) }
  scope :expiring_soon, -> (as_of: Date.current, through: nil) { where(expiration_date: as_of..(through || as_of + 6.days)) }
  scope :default_order, -> { order(expiration_date: :desc) }

  def expired?
    expiration_date < Date.current
  end
end

{'fraction_non_alphanumeric': 0.11298482293423272, 'fraction_numerical': 0.0016863406408094434, 'mean_word_length': 5.087179487179487, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3371905', 'n_tokens_mistral': 423, 'n_tokens_neox': 401, 'n_words': 84}