Skip to content

Commit

Permalink
Merge pull request #173 from Pchelolo/dependencies
Browse files Browse the repository at this point in the history
Update dependencies and integrate jscs
  • Loading branch information
Marko Obrovac committed Dec 7, 2015
2 parents 9fdc1cb + d23c0c9 commit 3012ad1
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 211 deletions.
32 changes: 32 additions & 0 deletions .jscs.json
@@ -0,0 +1,32 @@
{
"preset": "node-style-guide",
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"validateIndentation": 4,
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
"requireCapitalizedComments": null,
"maximumLineLength": {
"value": 100,
"allExcept": ["urlComments"]
},
"validateQuoteMarks": null,
"requireTrailingComma": null,
"disallowTrailingComma": null,
"requireSpacesInsideObjectBrackets": "all",

"excludeFiles": [
"node_modules/**",
"test/**",
"coverage/**",
"scripts/**",
"maintenance/**",
"doc/**"
]
}
16 changes: 8 additions & 8 deletions index.js
Expand Up @@ -6,7 +6,7 @@
// global includes
var spec = require('restbase-mod-table-spec').spec;

function RBCassandra (options) {
function RBCassandra(options) {
this.options = options;
this.conf = options.conf;
this.log = options.log;
Expand All @@ -24,7 +24,7 @@ function RBCassandra (options) {
};
}

RBCassandra.prototype.createTable = function (rb, req) {
RBCassandra.prototype.createTable = function(rb, req) {
var store = this.store;
// XXX: decide on the interface
req.body.table = req.params.table;
Expand Down Expand Up @@ -64,7 +64,7 @@ RBCassandra.prototype.createTable = function (rb, req) {
};

// Query a table
RBCassandra.prototype.get = function (rb, req) {
RBCassandra.prototype.get = function(rb, req) {
var rp = req.params;
if (!rp.rest && !req.body) {
// Return the entire table
Expand Down Expand Up @@ -97,7 +97,7 @@ RBCassandra.prototype.get = function (rb, req) {
};

// Update a table
RBCassandra.prototype.put = function (rb, req) {
RBCassandra.prototype.put = function(rb, req) {
var domain = req.params.domain;
// XXX: Use the path to determine the primary key?
return this.store.put(domain, req.body)
Expand All @@ -120,7 +120,7 @@ RBCassandra.prototype.put = function (rb, req) {
});
};

RBCassandra.prototype.dropTable = function (rb, req) {
RBCassandra.prototype.dropTable = function(rb, req) {
var domain = req.params.domain;
return this.store.dropTable(domain, req.params.table)
.then(function(res) {
Expand All @@ -142,7 +142,7 @@ RBCassandra.prototype.dropTable = function (rb, req) {
});
};

RBCassandra.prototype.getTableSchema = function (rb, req) {
RBCassandra.prototype.getTableSchema = function(rb, req) {
var domain = req.params.domain;
return this.store.getTableSchema(domain, req.params.table)
.then(function(res) {
Expand Down Expand Up @@ -171,7 +171,7 @@ RBCassandra.prototype.getTableSchema = function (rb, req) {
*
* @return {Promise<registry>}
*/
RBCassandra.prototype.setup = function setup () {
RBCassandra.prototype.setup = function setup() {
var self = this;
// Set up storage backend
var backend = require('./lib/index');
Expand All @@ -190,7 +190,7 @@ RBCassandra.prototype.setup = function setup () {
* @return {Promise<registration>} with registration being the registration
* object
*/
function makeRBCassandra (options) {
function makeRBCassandra(options) {
var rb = new RBCassandra(options);
return rb.setup();
}
Expand Down

0 comments on commit 3012ad1

Please sign in to comment.