Skip to content

Commit

Permalink
Merge pull request #20 from arobson/next
Browse files Browse the repository at this point in the history
0.2.0 - better connection management, API improvements
  • Loading branch information
Brian Edgerton committed Apr 29, 2015
2 parents 2c49b04 + a060d25 commit d1ca151
Show file tree
Hide file tree
Showing 24 changed files with 1,010 additions and 691 deletions.
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ tmp/
spec/
node_modules/
coverage/
.editorconfig
.esformatter
.jshintrc
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 0.2.*

### Current

* Replace sliver with pluggable idStrategy approach
* Update mutate to always return document (changed or not)
* Make _indexes available during mutate
* Remove deprecated `progress` support from promises
* Add default timeout to ensure promises reject on connection failure
* Use whistlepunk for logging
* Add ability to specific # of connections per node to start with in the pool
* Bug fix - connection pool doesn't cycle connections per node correctly
* Bug fix - correct how defaults are applied to node settings
* Introduce custom errors for bucket operations (get, put, mutate)
* Include docs after multi-get operations
* Simplify and clean-up log entries
* Update/Cleanup README

## 0.1.*

### prerelease 10
Expand Down
177 changes: 115 additions & 62 deletions README.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,18 @@ gulp.task( 'coverage-watch', function() {

gulp.task( 'show-coverage', bg.showCoverage() );

gulp.task( 'continuous-specs', function() {
return bg.test();
} );

gulp.task( 'specs-watch', function() {
bg.watch( [ 'continuous-specs' ] );
} );

gulp.task( 'test-and-exit', function() {
return bg.testOnce();
} );

gulp.task( 'default', [ 'coverage', 'coverage-watch' ], function() {} );
gulp.task( 'specs', [ 'continuous-specs', 'specs-watch' ], function() {} );
gulp.task( 'build', [ 'test-and-exit' ] );
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "riaktive",
"version": "0.1.0-10",
"version": "0.2.0",
"description": "A Riak API abstraction built on riakpbc that aims for simplicity.",
"main": "src/index.js",
"scripts": {
Expand All @@ -15,19 +15,19 @@
"riak"
],
"dependencies": {
"configya": "~0.2.0",
"debug": "^1.0.4",
"lodash": "~2.4.1",
"machina": "^0.4.0-1",
"monologue.js": "^0.2.1",
"node-uuid": "^1.4.1",
"riakpbc": "~2.1.0",
"sliver": "~0.1.0",
"solr-client": "~0.2.9",
"when": "~3.0.0"
"configya": "~0.2.1",
"lodash": "~3.7.0",
"machina": "~1.0.0",
"monologue.js": "~0.3.0",
"node-uuid": "~1.4.3",
"postal": "~1.0.2",
"riakpbc": "^2.1.0",
"solr-client": "~0.5.0",
"when": "~3.7.2",
"whistlepunk": "~0.3.1"
},
"devDependencies": {
"biggulp": "0.0.2",
"biggulp": "0.*.*",
"chai": "^2.1.0",
"chai-as-promised": "^4.2.0",
"configya": "~0.2.0",
Expand Down
2 changes: 2 additions & 0 deletions repl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require( './src/repl.js' );
87 changes: 87 additions & 0 deletions spec/behavior/log.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
require( '../setup' );
var logFn = require( '../../src/log' );
var mockLog = require( '../mockLogger' )();

describe( 'Logging', function() {
describe( 'before initialization', function() {
var log;
before( function() {
log = logFn( 'test' );
} );

it( 'should not throw exceptions', function() {
should.not.throw( function() {
log.debug( 'one' );
} );
should.not.throw( function() {
log.info( 'two' );
} );
should.not.throw( function() {
log.warn( 'three' );
} );
should.not.throw( function() {
log.error( 'four' );
} );
} );
} );

describe( 'with debug env set', function() {
var original = process.env.DEBUG;
var log;
before( function() {
process.env.DEBUG = 'test';
log = logFn( {
adapters: {
'./spec/mockLogger.js': {
level: 5
}
}
}, 'test' );
log.debug( 'hello' );
log.info( 'ignored' );
log.warn( 'ignored' );
log.error( 'ignored' );
} );

it( 'should not send log entries to other adapters', function() {
expect( mockLog.test ).to.be.undefined;
} );

after( function() {
process.env.DEBUG = original;
} );
} );

describe( 'without debug', function() {
var original = process.env.DEBUG;
var log;
before( function() {
delete process.env.DEBUG;
log = logFn( {
adapters: {
'./spec/mockLogger.js': {
level: 2
}
}
}, 'test' );

log.debug( 'debug' );
log.info( 'info' );
log.warn( 'warn' );
log.error( 'error' );
} );

it( 'should log entries to adapter', function() {
mockLog.test.entries.should.eql( {
error: [ 'error' ],
warn: [ 'warn' ],
info: [],
debug: []
} );
} );

after( function() {
process.env.DEBUG = original;
} );
} );
} );
114 changes: 0 additions & 114 deletions spec/behavior/vector.spec.js

This file was deleted.

Loading

0 comments on commit d1ca151

Please sign in to comment.