<commit_before>module Mina
  module Helpers
    module Output
      def print_line(line)
        case line
        when /^\-+> (.*?)$/
          print_status Regexp.last_match[1]
        when /^! (.*?)$/
          print_error Regexp.last_match[1]
        when /^\$ (.*?)$/
          print_command Regexp.last_match[1]
        else
          print_stdout line
        end
      rescue Encoding::InvalidByteSequenceError
        comment 'Invalid byte sequence'
      end

      def print_status(msg)
        puts "#{color('----->', 32)} #{msg}"
      rescue Encoding::InvalidByteSequenceError
        comment 'Invalid byte sequence'
      end

      def print_error(msg)
        puts " #{color('!', 33)}     #{color(msg, 31)}"
      rescue Encoding::InvalidByteSequenceError
        comment 'Invalid byte sequence'
      end

      def print_stderr(msg)
        if msg =~ /I, \[/ # fix for asset precompile
          print_stdout msg
        else
          puts "       #{color(msg, 31)}"
        end
      rescue Encoding::InvalidByteSequenceError
        comment 'Invalid byte sequence'
      end

      def print_command(msg)
        puts "       #{color('$', 36)} #{color(msg, 36)}"
      rescue Encoding::InvalidByteSequenceError
        comment 'Invalid byte sequence'
      end

      def print_info(msg)
        puts "       #{color(msg, 96)}"
      rescue Encoding::InvalidByteSequenceError
        comment 'Invalid byte sequence'
      end

      def print_stdout(msg)
        puts "       #{msg}"
      rescue Encoding::InvalidByteSequenceError
        comment 'Invalid byte sequence'
      end

      def color(str, c)
        ENV['NO_COLOR'] ? str : "\033[#{c}m#{str}\033[0m"
      end
    end
  end
end

extend Mina::Helpers::Output
<commit_msg>Replace comment method with puts<commit_after>module Mina
  module Helpers
    module Output
      def print_line(line)
        case line
        when /^\-+> (.*?)$/
          print_status Regexp.last_match[1]
        when /^! (.*?)$/
          print_error Regexp.last_match[1]
        when /^\$ (.*?)$/
          print_command Regexp.last_match[1]
        else
          print_stdout line
        end
        puts 'Invalid byte sequence'
      rescue Encoding::InvalidByteSequenceError
        puts 'Invalid byte sequence'
      end

      def print_status(msg)
        puts "#{color('----->', 32)} #{msg}"
      rescue Encoding::InvalidByteSequenceError
        puts 'Invalid byte sequence'
      end

      def print_error(msg)
        puts " #{color('!', 33)}     #{color(msg, 31)}"
      rescue Encoding::InvalidByteSequenceError
        puts 'Invalid byte sequence'
      end

      def print_stderr(msg)
        if msg =~ /I, \[/ # fix for asset precompile
          print_stdout msg
        else
          puts "       #{color(msg, 31)}"
        end
      rescue Encoding::InvalidByteSequenceError
        puts 'Invalid byte sequence'
      end

      def print_command(msg)
        puts "       #{color('$', 36)} #{color(msg, 36)}"
      rescue Encoding::InvalidByteSequenceError
        puts 'Invalid byte sequence'
      end

      def print_info(msg)
        puts "       #{color(msg, 96)}"
      rescue Encoding::InvalidByteSequenceError
        puts 'Invalid byte sequence'
      end

      def print_stdout(msg)
        puts "       #{msg}"
      rescue Encoding::InvalidByteSequenceError
        puts 'Invalid byte sequence'
      end

      def color(str, c)
        ENV['NO_COLOR'] ? str : "\033[#{c}m#{str}\033[0m"
      end
    end
  end
end

extend Mina::Helpers::Output

{'fraction_non_alphanumeric': 0.11045364891518737, 'fraction_numerical': 0.013524936601859678, 'mean_word_length': 1.9558701082431307, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7628712', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1062, 'n_words': 266}