<commit_before>// Copyright (C) 2007-2012, GoodData(R) Corporation. All rights reserved.

var fs = require('fs');
var Grizzly = require('../lib/grizzly');

/**
 * grunt-grizzly
 */
module.exports = function(grunt) {
    'use strict';

    grunt.registerTask('grizzly', 'Run GoodData proxy server', function() {
        var util = grunt.util || grunt.utils;
        var _ = util._;

        // Default configuration options
        var defaults = {
            root: 'html',
            host: 'staging.getgooddata.com',
            port: 8443,
            cert: __dirname + '/../cert/server.crt',
            key: __dirname + '/../cert/server.key',
            keepAlive: false,
            quiet: false
        };

        // Options passed via command line
        var cliOptions = {
            root: grunt.option('root') || grunt.option('dir'),
            host: grunt.option('backend') || grunt.option('host'),
            port: grunt.option('port'),
            cert: grunt.option('cert'),
            key: grunt.option('key'),
            keepAlive: this.flags.keepAlive,
            quiet: this.flags.quiet
        };

        // Grunt configuration created via grunt.initConfig
        var configOptions = grunt.config('grizzly');

        // Create options object
        // CLI options have higher priority over grunt configuration options<commit_msg>Move configuration options under  key<commit_after>// Copyright (C) 2007-2012, GoodData(R) Corporation. All rights reserved.

var fs = require('fs');
var Grizzly = require('../lib/grizzly');

/**
 * grunt-grizzly
 */
module.exports = function(grunt) {
    'use strict';

    grunt.registerTask('grizzly', 'Run GoodData proxy server', function() {
        var util = grunt.util || grunt.utils;
        var _ = util._;

        // Default configuration options
        var defaults = {
            root: 'html',
            host: 'staging.getgooddata.com',
            port: 8443,
            cert: __dirname + '/../cert/server.crt',
            key: __dirname + '/../cert/server.key',
            keepAlive: false,
            quiet: false
        };

        // Options passed via command line
        var cliOptions = {
            root: grunt.option('root') || grunt.option('dir'),
            host: grunt.option('backend') || grunt.option('host'),
            port: grunt.option('port'),
            cert: grunt.option('cert'),
            key: grunt.option('key'),
            keepAlive: this.flags.keepAlive,
            quiet: this.flags.quiet
        };

        // Grunt configuration created via grunt.initConfig
        var configOptions = grunt.config('grizzly.options') || {};

        // Check aliases
        configOptions.host = configOptions.host || configOptions.backend;
        configOptions.root = configOptions.root || configOptions.dir;

        // Create options object
        // CLI options have higher priority over grunt configuration options
{'fraction_non_alphanumeric': 0.13208191126279864, 'fraction_numerical': 0.008191126279863481, 'mean_word_length': 2.018537590113285, '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': '2436225', 'n_tokens_mistral': 843, 'n_tokens_neox': 805, 'n_words': 203}