diff --git a/Gruntfile.coffee b/Gruntfile.coffee index b3eb1166a..f645af422 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -21,8 +21,7 @@ module.exports = (grunt) -> mochaTest: test: src: ['test/**/*.js'] - options: - timeout: 0 + jshint: all: ['bin/embark', 'lib/**/*.js', 'js/mine.js', 'js/embark.js'] diff --git a/lib/core/engine.js b/lib/core/engine.js index 872d8fc7a..ad248a7c6 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -9,12 +9,13 @@ var ServicesMonitor = require('./services.js'); var Pipeline = require('../pipeline/pipeline.js'); var Server = require('../pipeline/server.js'); var Watch = require('../pipeline/watch.js'); +var version = require('../../package.json').version; var Engine = function(options) { this.env = options.env; this.embarkConfig = options.embarkConfig; this.interceptLogs = options.interceptLogs; - this.version = "2.4.0"; + this.version = version; }; Engine.prototype.init = function(_options) { diff --git a/lib/dashboard/monitor.js b/lib/dashboard/monitor.js index 5468128ba..210fa7cec 100644 --- a/lib/dashboard/monitor.js +++ b/lib/dashboard/monitor.js @@ -2,9 +2,10 @@ var blessed = require("blessed"); var CommandHistory = require('./command_history.js'); +var version = require('../../package.json').version; function Dashboard(options) { - var title = (options && options.title) || "Embark 2.4.0"; + var title = (options && options.title) || "Embark " + version; this.env = options.env; this.console = options.console; this.history = new CommandHistory(); diff --git a/lib/index.js b/lib/index.js index 97877acb5..6b358d23b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -22,10 +22,11 @@ var IPFS = require('./upload/ipfs.js'); var Swarm = require('./upload/swarm.js'); var Cmd = require('./cmd.js'); +var version = require('../package.json').version; var Embark = { - version: '2.4.0', + version: version, process: function(args) { var cmd = new Cmd(Embark); diff --git a/test/abi.js b/test/abi.js index 4d2533ba3..e54798b2f 100644 --- a/test/abi.js +++ b/test/abi.js @@ -5,7 +5,7 @@ var assert = require('assert'); // TODO: instead 'eval' the code with a fake web3 object // and check the generate code interacts as expected describe('embark.ABIGenerator', function() { - + this.timeout(0); describe('#generateProvider', function() { var generator = new ABIGenerator({blockchainConfig: {rpcHost: 'somehost', rpcPort: '1234'}, contractsManager: {}}); diff --git a/test/console.js b/test/console.js index a1d987e12..a0f9d6e29 100644 --- a/test/console.js +++ b/test/console.js @@ -2,10 +2,11 @@ var Console = require('../lib/dashboard/console.js'); var Plugins = require('../lib/core/plugins.js'); var assert = require('assert'); +var version = require('../package.json').version; describe('embark.Console', function() { var plugins = new Plugins({plugins: {}}); - var console = new Console({plugins: plugins, version: '2.3.1'}); + var console = new Console({plugins: plugins, version: version}); describe('#executeCmd', function() { @@ -14,7 +15,7 @@ describe('embark.Console', function() { it('it should provide a help text', function(done) { console.executeCmd('help', function(output) { var lines = output.split('\n'); - assert.equal(lines[0], 'Welcome to Embark 2.3.1'); + assert.equal(lines[0], 'Welcome to Embark ' + version); assert.equal(lines[2], 'possible commands are:'); done(); });