<commit_before>class ProjectPresenter < Presenter
  
  delegate :id, :name, :working_group, :admin, :admins, :members, to: :object

  def description(length: nil)
    if length
      _.description.truncate(length, separator: /\s/, omission: '...')
    else
      _.description
    end
  end

  let(:start_date) do
    date = _.tasks.minimum("due_date")
    I18n.l(date, format: :long)
  end

  let(:due_date) do
    date = _.tasks.maximum("due_date")
    I18n.l(date, format: :long)
  end

  let(:tasks) do
    _.tasks.not_completed.ordered_by_date
  end

  let(:supplies) do
    _.supplies.not_completed.ordered_by_date
  end

  let(:admins_count) do
    _.admins.active.count
  end

end<commit_msg>Projects: show completed tasks & supplies as well #29<commit_after>class ProjectPresenter < Presenter
  
  delegate :id, :name, :working_group, :admin, :admins, :members, to: :object

  def description(length: nil)
    if length
      _.description.truncate(length, separator: /\s/, omission: '...')
    else
      _.description
    end
  end

  let(:start_date) do
    date = _.tasks.minimum("due_date")
    I18n.l(date, format: :long)
  end

  let(:due_date) do
    date = _.tasks.maximum("due_date")
    I18n.l(date, format: :long)
  end

  let(:tasks) do
    _.tasks.ordered_by_date
  end

  let(:supplies) do
    _.supplies.ordered_by_date
  end

  let(:admins_count) do
    _.admins.active.count
  end

end
{'fraction_non_alphanumeric': 0.1253541076487252, 'fraction_numerical': 0.007082152974504249, 'mean_word_length': 3.0956521739130434, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '7301608', 'n_tokens_mistral': 533, 'n_tokens_neox': 495, 'n_words': 114}