<commit_before>desc 'Build release package for RubyGems.'
task :gem do
  Rake::Task[:@project].invoke
  Rake::Task[:@ann_nfo_text].invoke
  Rake::Task[:@project_authors_text].invoke

  gem             = Gem::Specification.new
  gem.name        = @project_package_name
  gem.date        = @project_module::RELDATE
  gem.version     = @project_module::VERSION
  gem.summary     = @project_module::TAGLINE
  gem.description = @ann_nfo_text
  gem.homepage    = @project_module::WEBSITE
  gem.authors     = @project_authors_text.split(/\s*,\s*/)
  gem.executables = FileList['bin/*'].pathmap('%f')

  Rake::Task[:man].invoke
  gem.files = FileList[
    '{bin,lib,ext}/**/*',
    'LICENSE',<commit_msg>ensure that project version matches release notes<commit_after>desc 'Build release package for RubyGems.'
task :gem do
  Rake::Task[:@project].invoke
  Rake::Task[:@ann_nfo_text].invoke
  Rake::Task[:@project_authors_text].invoke

  # ensure that project version matches release notes
  Rake::Task[:@ann_rel_html_body_nodes].invoke

  version_from_notes = @ann_rel_html_title_node.inner_text
  version_from_project = "Version #{@project_module::VERSION} (#{@project_module::RELDATE})"

  unless version_from_notes == version_from_project
    raise "Project version #{version_from_project.inspect} does not match "\
      "the #{version_from_notes.inspect} version listed in the release notes."
  end

  # build gemspec
  gem             = Gem::Specification.new
  gem.name        = @project_package_name
  gem.date        = @project_module::RELDATE
  gem.version     = @project_module::VERSION
  gem.summary     = @project_module::TAGLINE
  gem.description = @ann_nfo_text
  gem.homepage    = @project_module::WEBSITE
  gem.authors     = @project_authors_text.split(/\s*,\s*/)
  gem.executables = FileList['bin/*'].pathmap('%f')

  Rake::Task[:man].invoke
  gem.files = FileList[
    '{bin,lib,ext}/**/*',
    'LICENSE',
{'fraction_non_alphanumeric': 0.1372651356993737, 'fraction_numerical': 0.0, 'mean_word_length': 4.112, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2855672', 'n_tokens_mistral': 641, 'n_tokens_neox': 631, 'n_words': 110}