diff --git a/lib/server/binom.js b/lib/server/binom.js deleted file mode 100644 index 88145d21..00000000 --- a/lib/server/binom.js +++ /dev/null @@ -1,37 +0,0 @@ -(function() { - 'use strict'; - - module.exports = binom; - - function binom(name, array) { - var ret; - - if (!Array.isArray(array)) - throw Error('array should be array!'); - - if (typeof name !== 'string') - throw Error('name should be string!'); - - array.some(function(item) { - var is = item.name === name, - isArray = Array.isArray(item); - - if (is) - ret = item; - else if (isArray) - item.some(function(item) { - is = item.name === name; - - if (is) - ret = item.data; - - return is; - }); - - return is; - }); - - return ret; - } - -})(); diff --git a/lib/server/rest.js b/lib/server/rest.js index 8ec765dd..23695135 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -3,18 +3,15 @@ var DIR = './', DIR_LIB = DIR + '../', - DIR_JSON = DIR_LIB + '../json/', path = require('path'), root = require(DIR + 'root'), config = require(DIR + 'config'), - binom = require(DIR + 'binom'), CloudFunc = require(DIR_LIB + 'cloudfunc'), markdown = require(DIR + 'markdown'), - github = require('faust'), jaguar = require('jaguar'), flop = require('flop'), @@ -25,8 +22,6 @@ json = require('jonny'), check = require('checkup'), - Modules = require(DIR_JSON + 'modules'), - isWin32 = process.platform === 'win32'; /** @@ -158,19 +153,6 @@ operation('pack', dir, response, names, fn); } - function auth(code, callback) { - var storage = binom('storage', Modules), - gh = binom('GitHub', storage), - env = process.env, - - key = env.github_key || gh.key, - secret = env.github_secret || gh.secret, - - ghAuth = github(key, secret); - - ghAuth(code, callback); - } - /** * process data on PUT request * @@ -192,14 +174,6 @@ files = json.parse(body); switch(cmd) { - case 'auth': - auth(body, function(error, token) { - callback(error, json.stringify({ - data: token - })); - }); - break; - case 'mv': if (!files.from || !files.to) { callback(body); diff --git a/package.json b/package.json index c5a5c0e0..9a4e35de 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,6 @@ "edward": "^3.0.0", "execon": "^1.2.0", "express": "^4.13.0", - "faust": "^1.0.0", "files-io": "^1.2.0", "flop": "^1.4.0", "format-io": "^0.9.6",