Skip to content

Commit

Permalink
Extracting generic code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Rodrigues committed Oct 19, 2012
1 parent cccbef2 commit 1bfd174
Show file tree
Hide file tree
Showing 6 changed files with 308 additions and 222 deletions.
11 changes: 3 additions & 8 deletions lib/cli/commands/githubdeployment.js
Expand Up @@ -44,8 +44,7 @@ exports.init = function(cli) {




function promptForGithubCredentials(_) { var __frame = { name: "promptForGithubCredentials", line: 48 }; return __func(_, this, arguments, promptForGithubCredentials, 0, __frame, function __$promptForGithubCredentials() {
function promptForGithubCredentials(_) { var __frame = { name: "promptForGithubCredentials", line: 47 }; return __func(_, this, arguments, promptForGithubCredentials, 0, __frame, function __$promptForGithubCredentials() {
log.help("Enter your github credentials"); return (function __$promptForGithubCredentials(__then) {

if (options.username) {
Expand All @@ -61,7 +60,7 @@ exports.init = function(cli) {


context.lvcClient = LinkedRevisionControl.createClient(cli, "github");
context.lvcClient.authenticate(context.username, context.password); _(); }); }); }); }; var __frame = { name: "__1", line: 33 }; return __func(_, this, arguments, __1, 2, __frame, function __$__1() { context = { subscription: cli.category("account").lookupSubscriptionId(options.subscription), site: { name: name } }; return scm.ensureRepositoryUri(context, __cb(_, __frame, 9, 6, function __$__1() { return promptForGithubCredentials(__cb(_, __frame, 10, 6, function __$__1() { return context.lvcClient.init(context, __cb(_, __frame, 11, 6, function __$__1() { console.log(context); return context.lvcClient.deploy(context, __cb(_, __frame, 13, 6, _, true)); }, true)); }, true)); }, true)); }); });
context.lvcClient.authenticate(context.username, context.password); _(); }); }); }); }; var __frame = { name: "__1", line: 33 }; return __func(_, this, arguments, __1, 2, __frame, function __$__1() { context = { subscription: cli.category("account").lookupSubscriptionId(options.subscription), site: { name: name } }; return scm.ensureRepositoryUri(context, __cb(_, __frame, 9, 6, function __$__1() { return promptForGithubCredentials(__cb(_, __frame, 10, 6, function __$__1() { return context.lvcClient.init(context, __cb(_, __frame, 11, 6, function __$__1() { return context.lvcClient.deploy(context, __cb(_, __frame, 12, 6, _, true)); }, true)); }, true)); }, true)); }); });



Expand All @@ -70,8 +69,4 @@ exports.init = function(cli) {


function promptPassword(label, callback) {
cli.passwordOnce(label, function(x) { callback(undefined, x); }); };


function choose(data, callback) {
cli.choose(data, function(x) { callback(undefined, x); }); };};
cli.passwordOnce(label, function(x) { callback(undefined, x); }); };};
5 changes: 0 additions & 5 deletions lib/cli/commands/githubdeployment_.js
Expand Up @@ -42,7 +42,6 @@ exports.init = function (cli) {
scm.ensureRepositoryUri(context, _);
promptForGithubCredentials(_);
context.lvcClient.init(context, _);
console.log(context);
context.lvcClient.deploy(context, _);

function promptForGithubCredentials(_) {
Expand Down Expand Up @@ -72,8 +71,4 @@ exports.init = function (cli) {
function promptPassword(label, callback) {
cli.passwordOnce(label, function (x) { callback(undefined, x); });
}

function choose(data, callback) {
cli.choose(data, function (x) { callback(undefined, x); });
}
};

0 comments on commit 1bfd174

Please sign in to comment.