<commit_before>// Copyright 2012 Joyent, Inc.  All rights reserved.

var path = require('path');
var restify = require('restify');


// --- Functions

function redirect(req, res, next) {
    res.set('Content-Length', 0);
    res.set('Connection', 'keep-alive');
    res.set('Date', new Date());
    res.header('Location', '/docs/public/index.html');
    res.set('Server', 'Cloud API');
    res.send(302);
    return next(false);
}


function mount(server) {
    server.get('/', redirect);
    server.get('/docs', redirect);
    server.get('/docs/public', redirect);
    /* BEGIN JSSTYLED */
    server.get(/\/docs\/public\/?.*/, restify.serveStatic({
        directory: './build'
    }));
    /* END JSSTYLED */
    return server;
}


// --- Exports

module.exports = {<commit_msg>PUBAPI-593: Fixed docs. Restify dislikes previous RegExp since recent upgrades<commit_after>// Copyright 2013 Joyent, Inc.  All rights reserved.

var path = require('path');
var restify = require('restify');


// --- Functions

function redirect(req, res, next) {
    res.set('Content-Length', 0);
    res.set('Connection', 'keep-alive');
    res.set('Date', new Date());
    res.header('Location', '/docs/public/index.html');
    res.set('Server', 'Cloud API');
    res.send(302);
    return next(false);
}


function mount(server) {
    server.get('/', redirect);
    server.get('/docs', redirect);
    server.get('/docs/public', redirect);
    /* BEGIN JSSTYLED */
    
    var d = path.resolve(__dirname, '..', './build/');
    server.get('/docs/public/index.html', restify.serveStatic({directory: d}));
    server.get('/docs/public/admin.html', restify.serveStatic({directory: d}));
    server.get('/docs/public/media/css/restdown.css', restify.serveStatic({
        directory: d
    }));
    server.get('/favicon.ico', restify.serveStatic({
        directory:
            path.resolve(__dirname, '..', './build/docs/public/media/img/')
    }));
    server.get('/docs/public/media/img/heatmap.png', restify.serveStatic({
        directory: d
    }));
    server.get('/docs/public/media/img/logo.png', restify.serveStatic({
        directory: d
    }));

    /* END JSSTYLED */
    return server;
}


// --- Exports

module.exports = {
{'fraction_non_alphanumeric': 0.19594594594594594, 'fraction_numerical': 0.008558558558558558, 'mean_word_length': 2.9660714285714285, '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': '3454735', 'n_tokens_mistral': 732, 'n_tokens_neox': 706, 'n_words': 140}