<commit_before>require "compact_index/version"
require "compact_index/versions_file"

module CompactIndex
  def self.names(gem_names)
    "---\n" << gem_names.join("\n") << "\n"
  end

  def self.versions(versions_file, gems, args)
    versions_file.contents(gems, args)
  end

  def self.info(params)
    output = "---\n"
    params.each do |version|
      output << version_line(version) << "\n"
    end
    output
  end

  private
    def self.version_line(version)
      if version[:dependencies]
        version[:dependencies]
        deps = version[:dependencies].map do |d|
          [
             d[:gem],
             number_and_platform(d[:version],d[:platform]).gsub(/, /, "&")
          ].join(':')
        end
      else<commit_msg>Fix missing default parameter<commit_after>require "compact_index/version"
require "compact_index/versions_file"

module CompactIndex
  def self.names(gem_names)
    "---\n" << gem_names.join("\n") << "\n"
  end

  def self.versions(versions_file, gems, args = {})
    versions_file.contents(gems, args)
  end

  def self.info(params)
    output = "---\n"
    params.each do |version|
      output << version_line(version) << "\n"
    end
    output
  end

  private
    def self.version_line(version)
      if version[:dependencies]
        version[:dependencies]
        deps = version[:dependencies].map do |d|
          [
             d[:gem],
             number_and_platform(d[:version],d[:platform]).gsub(/, /, "&")
          ].join(':')
        end
      else
{'fraction_non_alphanumeric': 0.14606741573033707, 'fraction_numerical': 0.0, 'mean_word_length': 2.488479262672811, 'pattern_counts': {'":': 0, '<': 19, '<?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': '6470537', 'n_tokens_mistral': 491, 'n_tokens_neox': 475, 'n_words': 96}