<commit_before>require "ostruct"

class CompareLinker
  class Formatter
    class Markdown < Base
      def format(gem_info)
        g = OpenStruct.new(gem_info)

        text = case
        when g.owner && g.old_rev && g.new_rev
          "* #{g.gem_name}: https://github.com/#{g.owner}/#{g.gem_name}/compare/#{g.old_rev}...#{g.new_rev}"
        when g.homepage_uri
          "* [#{g.gem_name}](#{g.homepage_uri}): #{g.old_ver} => #{g.new_ver}"
        when g.old_tag && g.new_tag
          "* #{g.gem_name}: https://github.com/#{g.repo_owner}/#{g.repo_name}/compare/#{g.old_tag}...#{g.new_tag}"
        when g.repo_owner && g.repo_name
          "* [#{g.gem_name}](https://github.com/#{g.repo_owner}/#{g.repo_name}): #{g.old_ver} => #{g.new_ver}"
        else
          "* #{g.gem_name}: (link not found) #{g.old_ver} => #{g.new_ver}"
        end

        if downgrade?(g.old_ver, g.new_ver, g.old_tag, g.new_tag)
          text += " (downgrade)"
        end

        text
      end
    end
  end
end<commit_msg>Add checkbox to Formatter::Markdown<commit_after>require "ostruct"

class CompareLinker
  class Formatter
    class Markdown < Base
      def format(gem_info)
        g = OpenStruct.new(gem_info)

        text = "* [ ] "
        text += case
        when g.owner && g.old_rev && g.new_rev
          "#{g.gem_name}: https://github.com/#{g.owner}/#{g.gem_name}/compare/#{g.old_rev}...#{g.new_rev}"
        when g.homepage_uri
          "[#{g.gem_name}](#{g.homepage_uri}): #{g.old_ver} => #{g.new_ver}"
        when g.old_tag && g.new_tag
          "#{g.gem_name}: https://github.com/#{g.repo_owner}/#{g.repo_name}/compare/#{g.old_tag}...#{g.new_tag}"
        when g.repo_owner && g.repo_name
          "[#{g.gem_name}](https://github.com/#{g.repo_owner}/#{g.repo_name}): #{g.old_ver} => #{g.new_ver}"
        else
          "#{g.gem_name}: (link not found) #{g.old_ver} => #{g.new_ver}"
        end

        if downgrade?(g.old_ver, g.new_ver, g.old_tag, g.new_tag)
          text += " (downgrade)"
        end

        text
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.19273607748184018, 'fraction_numerical': 0.0, 'mean_word_length': 2.263823064770932, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 6, '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': '3003518', 'n_tokens_mistral': 785, 'n_tokens_neox': 797, 'n_words': 119}