<commit_before>module ArJdbc
  module Tasks

    if defined? ActiveRecord::Tasks::DatabaseTasks # AR-4.x

      def self.register_tasks(pattern, task)
        ActiveRecord::Tasks::DatabaseTasks.register_task(pattern, task)
      end

    else

      @@tasks = {}

      def self.register_tasks(pattern, task)
        @@tasks[pattern] = task
      end
<commit_msg>[rake] support adapter: mariadb as if it were mysql (on AR 4.x)<commit_after>module ArJdbc
  module Tasks

    if defined? ActiveRecord::Tasks::DatabaseTasks # AR-4.x

      def self.register_tasks(pattern, task)
        ActiveRecord::Tasks::DatabaseTasks.register_task(pattern, task)
      end

      # support adapter: mariadb (as if it were mysql)
      register_tasks(/mariadb/, ActiveRecord::Tasks::MySQLDatabaseTasks)

    else

      @@tasks = {}

      def self.register_tasks(pattern, task)
        @@tasks[pattern] = task
      end

{'fraction_non_alphanumeric': 0.10276243093922652, 'fraction_numerical': 0.0033149171270718232, 'mean_word_length': 3.062780269058296, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3811515', 'n_tokens_mistral': 282, 'n_tokens_neox': 265, 'n_words': 65}