<commit_before>
module Versionator
  module Detector
    # Detects {phpMyAdmin}[http://www.phpmyadmin.net].
    class Phpmyadmin < Base
      set :app_name, "phpMyAdmin"
      set :project_url, "http://www.phpmyadmin.net"

      set :detect_dirs, %w{js libraries themes}
      set :detect_files, %w{export.php index.php main.php navigation.php README sql.php themes.php}

      set :installed_version_file, "README"
      set :installed_version_regexp, /^\s*Version (.+)$/

      set :newest_version_url, 'http://www.phpmyadmin.net/home_page/index.php'
      set :newest_version_selector, '#body .rightbuttons .downloadbutton .dlname a'
      set :newest_version_regexp, /^Download (.+)$/

      def project_url_for_version(version)
        if version < Versionomy.parse('3.3.9')
          "http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/#{version}/phpMyAdmin-#{version}-notes.html/view"
        elsif Versionomy.parse('3.3.9') <= version && version < Versionomy.parse('3.4.7.1')
          "http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/#{version}/phpMyAdmin-#{version}.html/view"
        else
          "http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/#{version}/phpMyAdmin-#{version}-notes.html/view"
        end
      end
    end
  end
end
<commit_msg>Make phpMyAdmin detector detect the upcoming 4.0<commit_after>
module Versionator
  module Detector
    # Detects {phpMyAdmin}[http://www.phpmyadmin.net].
    class Phpmyadmin < Base
      set :app_name, "phpMyAdmin"
      set :project_url, "http://www.phpmyadmin.net"

      set :detect_dirs, %w{js libraries themes}
      set :detect_files, %w{export.php index.php navigation.php README sql.php themes.php}

      set :installed_version_file, "README"
      set :installed_version_regexp, /^\s*Version (.+)$/

      set :newest_version_url, 'http://www.phpmyadmin.net/home_page/index.php'
      set :newest_version_selector, '#body .rightbuttons .downloadbutton .dlname a'
      set :newest_version_regexp, /^Download (.+)$/
    end
  end
end

{'fraction_non_alphanumeric': 0.1348700343305542, 'fraction_numerical': 0.005885237861696911, 'mean_word_length': 3.3312101910828025, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4109263', 'n_tokens_mistral': 695, 'n_tokens_neox': 677, 'n_words': 125}