mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-17 08:07:51 +00:00
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:
|
mochaTest:
|
||||||
test:
|
test:
|
||||||
src: ['test/**/*.js']
|
src: ['test/**/*.js']
|
||||||
options:
|
|
||||||
timeout: 0
|
|
||||||
jshint:
|
jshint:
|
||||||
all: ['bin/embark', 'lib/**/*.js', 'js/mine.js', 'js/embark.js']
|
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 Pipeline = require('../pipeline/pipeline.js');
|
||||||
var Server = require('../pipeline/server.js');
|
var Server = require('../pipeline/server.js');
|
||||||
var Watch = require('../pipeline/watch.js');
|
var Watch = require('../pipeline/watch.js');
|
||||||
|
var version = require('../../package.json').version;
|
||||||
|
|
||||||
var Engine = function(options) {
|
var Engine = function(options) {
|
||||||
this.env = options.env;
|
this.env = options.env;
|
||||||
this.embarkConfig = options.embarkConfig;
|
this.embarkConfig = options.embarkConfig;
|
||||||
this.interceptLogs = options.interceptLogs;
|
this.interceptLogs = options.interceptLogs;
|
||||||
this.version = "2.4.0";
|
this.version = version;
|
||||||
};
|
};
|
||||||
|
|
||||||
Engine.prototype.init = function(_options) {
|
Engine.prototype.init = function(_options) {
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
var blessed = require("blessed");
|
var blessed = require("blessed");
|
||||||
var CommandHistory = require('./command_history.js');
|
var CommandHistory = require('./command_history.js');
|
||||||
|
var version = require('../../package.json').version;
|
||||||
|
|
||||||
function Dashboard(options) {
|
function Dashboard(options) {
|
||||||
var title = (options && options.title) || "Embark 2.4.0";
|
var title = (options && options.title) || "Embark " + version;
|
||||||
this.env = options.env;
|
this.env = options.env;
|
||||||
this.console = options.console;
|
this.console = options.console;
|
||||||
this.history = new CommandHistory();
|
this.history = new CommandHistory();
|
||||||
|
@ -22,10 +22,11 @@ var IPFS = require('./upload/ipfs.js');
|
|||||||
var Swarm = require('./upload/swarm.js');
|
var Swarm = require('./upload/swarm.js');
|
||||||
|
|
||||||
var Cmd = require('./cmd.js');
|
var Cmd = require('./cmd.js');
|
||||||
|
var version = require('../package.json').version;
|
||||||
|
|
||||||
var Embark = {
|
var Embark = {
|
||||||
|
|
||||||
version: '2.4.0',
|
version: version,
|
||||||
|
|
||||||
process: function(args) {
|
process: function(args) {
|
||||||
var cmd = new Cmd(Embark);
|
var cmd = new Cmd(Embark);
|
||||||
|
@ -5,7 +5,7 @@ var assert = require('assert');
|
|||||||
// TODO: instead 'eval' the code with a fake web3 object
|
// TODO: instead 'eval' the code with a fake web3 object
|
||||||
// and check the generate code interacts as expected
|
// and check the generate code interacts as expected
|
||||||
describe('embark.ABIGenerator', function() {
|
describe('embark.ABIGenerator', function() {
|
||||||
|
this.timeout(0);
|
||||||
describe('#generateProvider', function() {
|
describe('#generateProvider', function() {
|
||||||
var generator = new ABIGenerator({blockchainConfig: {rpcHost: 'somehost', rpcPort: '1234'}, contractsManager: {}});
|
var generator = new ABIGenerator({blockchainConfig: {rpcHost: 'somehost', rpcPort: '1234'}, contractsManager: {}});
|
||||||
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
var Console = require('../lib/dashboard/console.js');
|
var Console = require('../lib/dashboard/console.js');
|
||||||
var Plugins = require('../lib/core/plugins.js');
|
var Plugins = require('../lib/core/plugins.js');
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
|
var version = require('../package.json').version;
|
||||||
|
|
||||||
describe('embark.Console', function() {
|
describe('embark.Console', function() {
|
||||||
var plugins = new Plugins({plugins: {}});
|
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() {
|
describe('#executeCmd', function() {
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ describe('embark.Console', function() {
|
|||||||
it('it should provide a help text', function(done) {
|
it('it should provide a help text', function(done) {
|
||||||
console.executeCmd('help', function(output) {
|
console.executeCmd('help', function(output) {
|
||||||
var lines = output.split('\n');
|
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:');
|
assert.equal(lines[2], 'possible commands are:');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user