<commit_before>class ActionLog
  include Mongoid::Document

  field :command, :type => String, :default => -> { name }
  field :out
  field :exit_code, :type => Integer, :default => nil
  field :start_time, :type => Time
  field :end_time, :type => Time, :default => nil

  field :name, :type => String
  field :type, :type => String, :default => nil # setup, tests, etc - same names as the field in the spec
  field :source, :type => String, :default => nil # inferred, yaml or spec


  # can't call this build, that's a reserved work in Mongoid
  belongs_to :thebuild, :class_name => "Build"

  def success?
    exit_code == 0 || exit_code == nil
  end

  def status
    if end_time == nil
      :running
    elsif exit_code == 0 || exit_code == nil
      :success
    else
      :error
    end
  end
end<commit_msg>Refactor Build::started.<commit_after>class ActionLog
  include Mongoid::Document

  field :command, :type => String, :default => -> { name }
  field :out
  field :exit_code, :type => Integer, :default => nil
  field :start_time, :type => Time
  field :end_time, :type => Time, :default => nil

  field :name, :type => String
  field :type, :type => String, :default => nil # setup, tests, etc - same names as the field in the spec
  field :source, :type => String, :default => nil # inferred, yaml or spec


  # can't call this build, that's a reserved work in Mongoid
  belongs_to :thebuild, :class_name => "Build"

  def success?
    exit_code == 0 || exit_code == nil
  end

  def status
    if end_time == nil
      :running
    elsif success?
      :success
    else
      :error
    end
  end
end
{'fraction_non_alphanumeric': 0.12214682294879704, 'fraction_numerical': 0.001850709438618137, 'mean_word_length': 3.1063291139240508, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 31, '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': '6055929', 'n_tokens_mistral': 526, 'n_tokens_neox': 503, 'n_words': 191}