From cb5bb69b4735ef6f55be727eef834c4cd415bc97 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 11 Mar 2015 09:03:13 -0400 Subject: [PATCH] Get rid of gitCli in favor of gitwrap --- build/actions/examples.js | 13 ++++++++----- lib/actions/examples.coffee | 10 +++++++--- package.json | 1 - 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/build/actions/examples.js b/build/actions/examples.js index 3eab4a1f..1b4916aa 100644 --- a/build/actions/examples.js +++ b/build/actions/examples.js @@ -1,5 +1,5 @@ (function() { - var _, async, examplesData, fs, gitCli, path, resin, visuals; + var _, async, examplesData, fs, gitwrap, path, resin, visuals; async = require('async'); @@ -9,12 +9,12 @@ _ = require('lodash'); - gitCli = require('git-cli'); - resin = require('resin-sdk'); visuals = require('resin-cli-visuals'); + gitwrap = require('gitwrap'); + examplesData = require('../data/examples.json'); exports.list = { @@ -82,8 +82,11 @@ return callback(error); }); }, function(callback) { - console.info("Cloning " + example.display_name + " to " + example.name); - return gitCli.Repository.clone(example.repository, example.name, callback); + var currentDirectory, git; + currentDirectory = process.cwd(); + console.info("Cloning " + example.display_name + " to " + currentDirectory); + git = gitwrap.create(currentDirectory); + return git.execute("clone " + example.repository, callback); } ], done); } diff --git a/lib/actions/examples.coffee b/lib/actions/examples.coffee index 4be07db8..f1a0a241 100644 --- a/lib/actions/examples.coffee +++ b/lib/actions/examples.coffee @@ -2,9 +2,9 @@ async = require('async') fs = require('fs') path = require('path') _ = require('lodash') -gitCli = require('git-cli') resin = require('resin-sdk') visuals = require('resin-cli-visuals') +gitwrap = require('gitwrap') examplesData = require('../data/examples.json') exports.list = @@ -96,7 +96,11 @@ exports.clone = return callback(error) (callback) -> - console.info("Cloning #{example.display_name} to #{example.name}") - gitCli.Repository.clone(example.repository, example.name, callback) + currentDirectory = process.cwd() + + console.info("Cloning #{example.display_name} to #{currentDirectory}") + + git = gitwrap.create(currentDirectory) + git.execute("clone #{example.repository}", callback) ], done diff --git a/package.json b/package.json index e61e7292..2ba8787c 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,6 @@ "conf.js": "^0.1.1", "diskio": "^1.0.0", "drivelist": "^1.2.1", - "git-cli": "~0.8.2", "gitwrap": "^1.1.0", "lodash": "~2.4.1", "lodash-contrib": "~241.4.14",