<commit_before>// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
'use strict';

var gulp = require('gulp'),
    prefix = require('gulp-autoprefixer'),
    minifyCss = require('gulp-minify-css'),
    usemin = require('gulp-usemin'),
    uglify = require('gulp-uglify'),<% if(useCompass) { %>
    compass = require('gulp-compass'),<% } %>
    minifyHtml = require('gulp-minify-html'),
    livereload = require('gulp-livereload'),
    imagemin = require('gulp-imagemin'),
    ngAnnotate = require('gulp-ng-annotate'),
    jshint = require('gulp-jshint'),
    rev = require('gulp-rev'),
    connect = require('gulp-connect'),
    proxy = require('proxy-middleware'),
    es = require('event-stream'),
    flatten = require('gulp-flatten'),
    clean = require('gulp-clean'),
    replace = require('gulp-replace'),
    browserify = require('gulp-browserify');

var karma = require('gulp-karma')({configFile: 'src/test/javascript/karma.conf.js'});

var yeoman = {
    app: 'src/main/webapp/',//require('./bower.json').appPath || 'app',
    dist: 'src/main/webapp/dist/',
    test: 'src/test/javascript/spec/',
    tmp: '.tmp/'<% if(useCompass) { %>,
    scss: 'src/main/scss/'<% } %>
}

gulp.task('clean', function(){
    return gulp.src(yeoman.dist, {read: false}).
        pipe(clean());
});

gulp.task('clean:tmp', function(){
    return gulp.src(yeoman.tmp, {read: false}).
        pipe(clean());
});

gulp.task('test', function(){
    karma.once();
});

gulp.task('copy', ['clean'], function(){
    return es.merge(gulp.src(yeoman.app + 'i18n/**').
              pipe(gulp.dest(yeoman.dist + 'i18n/')),
              gulp.src(yeoman.app + '**/*.{woff,svg,ttf,eot}').
              pipe(flatten()).
              pipe(gulp.dest(yeoman.dist + 'fonts/')));
});

gulp.task('images', function(){
        return gulp.src(yeoman.app + 'images/**').
            pipe(imagemin({optimizationLevel: 5})).
            pipe(gulp.dest(yeoman.dist + 'images'));
});

<% if(useCompass) { %>
gulp.task('compass', function() {
    return gulp.src(yeoman.scss + '{,*/}*.scss').
        pipe(compass({
                project: __dirname,
                sass: 'src/main/scss',
                css: 'src/main/webapp/styles',
                generated_images: '.tmp/images/generated',
                image: 'src/main/webapp/images',
                javascript: 'src/main/webapp/scripts',
                font: 'src/main/webapp/styles/fonts',
                import_path: 'src/main/webapp/bower_components',
                relative: false
        })).
        pipe(gulp.dest(yeoman.tmp + 'styles'));
});
<% } %>

gulp.task('styles', [<% if(useCompass) { %> 'compass'<% } %>], function() {
    return gulp.src(yeoman.app + '{,*/}*.css').
        pipe(gulp.dest(yeoman.tmp));
});

gulp.task('server', ['watch'<% if(useCompass) { %>, 'compass'<% } %>], function() {
    connect.server(
        {
            root: [yeoman.app, yeoman.tmp],
            port: 9000,
            livereload: true,
            middleware: function(connect, o) {
                return [
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/app');
                        options.route = '/app';
                        return proxy(options);
                    })(),
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/api-docs');
                        options.route = '/api-docs';
                        return proxy(options);
                    })(),
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/metrics');
                        options.route = '/metrics';
                        return proxy(options);
                    })(),
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/dump');
                        options.route = '/dump';
                        return proxy(options);
                    })()<% if (devDatabaseType == 'h2Memory') { %>,
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/console');
                        options.route = '/console';
                        return proxy(options);
                    })()<% } %>
                ];
            }
        }
    );
});

gulp.task('watch', function() {
    gulp.watch(yeoman.app + 'scripts/**', ['browserify']);<% if(useCompass) { %>
    gulp.watch(yeoman.scss, ['compass']); <% } %>
    gulp.watch('src/images/**', ['images']);
    livereload();
});
<commit_msg>#679 Missing oauth declaration<commit_after>// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
'use strict';

var gulp = require('gulp'),
    prefix = require('gulp-autoprefixer'),
    minifyCss = require('gulp-minify-css'),
    usemin = require('gulp-usemin'),
    uglify = require('gulp-uglify'),<% if(useCompass) { %>
    compass = require('gulp-compass'),<% } %>
    minifyHtml = require('gulp-minify-html'),
    livereload = require('gulp-livereload'),
    imagemin = require('gulp-imagemin'),
    ngAnnotate = require('gulp-ng-annotate'),
    jshint = require('gulp-jshint'),
    rev = require('gulp-rev'),
    connect = require('gulp-connect'),
    proxy = require('proxy-middleware'),
    es = require('event-stream'),
    flatten = require('gulp-flatten'),
    clean = require('gulp-clean'),
    replace = require('gulp-replace'),
    browserify = require('gulp-browserify');

var karma = require('gulp-karma')({configFile: 'src/test/javascript/karma.conf.js'});

var yeoman = {
    app: 'src/main/webapp/',//require('./bower.json').appPath || 'app',
    dist: 'src/main/webapp/dist/',
    test: 'src/test/javascript/spec/',
    tmp: '.tmp/'<% if(useCompass) { %>,
    scss: 'src/main/scss/'<% } %>
}

gulp.task('clean', function(){
    return gulp.src(yeoman.dist, {read: false}).
        pipe(clean());
});

gulp.task('clean:tmp', function(){
    return gulp.src(yeoman.tmp, {read: false}).
        pipe(clean());
});

gulp.task('test', function(){
    karma.once();
});

gulp.task('copy', ['clean'], function(){
    return es.merge(gulp.src(yeoman.app + 'i18n/**').
              pipe(gulp.dest(yeoman.dist + 'i18n/')),
              gulp.src(yeoman.app + '**/*.{woff,svg,ttf,eot}').
              pipe(flatten()).
              pipe(gulp.dest(yeoman.dist + 'fonts/')));
});

gulp.task('images', function(){
        return gulp.src(yeoman.app + 'images/**').
            pipe(imagemin({optimizationLevel: 5})).
            pipe(gulp.dest(yeoman.dist + 'images'));
});

<% if(useCompass) { %>
gulp.task('compass', function() {
    return gulp.src(yeoman.scss + '{,*/}*.scss').
        pipe(compass({
                project: __dirname,
                sass: 'src/main/scss',
                css: 'src/main/webapp/styles',
                generated_images: '.tmp/images/generated',
                image: 'src/main/webapp/images',
                javascript: 'src/main/webapp/scripts',
                font: 'src/main/webapp/styles/fonts',
                import_path: 'src/main/webapp/bower_components',
                relative: false
        })).
        pipe(gulp.dest(yeoman.tmp + 'styles'));
});
<% } %>

gulp.task('styles', [<% if(useCompass) { %> 'compass'<% } %>], function() {
    return gulp.src(yeoman.app + '{,*/}*.css').
        pipe(gulp.dest(yeoman.tmp));
});

gulp.task('server', ['watch'<% if(useCompass) { %>, 'compass'<% } %>], function() {
    connect.server(
        {
            root: [yeoman.app, yeoman.tmp],
            port: 9000,
            livereload: true,
            middleware: function(connect, o) {
                return [
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/app');
                        options.route = '/app';
                        return proxy(options);
                    })(),
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/api-docs');
                        options.route = '/api-docs';
                        return proxy(options);
                    })(),
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/metrics');
                        options.route = '/metrics';
                        return proxy(options);
                    })(),
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/dump');
                        options.route = '/dump';
                        return proxy(options);
                    })()<% if (authenticationType == 'token') { %>,
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/oauth/token');
                        options.route = '/oauth/token';
                        return proxy(options);
                    })()<% } %><% if (devDatabaseType == 'h2Memory') { %>,
                    (function() {
                        var url = require('url');
                        var proxy = require('proxy-middleware');
                        var options = url.parse('http://localhost:8080/console');
                        options.route = '/console';
                        return proxy(options);
                    })()<% } %>
                ];
            }
        }
    );
});

gulp.task('watch', function() {
    gulp.watch(yeoman.app + 'scripts/**', ['browserify']);<% if(useCompass) { %>
    gulp.watch(yeoman.scss, ['compass']); <% } %>
    gulp.watch('src/images/**', ['images']);
    livereload();
});

{'fraction_non_alphanumeric': 0.183142751752121, 'fraction_numerical': 0.006362965695315382, 'mean_word_length': 1.729675308331236, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '5292078', 'n_tokens_mistral': 3309, 'n_tokens_neox': 3072, 'n_words': 506}