From 8e831f510f3babc547b676c999f2407765f56dc0 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 8 Jul 2018 12:23:36 +0300 Subject: [PATCH] update to embark 3.1 --- contracts.js | 16 ++++++++++++++++ contracts.json | 16 ---------------- embark.json | 2 +- package.json | 2 +- test/BrainFuck.js | 12 ++++++++---- test/HexDecoder.js | 12 ++++++++---- test/IndexOf.js | 12 ++++++++---- test/Sort.js | 12 ++++++++---- test/Unique.js | 12 ++++++++---- 9 files changed, 58 insertions(+), 38 deletions(-) create mode 100644 contracts.js delete mode 100644 contracts.json diff --git a/contracts.js b/contracts.js new file mode 100644 index 0000000..15b16f4 --- /dev/null +++ b/contracts.js @@ -0,0 +1,16 @@ +module.exports = { + default: { + deployment: { + host: "localhost", + port: 8545, + type: "rpc" + }, + dappConnection: [ + "$WEB3", + "http://localhost:8545" + ], + gas: "auto", + contracts: { + } + } +}; diff --git a/contracts.json b/contracts.json deleted file mode 100644 index 3c37067..0000000 --- a/contracts.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "default": { - "deployment": { - "host": "localhost", - "port": 8545, - "type": "rpc" - }, - "dappConnection": [ - "$WEB3", - "http://localhost:8545" - ], - "gas": "auto", - "contracts": { - } - } -} diff --git a/embark.json b/embark.json index 245a5b2..3d97797 100644 --- a/embark.json +++ b/embark.json @@ -3,7 +3,7 @@ "app": {}, "buildDir": "build/", "config": { - "contracts": "contracts.json", + "contracts": "contracts.js", "blockchain": false, "storage": false, "communication": false, diff --git a/package.json b/package.json index 20e6f14..2740f84 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,6 @@ "homepage": "", "requires": true, "devDependencies": { - "embark": "^3.0.6" + "embark": "^3.1.5" } } diff --git a/test/BrainFuck.js b/test/BrainFuck.js index 14f729d..c87de5e 100644 --- a/test/BrainFuck.js +++ b/test/BrainFuck.js @@ -6,12 +6,16 @@ */ var testdata = require('../data/BrainFuck.json'); +const BrainFuck = require('Embark/contracts/BrainFuck'); -describe("BrainFuck", function() { +config({ + contracts: { + BrainFuck: {} + } +}); + +contract("BrainFuck", function() { this.timeout(0); - before(function(done) { - EmbarkSpec.deployAll({"BrainFuck": {}}, () => { done() }); - }); testdata.vectors.forEach(function(v, i) { it("Passes test vector " + i, async function() { diff --git a/test/HexDecoder.js b/test/HexDecoder.js index 841650b..a9da959 100644 --- a/test/HexDecoder.js +++ b/test/HexDecoder.js @@ -6,12 +6,16 @@ */ var testdata = require('../data/HexDecoder.json'); +const HexDecoder = require('Embark/contracts/HexDecoder'); -describe("HexDecoder", function() { +config({ + contracts: { + HexDecoder: {} + } +}); + +contract("HexDecoder", function() { this.timeout(0); - before(function(done) { - EmbarkSpec.deployAll({"HexDecoder": {}}, () => { done() }); - }); testdata.vectors.forEach(function(v, i) { it("Passes test vector " + i, async function() { diff --git a/test/IndexOf.js b/test/IndexOf.js index 2722a73..634115e 100644 --- a/test/IndexOf.js +++ b/test/IndexOf.js @@ -6,12 +6,16 @@ */ var testdata = require('../data/IndexOf.json'); +const IndexOf = require('Embark/contracts/IndexOf'); -describe("IndexOf", function() { +config({ + contracts: { + IndexOf: {} + } +}); + +contract("IndexOf", function() { this.timeout(0); - before(function(done) { - EmbarkSpec.deployAll({"IndexOf": {}}, () => { done() }); - }); testdata.vectors.forEach(function(v, i) { it("Passes test vector " + i, async function() { diff --git a/test/Sort.js b/test/Sort.js index 84177c5..ab76a2f 100644 --- a/test/Sort.js +++ b/test/Sort.js @@ -6,12 +6,16 @@ */ var testdata = require('../data/Sort.json'); +const Sort = require('Embark/contracts/Sort'); -describe("Sort", function() { +config({ + contracts: { + Sort: {} + } +}); + +contract("Sort", function() { this.timeout(0); - before(function(done) { - EmbarkSpec.deployAll({"Sort": {}}, () => { done() }); - }); testdata.vectors.forEach(function(v, i) { it("Passes test vector " + i, async function() { diff --git a/test/Unique.js b/test/Unique.js index 279b5d5..dbf64a8 100644 --- a/test/Unique.js +++ b/test/Unique.js @@ -6,12 +6,16 @@ */ var testdata = require('../data/Unique.json'); +const Unique = require('Embark/contracts/Unique'); -describe("Unique", function() { +config({ + contracts: { + Unique: {} + } +}); + +contract("Unique", function() { this.timeout(0); - before(function(done) { - EmbarkSpec.deployAll({"Unique": {}}, () => { done() }); - }); testdata.vectors.forEach(function(v, i) { it("Passes test vector " + i, async function() {