Sha256: 98126ecd27ffc28c7ef427a565900a6a56fa7fa6688b1db728a673e2701b41dc

Contents?: true

Size: 931 Bytes

Versions: 62

Compression:

Stored size: 931 Bytes

Contents

/**
 *  class <%name%>
 *
 *  <%description%>
 *
 *  Copyright 2012 Cloud9 IDE, Inc.
 *
 *  This product includes software developed by
 *  Cloud9 IDE, Inc (http://c9.io).
 *
 *  Author: Mike de Boer <info@mikedeboer.nl>
 **/

"use strict";

var Fs = require("fs");
var Util = require("./../../util");
var error = require("./../../error");

var GithubHandler = module.exports = function(client) {
    this.client = client;
    this.routes = JSON.parse(Fs.readFileSync(__dirname + "/routes.json", "utf8"));
};

var proto = {
    sendError: function(err, block, msg, callback) {
        if (this.client.debug)
            Util.log(err, block, msg.user, "error");
        if (typeof err == "string")
            err = new error.InternalServerError(err);
        if (callback)
            callback(err);
    }
};

[<%scripts%>].forEach(function(api) {
    Util.extend(proto, require("./" + api));
});

GithubHandler.prototype = proto;

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.6 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.18 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.17 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.16 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.15 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.14 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.13 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.12 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.11 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.10 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.9 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.8 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.7 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.6 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.5 node_modules/bower/node_modules/github/templates/index.js.tpl
trusty-festivity-extension-2.5.4 node_modules/bower/node_modules/github/templates/index.js.tpl