Commit 0a16746e authored by Bryan Kaperick's avatar Bryan Kaperick

Added src/jio.storage/bryanstorage.js and...

Added src/jio.storage/bryanstorage.js and test/jio.storage/bryanstorage.tests.js for revision storage implementation.
parent 07805198
......@@ -182,7 +182,8 @@ module.exports = function (grunt) {
'src/jio.storage/indexeddbstorage.js',
'src/jio.storage/cryptstorage.js',
'src/jio.storage/websqlstorage.js',
'src/jio.storage/fbstorage.js'
'src/jio.storage/fbstorage.js',
'src/jio.storage/bryanstorage.js'
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
// dest: 'jio.js'
......
/*jslint nomen: true*/
/*global RSVP, jiodate*/
(function (jIO) {
"use strict";
/**
* The jIO BryanStorage extension
*
* @class BryanStorage
* @constructor
*/
function BryanStorage(spec) {
this._sub_storage = jIO.createJIO(spec.sub_storage);
}
BryanStorage.prototype.get = function () {
return this._sub_storage.get.apply(this._sub_storage, arguments);
};
BryanStorage.prototype.allAttachments = function () {
return this._sub_storage.allAttachments.apply(this._sub_storage, arguments);
};
BryanStorage.prototype.post = function () {
return this._sub_storage.post.apply(this._sub_storage, arguments);
};
BryanStorage.prototype.put = function () {
return this._sub_storage.put.apply(this._sub_storage, arguments);
};
BryanStorage.prototype.remove = function () {
return this._sub_storage.remove.apply(this._sub_storage, arguments);
};
BryanStorage.prototype.getAttachment = function () {
return this._sub_storage.getAttachment.apply(this._sub_storage, arguments);
};
BryanStorage.prototype.putAttachment = function () {
return this._sub_storage.putAttachment.apply(this._sub_storage, arguments);
};
BryanStorage.prototype.removeAttachment = function () {
return this._sub_storage.removeAttachment.apply(this._sub_storage,
arguments);
};
BryanStorage.prototype.repair = function () {
return this._sub_storage.repair.apply(this._sub_storage, arguments);
};
BryanStorage.prototype.hasCapacity = function (name) {
return this._sub_storage.removeAttachment.apply(this._sub_storage, name);
};
BryanStorage.prototype.buildQuery = function (options) {
return this._sub_storage.removeAttachment.apply(this._sub_storage, options);
};
jIO.addStorage('bryan', BryanStorage);
}(jIO));
This diff is collapsed.
......@@ -59,6 +59,8 @@
<!--script src="../lib/jquery/jquery.min.js"></script>
<script src="../src/jio.storage/xwikistorage.js"></script>
<script src="jio.storage/xwikistorage.tests.js"></script-->
<script src="jio.storage/bryanstorage.tests.js"></script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment