<commit_before>module.exports = function(gulp, defaults, subtasks) {

    var shell = require('gulp-shell');
    var wait = require('gulp-wait');
    
    var taskName = 'test:intern';

    gulp.task('start_test', function () {
        return gulp.src('')
            .pipe(wait(500))
            .pipe(shell([
                './node_modules/.bin/intern-runner config=tests/functional/intern'
            ]))
    })

    gulp.task('start_selenium', function () {
        return gulp.src('')
            .pipe(shell([
                'cd ./node_modules/wGulp/src/intern && java -jar selenium-server-standalone-2.44.0.jar &'
            ]))
    })

    gulp.task('stop_selenium_server', function () {
        return gulp.src('')
            .pipe(wait(500))
            .pipe(shell([
                'lsof -t -i tcp:4444 | xargs kill'
            ]))
    })
    
    gulp.task('_stop_selenium_server',['start_test'], function(){
        gulp.start('stop_selenium_server')
    })
    
    gulp.task('begin_Testing',
        
        
        ['start_selenium', 'connect:noreload','_stop_selenium_server'],
        function(done){
            var command = '';
        return gulp.src('').pipe(shell([command]));
    });

    gulp.task(taskName, ['begin_Testing'], function(done){
        gulp.start(['connect:stop']);
        done();
    });

};<commit_msg>adding logic to determine configuration<commit_after>var gutil = require('gulp-util');

module.exports = function(gulp, defaults, subtasks) {

    var argv = require('yargs').argv;
    var shell = require('gulp-shell');
    var wait = require('gulp-wait');
    
    var taskName = 'test:intern';

    gulp.task('start_test', function () {
        var command = '';
        
        if (argv.local){
            command = './node_modules/.bin/intern-runner config=tests/functional/internLocal';
        } else if (argv.sauce){
            command = './node_modules/.bin/intern-runner config=tests/functional/internSauce';
        } else {
            gutil.log(gutil.colors.red("Need to pick a configuration. (--sauce or --local)"))
        }
        
        return gulp.src('')
            .pipe(wait(500))
            .pipe(shell([command]))
    })

    gulp.task('start_selenium', function () {
        return gulp.src('')
            .pipe(shell([
                'cd ./node_modules/wGulp/src/intern && java -jar selenium-server-standalone-2.44.0.jar &'
            ]))
    })

    gulp.task('stop_selenium_server', function () {
        return gulp.src('')
            .pipe(wait(500))
            .pipe(shell([
                'lsof -t -i tcp:4444 | xargs kill'
            ]))
    })
    
    gulp.task('_stop_selenium_server',['start_test'], function(){
        gulp.start('stop_selenium_server')
    })
    
    gulp.task('begin_Testing',
        ['start_selenium', 'connect:noreload','_stop_selenium_server'],
        function(done){
            var command = '';
        return gulp.src('').pipe(shell([command]));
    });

    gulp.task(taskName, ['begin_Testing'], function(done){
        gulp.start(['connect:stop']);
        done();
    });

};
{'fraction_non_alphanumeric': 0.16538214515093128, 'fraction_numerical': 0.00899165061014772, 'mean_word_length': 2.050930460333007, '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': '4202252', 'n_tokens_mistral': 1006, 'n_tokens_neox': 951, 'n_words': 148}