Skip to content

Commit 3ba8c55

Browse files
committed
Merge branch 'develop'
2 parents 94acaaf + 215a823 commit 3ba8c55

File tree

16 files changed

+157
-176
lines changed

16 files changed

+157
-176
lines changed

.codeclimate.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
engines:
2+
eslint:
3+
enabled: true
4+
checks:
5+
no-eval:
6+
enabled: false
7+
no-process-exit:
8+
enabled: false
9+
global-require:
10+
enabled: false
11+
ratings:
12+
paths:
13+
- "lib/**/*"
14+
exclude_paths:
15+
- "tests/"
16+
- "old_test/"
17+
- "boilerplate/"
18+
- "demo/"
19+
- "js/"

.nycrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"reporter": [
3+
"lcov",
4+
"text-summary"
5+
],
6+
"include": [
7+
"lib/**/*.js"
8+
]
9+
}

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ node_js:
33
- "6"
44
- "5"
55
- "4"
6+
addons:
7+
code_climate:
8+
repo_token: 7454b1a666015e244c384d19f48c34e35d1ae58c3aa428ec542f10bbcb848358

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[![Join the chat at https://gitter.im/iurimatias/embark-framework](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/iurimatias/embark-framework?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
33
[![Build
44
Status](https://travis-ci.org/iurimatias/embark-framework.svg?branch=develop)](https://travis-ci.org/iurimatias/embark-framework)
5+
[![Code Climate](https://codeclimate.com/github/iurimatias/embark-framework/badges/gpa.svg)](https://codeclimate.com/github/iurimatias/embark-framework)
56

67
What is Embark
78
======
@@ -23,6 +24,7 @@ Table of Contents
2324
* [Usage Demo](#usage---demo)
2425
* [Dashboard](#dashboard)
2526
* [Creating a new DApp](#creating-a-new-dapp)
27+
* [Libraries and APIs available](#libraries-and-languages-available)
2628
* [Using and Configuring Contracts](#dapp-structure)
2729
* [EmbarkJS](#embarkjs)
2830
* [EmbarkJS - Storage (IPFS)](#embarkjs---storage)
@@ -75,7 +77,7 @@ Alternatively, to use an ethereum rpc simulator simply run:
7577
$ embark simulator
7678
```
7779

78-
By default embark blockchain will mine a minimum amount of ether and will only mine when new transactions come in. This is quite usefull to keep a low CPU. The option can be configured at config/blockchain.json
80+
By default embark blockchain will mine a minimum amount of ether and will only mine when new transactions come in. This is quite usefull to keep a low CPU. The option can be configured at ```config/blockchain.json```. Note that running a real node requires at least 2GB of free ram, please take this into account if running it in a VM.
7981

8082
Then, in another command line:
8183

@@ -131,6 +133,16 @@ DApp Structure
131133

132134
Solidity/Serpent files in the contracts directory will automatically be deployed with embark run. Changes in any files will automatically be reflected in app, changes to contracts will result in a redeployment and update of their JS Bindings
133135

136+
Libraries and languages available
137+
======
138+
139+
Embark can build and deploy contracts coded in Solidity or Serpent. It will make them available on the client side using EmbarkJS and Web3.js.
140+
141+
Further documentation for these can be found below:
142+
143+
* Smart Contracts: [Solidity](https://solidity.readthedocs.io/en/develop/) and [Serpent](https://github.com/ethereum/wiki/wiki/Serpent)
144+
* Client Side: [Web3.js](https://github.com/ethereum/wiki/wiki/JavaScript-API) and [EmbarkJS](#embarkjs)
145+
134146
Using Contracts
135147
======
136148
Embark will automatically take care of deployment for you and set all needed JS bindings. For example, the contract below:
File renamed without changes.

boilerplate/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"license": "ISC",
1111
"homepage": "",
1212
"devDependencies": {
13-
"embark": "^2.0.1",
13+
"embark": "^2.1.2",
1414
"mocha": "^2.2.5"
1515
}
1616
}

demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"license": "ISC",
1111
"homepage": "",
1212
"devDependencies": {
13-
"embark": "^2.0.1",
13+
"embark": "^2.1.2",
1414
"mocha": "^2.2.5"
1515
}
1616
}

js/build/embark.bundle.js

Lines changed: 5 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ var EmbarkJS =
7676
var self = this;
7777
var contractParams;
7878

79-
contractParams = args;
79+
contractParams = args || [];
8080

8181
contractParams.push({
8282
from: this.web3.eth.accounts[0],
@@ -5907,83 +5907,14 @@ var EmbarkJS =
59075907
/***/ function(module, exports) {
59085908

59095909
// shim for using process in browser
5910-
var process = module.exports = {};
5911-
5912-
// cached from whatever global is present so that test runners that stub it
5913-
// don't break things. But we need to wrap it in a try catch in case it is
5914-
// wrapped in strict mode code which doesn't define any globals. It's inside a
5915-
// function because try/catches deoptimize in certain engines.
59165910

5917-
var cachedSetTimeout;
5918-
var cachedClearTimeout;
5919-
5920-
(function () {
5921-
try {
5922-
cachedSetTimeout = setTimeout;
5923-
} catch (e) {
5924-
cachedSetTimeout = function () {
5925-
throw new Error('setTimeout is not defined');
5926-
}
5927-
}
5928-
try {
5929-
cachedClearTimeout = clearTimeout;
5930-
} catch (e) {
5931-
cachedClearTimeout = function () {
5932-
throw new Error('clearTimeout is not defined');
5933-
}
5934-
}
5935-
} ())
5936-
function runTimeout(fun) {
5937-
if (cachedSetTimeout === setTimeout) {
5938-
//normal enviroments in sane situations
5939-
return setTimeout(fun, 0);
5940-
}
5941-
try {
5942-
// when when somebody has screwed with setTimeout but no I.E. maddness
5943-
return cachedSetTimeout(fun, 0);
5944-
} catch(e){
5945-
try {
5946-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
5947-
return cachedSetTimeout.call(null, fun, 0);
5948-
} catch(e){
5949-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
5950-
return cachedSetTimeout.call(this, fun, 0);
5951-
}
5952-
}
5953-
5954-
5955-
}
5956-
function runClearTimeout(marker) {
5957-
if (cachedClearTimeout === clearTimeout) {
5958-
//normal enviroments in sane situations
5959-
return clearTimeout(marker);
5960-
}
5961-
try {
5962-
// when when somebody has screwed with setTimeout but no I.E. maddness
5963-
return cachedClearTimeout(marker);
5964-
} catch (e){
5965-
try {
5966-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
5967-
return cachedClearTimeout.call(null, marker);
5968-
} catch (e){
5969-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
5970-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
5971-
return cachedClearTimeout.call(this, marker);
5972-
}
5973-
}
5974-
5975-
5976-
5977-
}
5911+
var process = module.exports = {};
59785912
var queue = [];
59795913
var draining = false;
59805914
var currentQueue;
59815915
var queueIndex = -1;
59825916

59835917
function cleanUpNextTick() {
5984-
if (!draining || !currentQueue) {
5985-
return;
5986-
}
59875918
draining = false;
59885919
if (currentQueue.length) {
59895920
queue = currentQueue.concat(queue);
@@ -5999,7 +5930,7 @@ var EmbarkJS =
59995930
if (draining) {
60005931
return;
60015932
}
6002-
var timeout = runTimeout(cleanUpNextTick);
5933+
var timeout = setTimeout(cleanUpNextTick);
60035934
draining = true;
60045935

60055936
var len = queue.length;
@@ -6016,7 +5947,7 @@ var EmbarkJS =
60165947
}
60175948
currentQueue = null;
60185949
draining = false;
6019-
runClearTimeout(timeout);
5950+
clearTimeout(timeout);
60205951
}
60215952

60225953
process.nextTick = function (fun) {
@@ -6028,7 +5959,7 @@ var EmbarkJS =
60285959
}
60295960
queue.push(new Item(fun, args));
60305961
if (queue.length === 1 && !draining) {
6031-
runTimeout(drainQueue);
5962+
setTimeout(drainQueue, 0);
60325963
}
60335964
};
60345965

js/embark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ EmbarkJS.Contract.prototype.deploy = function(args) {
2929
var self = this;
3030
var contractParams;
3131

32-
contractParams = args;
32+
contractParams = args || [];
3333

3434
contractParams.push({
3535
from: this.web3.eth.accounts[0],

lib/cmd.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var colors = require('colors');
33

44
var Cmd = function(Embark) {
55
this.Embark = Embark;
6-
program.version('2.0.1');
6+
program.version('2.1.2');
77
};
88

99
Cmd.prototype.process = function(args) {
@@ -62,12 +62,13 @@ Cmd.prototype.run = function() {
6262
var self = this;
6363
program
6464
.command('run [environment]')
65+
.option('-p, --port [port]', 'port to run the dev webserver')
6566
.description('run dapp (default: development)')
6667
.action(function(env, options) {
6768
self.Embark.initConfig(env || 'development', {
6869
embarkConfig: 'embark.json'
6970
});
70-
self.Embark.run(env || 'development');
71+
self.Embark.run({env: env || 'development', serverPort: options.port});
7172
});
7273
};
7374

0 commit comments

Comments
 (0)