Merge pull request #232 from toadkicker/one_version

read version in from package.json instead of strings
This commit is contained in:
Iuri Matias 2017-03-08 10:04:20 -05:00 committed by GitHub
commit a9797f85d2
6 changed files with 11 additions and 8 deletions

View File

@ -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']

View File

@ -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) {

View File

@ -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();

View File

@ -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);

View File

@ -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: {}});

View File

@ -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();
});