From db5b5eb2debd69ea1b79b82e87bd81222fbe4d41 Mon Sep 17 00:00:00 2001 From: roo2 Date: Sat, 25 Feb 2017 14:25:33 +1000 Subject: [PATCH 1/4] expose ethereumjs-testrpc to projects that install embark --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 06833395b..6c57603a6 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "merge": "^1.2.0", "serve-static": "^1.11.1", "shelljs": "^0.5.0", + "ethereumjs-testrpc": "^3.0.3", "solc": "0.4.8", "toposort": "^1.0.0", "web3": "^0.18.2" From 5fa32754fb64dc46bc33a5cb4942281d1c44381d Mon Sep 17 00:00:00 2001 From: roo2 Date: Tue, 21 Mar 2017 17:33:49 +1000 Subject: [PATCH 2/4] show error message if unable to deploy contracts due to web3 client being unavailable --- lib/index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/index.js b/lib/index.js index 7037f2246..015768c85 100644 --- a/lib/index.js +++ b/lib/index.js @@ -104,7 +104,7 @@ var Embark = (function () { }); }); - engine.deployManager.deployContracts(function() { + engine.deployManager.deployContracts(function(err) { engine.startService("fileWatcher"); if (options.runWebserver) { engine.startService("webServer", { @@ -112,12 +112,13 @@ var Embark = (function () { port: options.serverPort }); } - callback(); + callback(err); }); } ], function(err, result) { if (err) { engine.logger.error(err.message); + engine.logger.info(err.stack); } else { engine.logger.setStatus("Ready".green); engine.logger.info("Looking for documentation? you can find it at ".cyan + "http://embark.readthedocs.io/".green.underline); @@ -149,13 +150,14 @@ var Embark = (function () { callback(); }, function deploy(callback) { - engine.deployManager.deployContracts(function() { - callback(); + engine.deployManager.deployContracts(function(err) { + callback(err); }); } ], function(err, result) { if (err) { engine.logger.error(err.message); + engine.logger.debug(err.stack) } else { engine.logger.info("finished building".underline); } @@ -198,4 +200,3 @@ var Embark = (function () { })(); module.exports = Embark; - From 2a3929015832dbce0c6d969c20af8c1facd04b8a Mon Sep 17 00:00:00 2001 From: roo2 Date: Tue, 21 Mar 2017 18:22:16 +1000 Subject: [PATCH 3/4] start the web3 service for the build task so that contracts can be deployed --- lib/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 015768c85..076abf81d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -143,7 +143,8 @@ var Embark = (function () { if (pluginList.length > 0) { engine.logger.info("loaded plugins: " + pluginList.join(", ")); } - + + engine.startService("web3"); engine.startService("pipeline"); engine.startService("abi"); engine.startService("deployment"); From 3637b2e06ecfaeedb8d71c656c124c1a3528ed29 Mon Sep 17 00:00:00 2001 From: roo2 Date: Tue, 21 Mar 2017 18:55:15 +1000 Subject: [PATCH 4/4] update the initTests method of embark to reflect the new structure of test.js --- lib/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index 076abf81d..96bc18baa 100644 --- a/lib/index.js +++ b/lib/index.js @@ -167,9 +167,8 @@ var Embark = (function () { }); } - function initTests (options) { - var Test = require('./core/test.js'); - return new Test(options); + function initTests () { + return require('./core/test.js'); } // TODO: should deploy if it hasn't already