Skip to content

Commit

Permalink
Merge branch 'develop' into feature/#13
Browse files Browse the repository at this point in the history
Conflicts:
	.idea/jsLibraryMappings.xml
  • Loading branch information
orweinberger committed Mar 12, 2015
2 parents 4b322b3 + c0d263e commit 79a8845
Show file tree
Hide file tree
Showing 14 changed files with 588 additions and 79 deletions.
9 changes: 0 additions & 9 deletions .idea/codeStyleSettings.xml

This file was deleted.

14 changes: 0 additions & 14 deletions .idea/libraries/rocket_pocket_node_modules.xml

This file was deleted.

16 changes: 13 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
language: node_js
node_js:
- "0.10"
- "0.11"
- "0.12"
- "iojs"

branches:
only:
- master
- develop

script:
- npm run test:coverage
- npm run build

after_success:
- npm run coveralls

5 changes: 2 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var watchify = require('watchify');
var browserify = require('browserify');

var paths = {
pockets_lib_index: './www/lib/pockets/pockets.js',
pockets_lib_index: './www/lib/pockets/engine.js',
sass: ['./scss/**/*.scss']
};

Expand Down Expand Up @@ -59,10 +59,9 @@ gulp.task('git-check', function (done) {
var bundler = browserify(paths.pockets_lib_index, watchify.args);
bundler.transform('brfs');

var watched = watchify(bundler);

gulp.task('build', build); // so you can run `gulp js` to build the file
gulp.task('watch', function () {
var watched = watchify(bundler);
build();
watched.on('update', build); // on any dep update, runs the bundler
watched.on('log', gutil.log); // output build logs to terminal
Expand Down
36 changes: 20 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,45 @@
"description": "pockets: An Ionic project",
"scripts": {
"test": "mocha",
"test:coverage": "istanbul cover ./node_modules/.bin/_mocha -- -R dot test"
"test:coverage": "istanbul cover ./node_modules/.bin/_mocha -- -R dot test",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"build": "gulp build"
},
"dependencies": {
"bigi": "^1.4.0",
"bitcoinjs-lib": "^1.5.1",
"bluebird": "^2.9.14",
"brfs": "^1.4.0",
"browserify": "^9.0.3",
"bs58": "^2.0.1",
"buffer": "^3.1.1",
"ecurve": "^1.0.1",
"eventemitter2": "^0.4.14",
"node-localstorage": "^0.5.0",
"thenify-all": "^1.6.0",
"traverse": "^0.6.6",
"underscore": "^1.8.2"
},
"devDependencies": {
"brfs": "^1.4.0",
"browserify": "^9.0.3",
"assert": "^1.3.0",
"bower": "^1.3.3",
"chai": "^2.1.1",
"coveralls": "^2.11.2",
"gulp": "^3.5.6",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^0.7.1",
"gulp-sourcemaps": "^1.5.0",
"gulp-util": "^2.2.14",
"istanbul": "^0.3.7",
"mocha": "^2.2.1",
"node-localstorage": "^0.5.0",
"thenify-all": "^1.6.0",
"underscore": "^1.8.2",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"watchify": "^2.4.0"
},
"devDependencies": {
"bower": "^1.3.3",
"gulp-util": "^2.2.14",
"shelljs": "^0.3.0",
"assert": "^1.3.0",
"chai": "^2.1.1",
"should": "^5.2.0",
"sinon": "^1.13.0",
"sinon-chai": "^2.7.0"
"sinon-chai": "^2.7.0",
"watchify": "^2.4.0",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0"
}
}
2 changes: 1 addition & 1 deletion test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var chai = require('chai');
chai.use(require('sinon-chai'));
global.expect = chai.expect;

require('../www/lib/pockets/pockets');
require('../www/lib/pockets/engine');

engine.init();

Expand Down
2 changes: 1 addition & 1 deletion test/mocha.opts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--reporter spec
--recursive
--timeout 10000
--timeout 2500

--require ./test/common.js
2 changes: 1 addition & 1 deletion test/unit/6-bitcoin.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe("events", function () {
describe("bitcoin", function () {
it("should validate a address", function (done) {
engine.bitcoin.validateWallet({address: 'mpSKAvSLeZTHbstNEzYKs7fxw9fat6a1Y5'}, done);
});
Expand Down
53 changes: 53 additions & 0 deletions test/unit/7-pockets.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
describe("pockets", function () {
it("should add a pocket", function (done) {
engine.pockets.create({
name: 'root',
description: ''
}, done);
});

it("should update a pocket", function (done) {
engine.pockets.update({
name: 'root',
description: 'test'
}, function (err) {
if (err)
return done(err);

expect(engine.pockets.ROOT.description).to.equal('test');
done();
});
});

it("should create a 1st level pocket", function (done) {
engine.pockets.create({
name: 'root',
description: ''
}, function (err) {
if (err)
return done(err);

engine.pockets.create({
parent: 'root',
name: 'savings'
}, function (err) {
if (err)
return done(err);

expect(engine.pockets.ROOT.pockets.savings).to.be.ok;
done();
});
});
});

it("should delete a pocket", function (done) {
engine.pockets.delete({
name: 'savings'
}, function (err) {
if (err)
return done(err);
expect(engine.pockets.ROOT.pockets.savings).to.be.undefined;
done();
});
});
});
Loading

0 comments on commit 79a8845

Please sign in to comment.