<commit_before>require "rubygems/command"
require "rdoc"
require "rdoc/generator/mdoc"

class Gem::Commands::GmanCommand < Gem::Command
  def initialize
    super "gman", "Generate and install man pages for gems"
  end

  def execute
    Gem::Specification.each { |gem| document(gem) }
  end

  private

  def document(gem)
    RDoc::RDoc.new.document [
      "-f", "mdoc",
      "--section", "#{mandb_section(gem)}",
      "-o", "#{output_directory}",
      *Dir.glob(gem.lib_dirs_glob),
    ]
  end

  def output_directory
    File.join(Dir.home, ".man")
  end

  def mandb_section(gem)
    "3-rubygems-#{gem.name}-#{gem.version.to_s.gsub(".", "-")}"
  end
end
<commit_msg>Quiet the output of RDoc::RDoc.<commit_after>require "rubygems/command"
require "rdoc"
require "rdoc/generator/mdoc"

class Gem::Commands::GmanCommand < Gem::Command
  def initialize
    super "gman", "Generate and install man pages for gems"
  end

  def execute
    Gem::Specification.each { |gem| document(gem) }
  end

  private

  def document(gem)
    RDoc::RDoc.new.document [
      "-q",
      "-f", "mdoc",
      "--section", "#{mandb_section(gem)}",
      "-o", "#{output_directory}",
      *Dir.glob(gem.lib_dirs_glob),
    ]
  end

  def output_directory
    File.join(Dir.home, ".man")
  end

  def mandb_section(gem)
    "3-rubygems-#{gem.name}-#{gem.version.to_s.gsub(".", "-")}"
  end
end

{'fraction_non_alphanumeric': 0.16594202898550725, 'fraction_numerical': 0.0014492753623188406, 'mean_word_length': 3.2623456790123457, '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': '5200653', 'n_tokens_mistral': 509, 'n_tokens_neox': 504, 'n_words': 103}