<commit_before>#!/usr/bin/env ruby

require "fileutils"

module FuseJS
  #Build constants
  BUILD = {
    "Version" => "Alpha",
    "Built" => Time.now.strftime("%a. %b %d %Y %H:%M:%S %Z")
  }
  #Path constants
  ROOT_PATH = File.expand_path(File.dirname(__FILE__))
  SOURCE_PATH = File.join(ROOT_PATH, "src")
  FINAL_PATH = File.join(ROOT_PATH, "dist")
  TEST_PATH = File.join(ROOT_PATH, "test")
  class << self
    def build!
      puts "Building FuseJS..."
      builder = Builder.new(:root => ROOT_PATH, :search => [SOURCE_PATH], :files => ["fuse.js"], :constants => BUILD)
      FileUtils.mkdir_p FINAL_PATH
      builder.save File.join(FINAL_PATH, "fuse.js")
      puts "Done. Building legacy unit tests..."
      #Always start from scratch
      FileUtils.rm_rf LegacyTestGenerator::FINAL_PATH
      FileUtils.mkdir_p LegacyTestGenerator::FINAL_PATH
      Dir[File.join(LegacyTestGenerator::TEST_PATH, "*_test.js")].each do |file|
        LegacyTestGenerator.new(file).render
      end
      puts "Done."
    end
  end
  #Based on work by <NAME> <http://getsprockets.org>
  class Builder
    class << self
      def absolute?(location)
        return location[0, 1] == File.expand_path(location)[0, 1] || (RUBY_PLATFORM =~ /(win|w)32$/ ? location[0, 1] == File::SEPARATOR && File.expand_path(location) =~ /[A-Za-z]:[\/\\]/ : false)<commit_msg>fusejs: Ensure that comments are included in the composite `dist/fuse.js`. [Kit Goncharov]<commit_after>#!/usr/bin/env ruby

require "fileutils"

module FuseJS
  #Build constants
  BUILD = {
    "Version" => "Alpha",
    "Built" => Time.now.strftime("%a. %b %d %Y %H:%M:%S %Z")
  }
  #Path constants
  ROOT_PATH = File.expand_path(File.dirname(__FILE__))
  SOURCE_PATH = File.join(ROOT_PATH, "src")
  FINAL_PATH = File.join(ROOT_PATH, "dist")
  TEST_PATH = File.join(ROOT_PATH, "test")
  class << self
    def build!
      puts "Building FuseJS..."
      builder = Builder.new(:root => ROOT_PATH, :search => [SOURCE_PATH], :files => ["fuse.js"], :constants => BUILD, :comments => true)
      FileUtils.mkdir_p FINAL_PATH
      builder.save File.join(FINAL_PATH, "fuse.js")
      puts "Done. Building legacy unit tests..."
      #Always start from scratch
      FileUtils.rm_rf LegacyTestGenerator::FINAL_PATH
      FileUtils.mkdir_p LegacyTestGenerator::FINAL_PATH
      Dir[File.join(LegacyTestGenerator::TEST_PATH, "*_test.js")].each do |file|
        LegacyTestGenerator.new(file).render
      end
      puts "Done."
    end
  end
  #Based on work by <NAME> <http://getsprockets.org>
  class Builder
    class << self
      def absolute?(location)
        return location[0, 1] == File.expand_path(location)[0, 1] || (RUBY_PLATFORM =~ /(win|w)32$/ ? location[0, 1] == File::SEPARATOR && File.expand_path(location) =~ /[A-Za-z]:[\/\\]/ : false)
{'fraction_non_alphanumeric': 0.15808297567954221, 'fraction_numerical': 0.005722460658082976, 'mean_word_length': 3.4538216560509554, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 20, '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': '7157988', 'n_tokens_mistral': 1006, 'n_tokens_neox': 974, 'n_words': 214}