Skip to content

Commit

Permalink
Release 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ClickerMonkey committed Nov 22, 2016
1 parent 4cf50d8 commit 8333f41
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 22 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rekord-pouchdb",
"version": "1.4.3",
"version": "1.5.0",
"homepage": "https://github.com/Rekord/rekord-pouchdb",
"authors": [
"Philip Diffenderfer <pdiffenderfer@gmail.com>"
Expand All @@ -25,6 +25,6 @@
],
"dependencies": {
"pouchdb": "~5.1.0",
"rekord": "~1.4.0"
"rekord": "~1.5.0"
}
}
27 changes: 19 additions & 8 deletions build/rekord-pouchdb.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* rekord-pouchdb 1.4.3 - A rekord binding to pouchdb - implementing Rekord.rest, Rekord.live, & Rekord.store by Philip Diffenderfer */
/* rekord-pouchdb 1.5.0 - A rekord binding to pouchdb - implementing Rekord.rest, Rekord.live, & Rekord.store by Philip Diffenderfer */
// UMD (Universal Module Definition)
(function (root, factory)
{
Expand Down Expand Up @@ -32,6 +32,10 @@
var Rekord_rest = Rekord.rest;
var Rekord_store = Rekord.store;

var transfer = Rekord.transfer;
var copy = Rekord.copy;
var isObject = Rekord.isObject;

Debugs.POUCH_INIT = 2000;
Debugs.POUCH_ALL = 2001;
Debugs.POUCH_ALL_ERROR = 2002;
Expand Down Expand Up @@ -98,7 +102,7 @@

pouchdb: pouch,

all: function( success, failure )
all: function( extraOptions, success, failure )
{
function onAll(response)
{
Expand All @@ -120,10 +124,17 @@
failure( [], err.status );
}

pouch.allDocs( options ).then( onAll ).catch( onAllError );
var allOptions = options;

if ( isObject( extraOptions ) )
{
allOptions = transfer( extraOptions, copy( allOptions ) );
}

pouch.allDocs( allOptions ).then( onAll ).catch( onAllError );
},

get: function( model, success, failure )
get: function( model, extraOptions, success, failure )
{
var key = String( model.$key() );

Expand All @@ -145,7 +156,7 @@
pouch.get( key ).then( onGet ).catch( onGetError );
},

create: function( model, encoded, success, failure )
create: function( model, encoded, extraOptions, success, failure )
{
encoded._id = String( model.$key() );
encoded.$origin = database.origin;
Expand Down Expand Up @@ -176,7 +187,7 @@
pouch.put( encoded ).then( onCreate ).catch( onCreateError );
},

update: function( model, encoded, success, failure )
update: function( model, encoded, extraOptions, success, failure )
{
encoded._id = String( model.$key() );
encoded._rev = model._rev;
Expand Down Expand Up @@ -208,7 +219,7 @@
pouch.put( encoded ).then( onUpdate ).catch( onUpdateError );
},

remove: function( model, success, failure )
remove: function( model, extraOptions, success, failure )
{
var key = String( model.$key() );

Expand Down Expand Up @@ -236,7 +247,7 @@
pouch.remove( key ).then( onRemove ).catch( onRemoveError );
},

query: function( url, query, success, failure )
query: function( url, query, extraOptions, success, failure )
{
success( [] );
}
Expand Down
4 changes: 2 additions & 2 deletions build/rekord-pouchdb.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8333f41

Please sign in to comment.