Update for CircleCI

- circle.yml - use node 6
- Fix eslint errors
- Update coveralls and add path to babel
This commit is contained in:
Elliot Lee
2017-09-25 13:55:55 -07:00
parent a9e5ac6290
commit ab17b19ff0
4 changed files with 5 additions and 6 deletions

View File

@@ -1,11 +1,10 @@
machine: machine:
node: node:
version: 0.12.0 version: 6.11.3
hosts: hosts:
testripple.circleci.com: 127.0.0.1 testripple.circleci.com: 127.0.0.1
dependencies: dependencies:
pre: pre:
- npm -g install npm@latest-2
- wget https://s3-us-west-2.amazonaws.com/ripple-debs/rippled_0.30.1-b11-1.deb - wget https://s3-us-west-2.amazonaws.com/ripple-debs/rippled_0.30.1-b11-1.deb
- sudo dpkg -i rippled_0.30.1-b11-1.deb - sudo dpkg -i rippled_0.30.1-b11-1.deb
test: test:

View File

@@ -39,7 +39,7 @@
"babel-preset-es2015": "^6.3.13", "babel-preset-es2015": "^6.3.13",
"babel-preset-stage-1": "^6.3.13", "babel-preset-stage-1": "^6.3.13",
"babel-register": "^6.3.13", "babel-register": "^6.3.13",
"coveralls": "^2.11.9", "coveralls": "^2.13.1",
"doctoc": "^0.15.0", "doctoc": "^0.15.0",
"ejs": "^2.3.4", "ejs": "^2.3.4",
"eslint": "^2.9.0", "eslint": "^2.9.0",

View File

@@ -29,7 +29,7 @@ unittest() {
npm run coveralls npm run coveralls
# test compiled version in "dist/npm" # test compiled version in "dist/npm"
babel -D --optional runtime --ignore "**/node_modules/**" -d test-compiled/ test/ $(npm bin)/babel -D --optional runtime --ignore "**/node_modules/**" -d test-compiled/ test/
echo "--reporter spec --timeout 5000 --slow 500" > test-compiled/mocha.opts echo "--reporter spec --timeout 5000 --slow 500" > test-compiled/mocha.opts
mkdir -p test-compiled/node_modules mkdir -p test-compiled/node_modules
ln -nfs ../../dist/npm test-compiled/node_modules/ripple-api ln -nfs ../../dist/npm test-compiled/node_modules/ripple-api

View File

@@ -27,7 +27,7 @@ function setCanonicalFlag(txJSON) {
txJSON.Flags = txJSON.Flags >>> 0 txJSON.Flags = txJSON.Flags >>> 0
} }
function scaleValue(value, multiplier, extra=0) { function scaleValue(value, multiplier, extra = 0) {
return (new BigNumber(value)).times(multiplier).plus(extra).toString() return (new BigNumber(value)).times(multiplier).plus(extra).toString()
} }
@@ -73,7 +73,7 @@ function prepareTransaction(txJSON: Object, api: Object,
if (instructions.maxFee !== undefined) { if (instructions.maxFee !== undefined) {
const maxFeeDrops = common.xrpToDrops(instructions.maxFee) const maxFeeDrops = common.xrpToDrops(instructions.maxFee)
const normalFee = scaleValue(feeDrops, multiplier, extraFee) const normalFee = scaleValue(feeDrops, multiplier, extraFee)
txJSON.Fee = BigNumber.min(normalFee, maxFeeDrops).toString(); txJSON.Fee = BigNumber.min(normalFee, maxFeeDrops).toString()
} else { } else {
txJSON.Fee = scaleValue(feeDrops, multiplier, extraFee) txJSON.Fee = scaleValue(feeDrops, multiplier, extraFee)
} }