mirror of https://github.com/embarklabs/embark.git
Merge pull request #232 from toadkicker/one_version
read version in from package.json instead of strings
This commit is contained in:
commit
a9797f85d2
|
@ -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']
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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: {}});
|
||||
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue