<commit_before># encoding: utf-8

include ActionView::Helpers::TextHelper

module CodeChangelog
  require "code_changelog/railtie" if defined?(Rails)

  class ArmaCodeChangelogEntry < ActiveRecord::Base
    def timestamp()
      self.filename[/^\d{14}/, 0]
    end

    def yaml_content()
      @content ||= YAML.load_file(File.join(Rails.root, self.directory, self.filename))
    end

    def description()
      self.yaml_content()['description']
    end

    def affect()<commit_msg>Let the host application provide the full changelog yaml path<commit_after># encoding: utf-8

include ActionView::Helpers::TextHelper

module CodeChangelog
  require "code_changelog/railtie" if defined?(Rails)

  class ArmaCodeChangelogEntry < ActiveRecord::Base
    def timestamp()
      self.filename[/^\d{14}/, 0]
    end

    def yaml_content()
      @content ||= YAML.load_file(File.join(self.directory, self.filename))
    end

    def description()
      self.yaml_content()['description']
    end

    def affect()
{'fraction_non_alphanumeric': 0.11507936507936507, 'fraction_numerical': 0.007936507936507936, 'mean_word_length': 3.8047619047619046, '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': '400214', 'n_tokens_mistral': 330, 'n_tokens_neox': 314, 'n_words': 71}