Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Applying code review comments

  • Loading branch information...
commit 7d084726268e9a76514e11dec60370fe3fca24b3 1 parent 7b4c442
@andrerod andrerod authored
View
67 lib/cli/commands/siteconfig.js
@@ -1,4 +1,4 @@
-/*** Generated by streamline 0.4.5 (callbacks) - DO NOT EDIT ***/ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename),__func=__rt.__func,__cb=__rt.__cb; var common = require("../common");
+/*** Generated by streamline 0.4.5 (callbacks) - DO NOT EDIT ***/ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename),__func=__rt.__func,__cb=__rt.__cb; var connectionStringParser = require("../../services/core/connectionstringparser");
@@ -14,18 +14,6 @@
-var fs = require("fs");
-var path = require("path");
-var url = require("url");
-var crypto = require("crypto");
-var pfx2pem = require("../../util/certificates/pkcs").pfx2pem;
-var Channel = require("../channel");
-var async = require("async");
-var utils = require("../utils");
-var constants = require("../constants");
-var cacheUtils = require("../cacheUtils");
-
-var connectionStringParser = require("../../services/core/connectionstringparser");
var linkedRevisionControl = require("../linkedrevisioncontrol");
exports.init = function(cli) {
@@ -35,41 +23,7 @@ exports.init = function(cli) {
var siteConfig = site.category("config").description("Commands to manage your site configurations");
- function getChannel() {
- var account = cli.category("account");
- var managementEndpoint = url.parse(utils.getManagementEndpointUrl(account.managementEndpointUrl()));
- var pem = account.managementCertificate();
- var host = managementEndpoint.hostname;
- var port = managementEndpoint.port;
-
- var channel = new Channel({
- host: host,
- port: port,
- key: pem.key,
- cert: pem.cert
- }).header("x-ms-version", "2011-02-25");
-
- var proxyString = (((process.env.HTTPS_PROXY || process.env.https_proxy) || process.env.ALL_PROXY) || process.env.all_proxy);
-
-
-
-
-
- if ((proxyString !== undefined)) {
- var proxyUrl = url.parse(proxyString);
- if (((proxyUrl.protocol !== "http:") && (proxyUrl.protocol !== "https:"))) {
-
-
- proxyUrl = url.parse(("http://" + proxyString)); } ;
-
-
- channel = channel.add({ proxy: proxyUrl }); } ;
-
-
- return channel; };
-
-
- siteConfig.command("list [name]").usage("[options] [name]").description("Show your site application settings").option("-s, --subscription <id>", "use the subscription id").execute(function __1(name, options, _) { var context, siteConfigurations; var __frame = { name: "__1", line: 76 }; return __func(_, this, arguments, __1, 2, __frame, function __$__1() {
+ siteConfig.command("list [name]").usage("[options] [name]").description("Show your site application settings").option("-s, --subscription <id>", "use the subscription id").execute(function __1(name, options, _) { var context, siteConfigurations; var __frame = { name: "__1", line: 30 }; return __func(_, this, arguments, __1, 2, __frame, function __$__1() {
@@ -96,7 +50,7 @@ exports.init = function(cli) {
- siteConfig.command("add <keyvaluepair> [name]").usage("[options] <keyvaluepair> [name]").description("Adds an application setting for your site").option("-s, --subscription <id>", "use the subscription id").execute(function __2(keyvaluepair, name, options, _) { var context, settings, siteConfigurations, setting; var __frame = { name: "__2", line: 103 }; return __func(_, this, arguments, __2, 3, __frame, function __$__2() {
+ siteConfig.command("add <keyvaluepair> [name]").usage("[options] <keyvaluepair> [name]").description("Adds an application setting for your site").option("-s, --subscription <id>", "use the subscription id").execute(function __2(keyvaluepair, name, options, _) { var context, settings, siteConfigurations, setting; var __frame = { name: "__2", line: 57 }; return __func(_, this, arguments, __2, 3, __frame, function __$__2() {
@@ -137,7 +91,7 @@ exports.init = function(cli) {
return site.doSiteConfigPUT(siteConfigurations, context, __cb(_, __frame, 34, 6, _, true)); }, true)); }, true)); }); });
- siteConfig.command("clear <key> [name]").usage("[options] <key> [name]").description("Clears an application setting for your site").option("-s, --subscription <id>", "use the subscription id").execute(function __3(key, name, options, _) { var context, siteConfigurations, found, i; var __frame = { name: "__3", line: 144 }; return __func(_, this, arguments, __3, 3, __frame, function __$__3() {
+ siteConfig.command("clear <key> [name]").usage("[options] <key> [name]").description("Clears an application setting for your site").option("-s, --subscription <id>", "use the subscription id").execute(function __3(key, name, options, _) { var context, siteConfigurations, found, i; var __frame = { name: "__3", line: 98 }; return __func(_, this, arguments, __3, 3, __frame, function __$__3() {
@@ -179,7 +133,7 @@ exports.init = function(cli) {
- siteConfig.command("get <key> [name]").usage("[options] <key> [name]").description("Gets an application setting for your site").option("-s, --subscription <id>", "use the subscription id").execute(function __4(key, name, options, _) { var context, siteConfigurations, found, i; var __frame = { name: "__4", line: 186 }; return __func(_, this, arguments, __4, 3, __frame, function __$__4() {
+ siteConfig.command("get <key> [name]").usage("[options] <key> [name]").description("Gets an application setting for your site").option("-s, --subscription <id>", "use the subscription id").execute(function __4(key, name, options, _) { var context, siteConfigurations, found, i; var __frame = { name: "__4", line: 140 }; return __func(_, this, arguments, __4, 3, __frame, function __$__4() {
@@ -213,11 +167,10 @@ exports.init = function(cli) {
function getSettings(appSettings) {
- var settings = appSettings;
- if (!settings.NameValuePair) {
- settings.NameValuePair = []; }
- else if (settings.NameValuePair.Name) {
- settings.NameValuePair = [settings.NameValuePair,]; } ;
+ if (!appSettings.NameValuePair) {
+ appSettings.NameValuePair = []; }
+ else if (appSettings.NameValuePair.Name) {
+ appSettings.NameValuePair = [appSettings.NameValuePair,]; } ;
- return settings; };};
+ return appSettings; };};
View
11 lib/cli/commands/siteconfig_.js
@@ -167,13 +167,12 @@ exports.init = function (cli) {
});
function getSettings(appSettings) {
- var settings = appSettings;
- if (!settings.NameValuePair) {
- settings.NameValuePair = [ ];
- } else if (settings.NameValuePair.Name) {
- settings.NameValuePair = [ settings.NameValuePair ];
+ if (!appSettings.NameValuePair) {
+ appSettings.NameValuePair = [ ];
+ } else if (appSettings.NameValuePair.Name) {
+ appSettings.NameValuePair = [ appSettings.NameValuePair ];
}
- return settings;
+ return appSettings;
};
};
View
2  test/cli/commands/cli.siteconfig-tests.js
@@ -26,7 +26,7 @@ suite('cli', function(){
var removeSites = function (sites, cb) {
if (sites.length === 0) {
- siteNames++;
+ currentSiteName++;
cb();
} else {
var siteName = sites.pop();
Please sign in to comment.
Something went wrong with that request. Please try again.