<commit_before>class Promotion < ActiveRecord::Base
  has_many  :promotion_credits,    :as => :adjustment_source
  creates_adjustment
  alias credits promotion_credits

  has_many :promotion_rules
  accepts_nested_attributes_for :promotion_rules
  alias_method :rules, :promotion_rules

  MATCH_POLICIES = %w(all any)

  scope :automatic, where("code IS NULL OR code = ''")


  def eligible?(order)
    !expired? && rules_are_eligible?(order)
  end
<commit_msg>Minor typo fix to spree_promotions.rb<commit_after>class Promotion < ActiveRecord::Base
  has_many  :promotion_credits,    :as => :adjustment_source
  create_adjustments
  alias credits promotion_credits

  has_many :promotion_rules
  accepts_nested_attributes_for :promotion_rules
  alias_method :rules, :promotion_rules

  MATCH_POLICIES = %w(all any)

  scope :automatic, where("code IS NULL OR code = ''")


  def eligible?(order)
    !expired? && rules_are_eligible?(order)
  end

{'fraction_non_alphanumeric': 0.08562367864693446, 'fraction_numerical': 0.0, 'mean_word_length': 5.3133333333333335, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5376414', 'n_tokens_mistral': 320, 'n_tokens_neox': 309, 'n_words': 70}