<commit_before>module OS
  module Mac
    X11 = XQuartz = Module.new

    module XQuartz
      extend self

      FORGE_BUNDLE_ID = "org.macosforge.xquartz.X11"
      APPLE_BUNDLE_ID = "org.x.X11"
      FORGE_PKG_ID = "org.macosforge.xquartz.pkg"

      PKGINFO_VERSION_MAP = {
        "2.6.34" => "2.6.3",
        "2.7.4"  => "2.7.0",
        "2.7.14" => "2.7.1",
        "2.7.28" => "2.7.2",
        "2.7.32" => "2.7.3",
        "2.7.43" => "2.7.4",
        "2.7.50" => "2.7.5_rc1",
        "2.7.51" => "2.7.5_rc2",
      }.freeze

      # This returns the version number of XQuartz, not of the upstream X.org.
      # The X11.app distributed by Apple is also XQuartz, and therefore covered
      # by this method.
      def version
        @version ||= detect_version
      end

      def detect_version
        if (path = bundle_path) && path.exist? && (version = version_from_mdls(path))
          version
        elsif prefix.to_s == "/usr/X11"
          guess_system_version
        else
          version_from_pkgutil
        end
      end

      def latest_version
        "2.7.4"
      end

      def bundle_path<commit_msg>Add pkgutil version for XQuartz 2.7.5_rc3<commit_after>module OS
  module Mac
    X11 = XQuartz = Module.new

    module XQuartz
      extend self

      FORGE_BUNDLE_ID = "org.macosforge.xquartz.X11"
      APPLE_BUNDLE_ID = "org.x.X11"
      FORGE_PKG_ID = "org.macosforge.xquartz.pkg"

      PKGINFO_VERSION_MAP = {
        "2.6.34" => "2.6.3",
        "2.7.4"  => "2.7.0",
        "2.7.14" => "2.7.1",
        "2.7.28" => "2.7.2",
        "2.7.32" => "2.7.3",
        "2.7.43" => "2.7.4",
        "2.7.50" => "2.7.5_rc1",
        "2.7.51" => "2.7.5_rc2",
        "2.7.52" => "2.7.5_rc3",
      }.freeze

      # This returns the version number of XQuartz, not of the upstream X.org.
      # The X11.app distributed by Apple is also XQuartz, and therefore covered
      # by this method.
      def version
        @version ||= detect_version
      end

      def detect_version
        if (path = bundle_path) && path.exist? && (version = version_from_mdls(path))
          version
        elsif prefix.to_s == "/usr/X11"
          guess_system_version
        else
          version_from_pkgutil
        end
      end

      def latest_version
        "2.7.4"
      end

      def bundle_path
{'fraction_non_alphanumeric': 0.1369686560755689, 'fraction_numerical': 0.06526406182911121, 'mean_word_length': 1.6998841251448435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 20, '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': '2743855', 'n_tokens_mistral': 954, 'n_tokens_neox': 904, 'n_words': 184}