<commit_before># encoding: UTF-8
module Pinata
  module Reporters
    class Default < Base
      def initialize(project, stream=STDOUT)
        super(project, stream)
        project.observe {|event| self.update(event)}
      end

      def update(event)
        send(event[:type], event)
      end

      def make_report
        if project.has_changes?
          msg = "Looks like something popped out!  Lets take a look...\n"
          msg << "#{emoticon} #{description} (#{project.shift})"
        else
          msg = "There is nothing here.  The pinata just dangles there mockingly"
        end
        write(msg)
      end

      private
      def description
        if project.shift > 0
          "Your project's code has improved!"
        elsif project.shift < 0
          "Your project's code has degraded!"
        else<commit_msg>Fixed formatting of Pinata::Reporters::Default<commit_after># encoding: UTF-8
module Pinata
  module Reporters
    class Default < Base
      def initialize(project, stream=STDOUT)
        super(project, stream)
        project.observe {|event| self.update(event)}
      end

      def update(event)
        send(event[:type], event)
      end

      def make_report
        if project.has_changes?
          msg = "Looks like something popped out!  Lets take a look...\n"
          msg << "#{emoticon} #{description} (#{project.shift})"
        else
          msg = "There is nothing here. The pinata just dangles there mockingly."
        end
        write("#{msg}\n")
      end

      private
      def description
        if project.shift > 0
          "Your project's code has improved!"
        elsif project.shift < 0
          "Your project's code has degraded!"
        else
{'fraction_non_alphanumeric': 0.0921205098493627, 'fraction_numerical': 0.0034762456546929316, 'mean_word_length': 2.0245183887915936, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, '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': '6415127', 'n_tokens_mistral': 489, 'n_tokens_neox': 463, 'n_words': 156}