minor changes

This commit is contained in:
coderaiser 2012-12-05 10:56:57 -05:00
parent b2eacd2b59
commit 39c0405850
8 changed files with 223 additions and 212 deletions

View file

@ -9,7 +9,7 @@ var CloudCommander, Util, DOM, $, Github, cb;
APIURL = '/api/v1',
AuthURL = APIURL + '/auth',
GitHubIdURL = APIURL + '/github_id';
GitHubIdURL = APIURL + '/github_key';
var GitHub_ID,
GithubLocal,

View file

@ -9,7 +9,8 @@
'# Module is part of Cloud Commander,' + '\n' +
'# used for work with Aplication Cache.' + '\n' +
'# If you wont to see at work set appcache: true' + '\n' +
'# in config.json and start cloudcmd.js' + '\n');
'# in config.json and start cloudcmd.js' + '\n' +
'# http://github.com/coderaiser/cloudcmd' + '\n');
var main = global.cloudcmd.main,
fs = main.fs,

View file

@ -11,7 +11,8 @@
'# If you wont to see at work set auth' + '\n' +
'# parameters in config.json or environment' + '\n' +
'# and start cloudcmd.js or just do' + '\n' +
'# require(\'auth.js\').auth(pCode, pCallBack)' + '\n');
'# require(\'auth.js\').auth(pCode, pCallBack)' + '\n' +
'# http://github.com/coderaiser/cloudcmd' + '\n');
var main = global.cloudcmd.main,

View file

@ -3,6 +3,16 @@
(function(){
"use strict";
if(!global.cloudcmd)
return console.log(
'# rest.js' + '\n' +
'# -----------' + '\n' +
'# Module is part of Cloud Commander,' + '\n' +
'# used for work with REST API.' + '\n' +
'# If you wont to see at work set rest: true' + '\n' +
'# and api_url in config.json' + '\n' +
'# http://github.com/coderaiser/cloudcmd' + '\n');
var main = global.cloudcmd.main,
Util = main.util,
Config = main.config,
@ -98,26 +108,26 @@
lCmd = pParams.command,
lConfig = main.config,
lEnv = process.env,
lEnvId,
lConfigId;
lEnvKey,
lConfigKey;
switch(lCmd){
case '':
lResult = {info: 'Cloud Commander API v1'};
break;
case 'github_id':
lEnvId = lEnv.github_id;
lConfigId = lConfig.github_id,
case 'github_key':
lEnvKey = lEnv.github_key;
lConfigKey = lConfig.github_key,
lResult = lEnvId || lConfigId;
lResult = lEnvKey || lConfigKey;
break;
case 'dropbox_chooser_id':
lEnvId = lEnv.dropbox_chooser_id;
lConfigId = lConfig.dropbox_chooser_id;
case 'dropbox_chooser_key':
lEnvKey = lEnv.dropbox_chooser_key;
lConfigKey = lConfig.dropbox_chooser_key;
lResult = lEnvId || lConfigId;
lResult = lEnvKey || lConfigKey;
break;
case 'kill':