<commit_before># frozen_string_literal: true

# Validates a date or time is not in the future
class NotInTheFutureValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    if value && value.to_time > Time.current
      record.errors[attribute] << (options[:message] ||
                                   I18n.t(:cant_be_in_the_future,
                                          scope: %i[errors messages]))
    end
  end
end<commit_msg>RuboCop: Rails/Date<commit_after># frozen_string_literal: true

# Validates a date or time is not in the future
class NotInTheFutureValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    if value && value.in_time_zone > Time.current
      record.errors[attribute] << (options[:message] ||
                                   I18n.t(:cant_be_in_the_future,
                                          scope: %i[errors messages]))
    end
  end
end
{'fraction_non_alphanumeric': 0.08483563096500531, 'fraction_numerical': 0.0042417815482502655, 'mean_word_length': 2.3835125448028673, 'pattern_counts': {'":': 0, '<': 9, '<?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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2226031', 'n_tokens_mistral': 259, 'n_tokens_neox': 252, 'n_words': 66}