<commit_before>
var grunt = require('grunt'),
    path = require('path');

var baseDir = '.';
var tmpRunner = '_SpecRunner.html';


exports.buildSpecrunner = function(dir, options, reporters){
  var jasmineCss = [
    __dirname + '/../../jasmine/lib/jasmine-core/jasmine.css'
  ];

  var jasmineCore = [
    __dirname + '/../../jasmine/lib/jasmine-core/jasmine.js',
    __dirname + '/../../jasmine/lib/jasmine-core/jasmine-html.js'
  ];

  var phantomHelper = __dirname + '/../jasmine/phantom-helper.js';
  var jasmineHelper = __dirname + '/../jasmine/jasmine-helper.js';

  var styles = getRelativeFileList(jasmineCss);
  var scripts = getRelativeFileList(jasmineCore, options.src, options.helpers, options.specs, phantomHelper, reporters, jasmineHelper);

  var specRunnerTemplate = typeof options.template === 'string' ? {
    src: options.template,
    opts: {}
  } : options.template;

  var source;
  grunt.file.copy(specRunnerTemplate.src, path.join(dir,tmpRunner), {
    process : function(src) {
      source = grunt.util._.template(src, grunt.util._.extend({
        scripts : scripts,
        css : styles
      }, specRunnerTemplate.opts));
      return source;
    }
  });
  return source;
};


function getRelativeFileList(/* args... */) {
  var list = Array.prototype.slice.call(arguments);
  var base = path.resolve(baseDir);
  var files = [];
  list.forEach(function(listItem){
    files = files.concat(grunt.file.expandFiles(listItem));
  });
  files = grunt.util._(files).map(function(file){
    return path.resolve(file).replace(base,'');
  });
  return files;
}
<commit_msg>convert windows path separator to /.<commit_after>
var grunt = require('grunt'),
    path = require('path');

var baseDir = '.';
var tmpRunner = '_SpecRunner.html';


exports.buildSpecrunner = function(dir, options, reporters){
  var jasmineCss = [
    __dirname + '/../../jasmine/lib/jasmine-core/jasmine.css'
  ];

  var jasmineCore = [
    __dirname + '/../../jasmine/lib/jasmine-core/jasmine.js',
    __dirname + '/../../jasmine/lib/jasmine-core/jasmine-html.js'
  ];

  var phantomHelper = __dirname + '/../jasmine/phantom-helper.js';
  var jasmineHelper = __dirname + '/../jasmine/jasmine-helper.js';

  var styles = getRelativeFileList(jasmineCss);
  var scripts = getRelativeFileList(jasmineCore, options.src, options.helpers, options.specs, phantomHelper, reporters, jasmineHelper);

  var specRunnerTemplate = typeof options.template === 'string' ? {
    src: options.template,
    opts: {}
  } : options.template;

  var source;
  grunt.file.copy(specRunnerTemplate.src, path.join(dir,tmpRunner), {
    process : function(src) {
      source = grunt.util._.template(src, grunt.util._.extend({
        scripts : scripts,
        css : styles
      }, specRunnerTemplate.opts));
      return source;
    }
  });
  return source;
};


function getRelativeFileList(/* args... */) {
  var list = Array.prototype.slice.call(arguments);
  var base = path.resolve(baseDir);
  var files = [];
  list.forEach(function(listItem){
    files = files.concat(grunt.file.expandFiles(listItem));
  });
  files = grunt.util._(files).map(function(file){
    return path.resolve(file).replace(base,'').replace(/\\/g,'/');
  });
  return files;
}

{'fraction_non_alphanumeric': 0.16429455445544555, 'fraction_numerical': 0.0, 'mean_word_length': 3.4287671232876713, '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': '3786965', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1027, 'n_words': 189}