<commit_before>module JsTestCore
  module Resources
    module Specs
      module Spec
        def get_generated_spec
          connection.terminate_after_sending do
            connection.send_head(
              200,
              'Content-Type' => "text/html",
              'Last-Modified' => ::File.mtime(absolute_path).rfc822,
              'Content-Length' => ::File.size(absolute_path)
            )

            connection.send_data(
              JsTestCore::Representations::Spec.new(self, :spec_files => spec_files).to_s
            )
          end
        end
      end
    end
  end
end<commit_msg>Added Spec#render_spec so it can be overridden.<commit_after>module JsTestCore
  module Resources
    module Specs
      module Spec
        def get_generated_spec
          connection.terminate_after_sending do
            connection.send_head(
              200,
              'Content-Type' => "text/html",
              'Last-Modified' => ::File.mtime(absolute_path).rfc822,
              'Content-Length' => ::File.size(absolute_path)
            )

            connection.send_data(render_spec)
          end
        end

        def render_spec
          JsTestCore::Representations::Spec.new(self, :spec_files => spec_files).to_s
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08533747090768037, 'fraction_numerical': 0.009309542280837859, 'mean_word_length': 1.7861771058315334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '238108', 'n_tokens_mistral': 374, 'n_tokens_neox': 359, 'n_words': 68}