You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2015/03/25 11:13:58 UTC

[01/11] fauxton commit: updated refs/heads/master to 9343084

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master b62db06a6 -> 9343084ac


styleguide: fix trailing whitespace

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/5fb57a61
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/5fb57a61
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/5fb57a61

Branch: refs/heads/master
Commit: 5fb57a614203019132df1db85266a9d38afdc2ef
Parents: b62db06
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 22 18:00:37 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:11:20 2015 +0100

----------------------------------------------------------------------
 app/addons/auth/base.js                         | 16 ++++++++--------
 app/addons/compaction/base.js                   |  4 ++--
 app/addons/config/views.js                      |  2 +-
 app/addons/databases/base.js                    |  6 +++---
 .../tests/nightwatch/createsDatabase.js         |  2 +-
 app/addons/documents/routes.js                  |  4 ++--
 app/addons/documents/shared-views.js            |  2 +-
 .../documents/tests/nightwatch/changesFilter.js |  2 +-
 .../tests/nightwatch/createsDocument.js         |  8 ++++----
 app/addons/fauxton/actions.js                   |  2 +-
 app/addons/fauxton/stores.js                    |  4 ++--
 app/addons/fauxton/tests/baseSpec.js            |  2 +-
 app/addons/fauxton/tests/breadcrumbsViewSpec.js |  2 +-
 app/addons/permissions/resources.js             |  6 +++---
 app/addons/permissions/tests/resourceSpec.js    |  2 +-
 app/addons/permissions/tests/viewsSpec.js       | 16 ++++++++--------
 app/addons/permissions/views.js                 |  8 ++++----
 app/addons/styletests/base.js                   |  4 ++--
 app/addons/styletests/routes.js                 |  2 +-
 app/addons/verifyinstall/resources.js           | 10 +++++-----
 app/addons/verifyinstall/views.js               |  2 +-
 app/app.js                                      |  6 +++---
 app/core/layout.js                              |  4 ++--
 app/core/routeObject.js                         | 20 ++++++++++----------
 app/core/router.js                              |  2 +-
 app/core/store.js                               |  2 +-
 app/core/tests/routeObjectSpec.js               | 10 +++++-----
 tasks/addon/template.js                         |  2 +-
 tasks/fauxton.js                                |  4 ++--
 .../custom-commands/createDatabase.js           |  2 +-
 .../custom-commands/createDocument.js           |  4 ++--
 31 files changed, 81 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/auth/base.js
----------------------------------------------------------------------
diff --git a/app/addons/auth/base.js b/app/addons/auth/base.js
index 52c443f..5aacdd3 100644
--- a/app/addons/auth/base.js
+++ b/app/addons/auth/base.js
@@ -26,7 +26,7 @@ function(app, FauxtonAPI, Auth) {
 
     FauxtonAPI.addHeaderLink({
       id: "auth",
-      title: "Login", 
+      title: "Login",
       href: "#login",
       icon: "fonticon-user",
       bottomNav: true,
@@ -39,7 +39,7 @@ function(app, FauxtonAPI, Auth) {
       if (session.isAdminParty()) {
         link = {
           id: "auth",
-          title: "Admin Party!", 
+          title: "Admin Party!",
           href: "#createAdmin",
           icon: "fonticon-user",
           bottomNav: true,
@@ -47,7 +47,7 @@ function(app, FauxtonAPI, Auth) {
       } else if (session.isLoggedIn()) {
         link = {
           id: "auth",
-          title: session.user().name, 
+          title: session.user().name,
           href: "#changePassword",
           icon: "fonticon-user",
           bottomNav: true,
@@ -55,16 +55,16 @@ function(app, FauxtonAPI, Auth) {
 
         FauxtonAPI.addHeaderLink({
           id: 'logout',
-          footerNav: true, 
-          href: "#logout", 
-          title: "Logout", 
-          icon: "", 
+          footerNav: true,
+          href: "#logout",
+          title: "Logout",
+          icon: "",
           className: 'logout'
         });
       } else {
         link = {
           id: "auth",
-          title: 'Login', 
+          title: 'Login',
           href: "#login",
           icon: "fonticon-user",
           bottomNav: true,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/compaction/base.js
----------------------------------------------------------------------
diff --git a/app/addons/compaction/base.js b/app/addons/compaction/base.js
index f80c42e..d320cd2 100644
--- a/app/addons/compaction/base.js
+++ b/app/addons/compaction/base.js
@@ -20,8 +20,8 @@ function(app, FauxtonAPI, Compaction) {
 
   Compaction.initialize = function() {
     FauxtonAPI.registerExtension('docLinks', {
-      title: "Compact & Clean", 
-      url: "compact", 
+      title: "Compact & Clean",
+      url: "compact",
       icon: "icon-cogs"
     });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/config/views.js
----------------------------------------------------------------------
diff --git a/app/addons/config/views.js b/app/addons/config/views.js
index 1ccdc3e..6a9e17d 100644
--- a/app/addons/config/views.js
+++ b/app/addons/config/views.js
@@ -243,7 +243,7 @@ function(app, FauxtonAPI, Config, Components) {
       });
     }
   });
-  
+
   Views.Tabs = FauxtonAPI.View.extend({
     className: "sidenav",
     tagName: "nav",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/databases/base.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/base.js b/app/addons/databases/base.js
index 7e30fec..06c872e 100644
--- a/app/addons/databases/base.js
+++ b/app/addons/databases/base.js
@@ -27,9 +27,9 @@ function(app, FauxtonAPI, Databases, Views) {
 
   Databases.initialize = function () {
     FauxtonAPI.addHeaderLink({
-      href:"#/_all_dbs", 
-      title:"Databases", 
-      icon: "fonticon-database", 
+      href:"#/_all_dbs",
+      title:"Databases",
+      icon: "fonticon-database",
       className: 'databases'
     });
   };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/databases/tests/nightwatch/createsDatabase.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/nightwatch/createsDatabase.js b/app/addons/databases/tests/nightwatch/createsDatabase.js
index 5ec01ed..c472ec6 100644
--- a/app/addons/databases/tests/nightwatch/createsDatabase.js
+++ b/app/addons/databases/tests/nightwatch/createsDatabase.js
@@ -33,7 +33,7 @@ module.exports = {
         var data = result.value,
             createdDatabaseIsPresent = data.indexOf(newDatabaseName);
 
-        this.verify.ok(createdDatabaseIsPresent > 0, 
+        this.verify.ok(createdDatabaseIsPresent > 0,
           'Checking if new database shows up in _all_dbs.');
       })
     .end();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/documents/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes.js b/app/addons/documents/routes.js
index 5c1e5a1..2b9aec6 100644
--- a/app/addons/documents/routes.js
+++ b/app/addons/documents/routes.js
@@ -20,8 +20,8 @@ define([
 function(Documents, DocumentsRouteObject, docEditor, IndexEditorRouteObject) {
 
   Documents.RouteObjects = [
-    docEditor.DocEditorRouteObject, 
-    docEditor.NewDocEditorRouteObject, 
+    docEditor.DocEditorRouteObject,
+    docEditor.NewDocEditorRouteObject,
     DocumentsRouteObject,
     IndexEditorRouteObject
   ];

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/documents/shared-views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-views.js b/app/addons/documents/shared-views.js
index 31eaf62..e775ffa 100644
--- a/app/addons/documents/shared-views.js
+++ b/app/addons/documents/shared-views.js
@@ -207,7 +207,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
           icon: 'fonticon-plus-circled'
         });
 
-        return menuLinks; 
+        return menuLinks;
      }, [{
       title: 'New View',
       url: '#' + FauxtonAPI.urls('new', 'addView', databaseName, docSafe),

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/documents/tests/nightwatch/changesFilter.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/changesFilter.js b/app/addons/documents/tests/nightwatch/changesFilter.js
index 8663fd1..ff8d249 100644
--- a/app/addons/documents/tests/nightwatch/changesFilter.js
+++ b/app/addons/documents/tests/nightwatch/changesFilter.js
@@ -19,7 +19,7 @@ module.exports = {
     var waitTime = 10000,
         newDatabaseName = client.globals.testDatabaseName,
         baseUrl = client.globals.test_settings.launch_url;
-    
+
     client
       .loginToGUI()
       .createDocument('doc_1', newDatabaseName)

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/documents/tests/nightwatch/createsDocument.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/createsDocument.js b/app/addons/documents/tests/nightwatch/createsDocument.js
index 3d2241d..55623f4 100644
--- a/app/addons/documents/tests/nightwatch/createsDocument.js
+++ b/app/addons/documents/tests/nightwatch/createsDocument.js
@@ -17,14 +17,14 @@ module.exports = {
         newDatabaseName = client.globals.testDatabaseName,
         newDocumentName = 'create_doc_document',
         baseUrl = client.globals.test_settings.launch_url;
-    
+
     client
       .loginToGUI()
       .url(baseUrl+'/#/database/'+newDatabaseName+'/_all_docs')
       .waitForElementPresent('#new-all-docs-button', waitTime, false)
       .click('#new-all-docs-button a')
       .waitForElementPresent('#new-all-docs-button a[href="#/database/'+newDatabaseName+'/new"]', waitTime, false)
-      .click('#new-all-docs-button a[href="#/database/'+newDatabaseName+'/new"]') 
+      .click('#new-all-docs-button a[href="#/database/'+newDatabaseName+'/new"]')
       .waitForElementPresent('#editor-container', waitTime, false)
       .verify.urlEquals(baseUrl+'/#/database/'+ newDatabaseName+'/new')
       .execute('\
@@ -41,8 +41,8 @@ module.exports = {
       .getText('body', function (result) {
         var data = result.value,
             createdDocIsPresent = data.indexOf(newDocumentName);
-     
-        this.verify.ok(createdDocIsPresent > 0, 
+
+        this.verify.ok(createdDocIsPresent > 0,
           'Checking if new document shows up in _all_docs.');
       })
     .end();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/fauxton/actions.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/actions.js b/app/addons/fauxton/actions.js
index cfaa722..234f629 100644
--- a/app/addons/fauxton/actions.js
+++ b/app/addons/fauxton/actions.js
@@ -20,7 +20,7 @@ function (app, FauxtonAPI, ActionTypes) {
   return {
     toggleNavbarMenu: function () {
       FauxtonAPI.dispatch({
-        type: ActionTypes.TOGGLE_NAVBAR_MENU 
+        type: ActionTypes.TOGGLE_NAVBAR_MENU
       });
 
       // TODO temporary patch for COUCHDB-2555

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/fauxton/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/stores.js b/app/addons/fauxton/stores.js
index cc31477..6662b57 100644
--- a/app/addons/fauxton/stores.js
+++ b/app/addons/fauxton/stores.js
@@ -31,7 +31,7 @@ function(app, FauxtonAPI, ActionTypes) {
       this.footerNavLinks = [];
       this.bottomNavLinks = [{
         id: 'Documentation',
-        title: "Documentation", 
+        title: "Documentation",
         icon: "fonticon-bookmark",
         href: app.helpers.getDocUrl('GENERAL'),
         bottomNav: true,
@@ -85,7 +85,7 @@ function(app, FauxtonAPI, ActionTypes) {
     },
 
     toggleMenu: function () {
-      app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED, 
+      app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED,
                                 !this.isMinimized());
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/fauxton/tests/baseSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/tests/baseSpec.js b/app/addons/fauxton/tests/baseSpec.js
index 7ecb1a0..6a04eee 100644
--- a/app/addons/fauxton/tests/baseSpec.js
+++ b/app/addons/fauxton/tests/baseSpec.js
@@ -41,7 +41,7 @@ define([
 
       // Need to find a better way of doing this
       mockLayout = {
-        setTemplate: function () { 
+        setTemplate: function () {
           var promise = $.Deferred();
           promise.resolve();
           return promise;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/fauxton/tests/breadcrumbsViewSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/tests/breadcrumbsViewSpec.js b/app/addons/fauxton/tests/breadcrumbsViewSpec.js
index 4efde10..04c2e2b 100644
--- a/app/addons/fauxton/tests/breadcrumbsViewSpec.js
+++ b/app/addons/fauxton/tests/breadcrumbsViewSpec.js
@@ -100,4 +100,4 @@ define([
     });
 
   });
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/permissions/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/permissions/resources.js b/app/addons/permissions/resources.js
index 604d595..501bd29 100644
--- a/app/addons/permissions/resources.js
+++ b/app/addons/permissions/resources.js
@@ -38,18 +38,18 @@ function (app, FauxtonAPI ) {
     addItem: function (value, type, section) {
       var sectionValues = this.get(section);
 
-      if (!sectionValues || !sectionValues[type]) { 
+      if (!sectionValues || !sectionValues[type]) {
         return {
           error: true,
           msg: 'Section ' + section + 'does not exist'
         };
       }
 
-      if (sectionValues[type].indexOf(value) > -1) { 
+      if (sectionValues[type].indexOf(value) > -1) {
         return {
           error: true,
           msg: 'Role/Name has already been added'
-        }; 
+        };
       }
 
       sectionValues[type].push(value);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/permissions/tests/resourceSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/permissions/tests/resourceSpec.js b/app/addons/permissions/tests/resourceSpec.js
index f73687a..99bb745 100644
--- a/app/addons/permissions/tests/resourceSpec.js
+++ b/app/addons/permissions/tests/resourceSpec.js
@@ -20,7 +20,7 @@ define([
 
     describe('#addItem', function () {
       var security;
-      
+
       beforeEach(function () {
         security = new Models.Security(null, {database: 'fakedb'});
       });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/permissions/tests/viewsSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/permissions/tests/viewsSpec.js b/app/addons/permissions/tests/viewsSpec.js
index 147cee4..68e79ff 100644
--- a/app/addons/permissions/tests/viewsSpec.js
+++ b/app/addons/permissions/tests/viewsSpec.js
@@ -34,7 +34,7 @@ define([
       });
 
       viewSandbox = new ViewSandbox();
-      viewSandbox.renderView(section, done); 
+      viewSandbox.renderView(section, done);
     });
 
     afterEach(function () {
@@ -48,7 +48,7 @@ define([
         Views.events.trigger('itemRemoved');
 
         assert.ok(saveMock.calledOnce);
-        var args = saveMock.args; 
+        var args = saveMock.args;
         assert.deepEqual(args[0][0], {"admins":{"names":["_user"],"roles":[]},"members":{"names":[],"roles":[]}});
       });
 
@@ -80,7 +80,7 @@ define([
       });
 
       viewSandbox = new ViewSandbox();
-      viewSandbox.renderView(section, done); 
+      viewSandbox.renderView(section, done);
     });
 
     afterEach(function () {
@@ -136,7 +136,7 @@ define([
       });
 
       viewSandbox = new ViewSandbox();
-      viewSandbox.renderView(item, done); 
+      viewSandbox.renderView(item, done);
     });
 
     afterEach(function () {
@@ -149,14 +149,14 @@ define([
       Views.events.on('itemRemoved', eventSpy);
 
       item.$('.close').click();
-      
-      assert.ok(eventSpy.calledOnce); 
+
+      assert.ok(eventSpy.calledOnce);
     });
 
     it('should set removed to true', function () {
       item.$('.close').click();
-      
-      assert.ok(item.removed); 
+
+      assert.ok(item.removed);
     });
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/permissions/views.js
----------------------------------------------------------------------
diff --git a/app/addons/permissions/views.js b/app/addons/permissions/views.js
index b73145f..e410018 100644
--- a/app/addons/permissions/views.js
+++ b/app/addons/permissions/views.js
@@ -81,7 +81,7 @@ function (app, FauxtonAPI, Permissions) {
 
     beforeRender: function () {
       var section = this.model.get(this.section);
-      
+
       this.nameViews = [];
       this.roleViews = [];
 
@@ -108,11 +108,11 @@ function (app, FauxtonAPI, Permissions) {
 
     discardRemovedViews: function () {
       this.nameViews = _.filter(this.nameViews, function (view) {
-        return !view.removed; 
+        return !view.removed;
       });
 
       this.roleViews = _.filter(this.roleViews, function (view) {
-        return !view.removed; 
+        return !view.removed;
       });
     },
 
@@ -178,7 +178,7 @@ function (app, FauxtonAPI, Permissions) {
     removeItem: function (event) {
       var that = this;
       event.preventDefault();
-      
+
       this.removed = true;
       Permissions.events.trigger('itemRemoved');
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/styletests/base.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/base.js b/app/addons/styletests/base.js
index fae6d11..f350912 100644
--- a/app/addons/styletests/base.js
+++ b/app/addons/styletests/base.js
@@ -21,12 +21,12 @@ function(app, FauxtonAPI, tests) {
 	tests.initialize = function() {
 
 		FauxtonAPI.addHeaderLink({
-			title: "Tests", 
+			title: "Tests",
 			href: '#/tests',
 			bottomNav: true,
 			icon: "fonticon-wrench"
 		});
-		
+
 	};
 
 	return tests;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/styletests/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/routes.js b/app/addons/styletests/routes.js
index cafd9f2..d6940f1 100644
--- a/app/addons/styletests/routes.js
+++ b/app/addons/styletests/routes.js
@@ -36,5 +36,5 @@ function(app, FauxtonAPI, Views) {
 	Views.RouteObjects = [TestRouteObject];
 
 	return Views;
- 
+
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/verifyinstall/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/resources.js b/app/addons/verifyinstall/resources.js
index c018ca0..8adbc03 100644
--- a/app/addons/verifyinstall/resources.js
+++ b/app/addons/verifyinstall/resources.js
@@ -47,7 +47,7 @@ function (app, FauxtonAPI, Databases, Documents) {
 
     updateDoc: function () {
       doc.set({b: 'hello'});
-      return doc.save(); 
+      return doc.save();
     },
 
     saveDB: function () {
@@ -75,7 +75,7 @@ function (app, FauxtonAPI, Databases, Documents) {
 
     setup: function () {
       return FauxtonAPI.when([
-        this.setupDB(db), 
+        this.setupDB(db),
         this.setupDB(dbReplicate)
       ]);
     },
@@ -84,7 +84,7 @@ function (app, FauxtonAPI, Databases, Documents) {
       var deferred = FauxtonAPI.Deferred();
       var promise = $.get(viewDoc.url() + '/_view/testview');
 
-      promise.then(function (resp) { 
+      promise.then(function (resp) {
         resp = _.isString(resp) ? JSON.parse(resp) : resp;
         var row = resp.rows[0];
         if (row.value === 6) {
@@ -108,11 +108,11 @@ function (app, FauxtonAPI, Databases, Documents) {
       viewDoc = new Documents.Doc({
         _id: '_design/view_check',
         views: {
-          'testview': { 
+          'testview': {
             map: 'function (doc) { emit(doc._id, doc.a); }',
             reduce: '_sum'
           }
-        } 
+        }
       },{
         database: db
       });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/addons/verifyinstall/views.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/views.js b/app/addons/verifyinstall/views.js
index 1ecacbd..d22681c 100644
--- a/app/addons/verifyinstall/views.js
+++ b/app/addons/verifyinstall/views.js
@@ -67,7 +67,7 @@ function(app, FauxtonAPI, VerifyInstall) {
         setError(id, JSON.parse(xhr.responseText).reason);
       };
     },
-    
+
     startTest: function () {
       this.disableButton();
       this.$('.status').text('');

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/app.js
----------------------------------------------------------------------
diff --git a/app/app.js b/app/app.js
index 167ccbd..cfa81e1 100644
--- a/app/app.js
+++ b/app/app.js
@@ -103,8 +103,8 @@ function(app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb) {
   FauxtonAPI.config({
     el: '.wrapper',
     masterLayout: new FauxtonAPI.Layout(),
-    
-    // I haven't wrapped these dispatch methods in a action 
+
+    // I haven't wrapped these dispatch methods in a action
     // because I don't want to require fauxton/actions in this method.
     addHeaderLink: function(link) {
       FauxtonAPI.dispatch({
@@ -112,7 +112,7 @@ function(app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb) {
           link: link
       });
     },
-    
+
     updateHeaderLink: function (link) {
       FauxtonAPI.dispatch({
         type: 'UPDATE_NAVBAR_LINK',

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/core/layout.js
----------------------------------------------------------------------
diff --git a/app/core/layout.js b/app/core/layout.js
index d863863..ff709cb 100644
--- a/app/core/layout.js
+++ b/app/core/layout.js
@@ -11,7 +11,7 @@
 // the License.
 
 define([
-  "backbone", 
+  "backbone",
   "plugins/backbone.layoutmanager"
 ], function(Backbone) {
 
@@ -81,7 +81,7 @@ define([
         }
 
       this.layout.removeView(selector);
-      
+
       if (this.layoutViews[selector]) {
         delete this.layoutViews[selector];
       }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/core/routeObject.js
----------------------------------------------------------------------
diff --git a/app/core/routeObject.js b/app/core/routeObject.js
index fc6a244..664c579 100644
--- a/app/core/routeObject.js
+++ b/app/core/routeObject.js
@@ -28,9 +28,9 @@ function(FauxtonAPI, Backbone) {
   _.extend(broadcaster, Backbone.Events);
 
   RouteObject.on = function (eventName, fn) {
-    broadcaster.on(eventName, fn); 
+    broadcaster.on(eventName, fn);
   };
-  
+
   /* How Route Object events work
    To listen to a specific route objects events:
 
@@ -44,7 +44,7 @@ function(FauxtonAPI, Backbone) {
     },
    });
 
-    It is also possible to listen to events triggered from all Routeobjects. 
+    It is also possible to listen to events triggered from all Routeobjects.
     This is great for more general things like adding loaders, hooks.
 
     FauxtonAPI.RouteObject.on('beforeRender', function (routeObject, view, selector) {
@@ -58,7 +58,7 @@ function(FauxtonAPI, Backbone) {
     * beforeRender -- before a view is rendered
     * afterRender -- a view is finished being rendered
     * renderComplete -- all rendering is complete
-    
+
   */
 
   // Piggy-back on Backbone's self-propagating extend function
@@ -141,10 +141,10 @@ function(FauxtonAPI, Backbone) {
       var promises = _.map(routeObject.getViews(), renderView, this);
       return FauxtonAPI.when(promises);
     },
-    
+
     renderView: function(routeObject, options, view, selector) {
       var viewInfo = {
-        view: view, 
+        view: view,
         selector: selector,
         masterLayout: options.masterLayout
       };
@@ -157,7 +157,7 @@ function(FauxtonAPI, Backbone) {
       }
 
       this.triggerBroadcast('beforeRender', view, selector);
-      
+
       return this.callEstablish(view.establish()).then(renderViewOnLayout, this.establishError);
     },
 
@@ -193,7 +193,7 @@ function(FauxtonAPI, Backbone) {
     setRenderedState: function(bool){
       this.renderedState = bool;
     },
-    
+
     triggerBroadcast: function (eventName) {
       var args = Array.prototype.slice.call(arguments);
       this.trigger.apply(this, args);
@@ -275,7 +275,7 @@ function(FauxtonAPI, Backbone) {
         if (promise.state() === "resolved") { return; }
         if (promise.abort) {
           return promise.abort("Route change");
-        } 
+        }
 
         promise.reject && promise.reject();
       }, this);
@@ -312,7 +312,7 @@ function(FauxtonAPI, Backbone) {
       var route = this.get('routes')[routeUrl];
 
       if ((typeof route === 'object') && route.roles) {
-        return route.roles; 
+        return route.roles;
       }
 
       return this.roles;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/core/router.js
----------------------------------------------------------------------
diff --git a/app/core/router.js b/app/core/router.js
index 5e4bb1c..6d15a6c 100644
--- a/app/core/router.js
+++ b/app/core/router.js
@@ -71,7 +71,7 @@ function(FauxtonAPI, Auth, Backbone) {
             FauxtonAPI.auth.authDeniedCb();
           });
 
-        }); 
+        });
       }, this);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/core/store.js
----------------------------------------------------------------------
diff --git a/app/core/store.js b/app/core/store.js
index e98870c..90d5851 100644
--- a/app/core/store.js
+++ b/app/core/store.js
@@ -29,6 +29,6 @@ function(Backbone) {
     initialize: function () {}
   });
 
-  return Store; 
+  return Store;
 });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/app/core/tests/routeObjectSpec.js
----------------------------------------------------------------------
diff --git a/app/core/tests/routeObjectSpec.js b/app/core/tests/routeObjectSpec.js
index 5e5aa49..83367dd 100644
--- a/app/core/tests/routeObjectSpec.js
+++ b/app/core/tests/routeObjectSpec.js
@@ -32,7 +32,7 @@ define([
 
         // Need to find a better way of doing this
         mockLayout = {
-          setTemplate: function () { 
+          setTemplate: function () {
             var promise = $.Deferred();
             promise.resolve();
             return promise;
@@ -71,7 +71,7 @@ define([
         assert.ok(setTemplateSpy.calledOnce, 'SetTemplate not meant to be called');
       });
 
-      
+
       it("Should call establish of routeObject", function () {
         var establishSpy = sinon.spy(testRouteObject,"establish");
 
@@ -83,9 +83,9 @@ define([
         var view = new FauxtonAPI.View(),
             getViewsSpy = sinon.stub(testRouteObject,"getViews"),
             viewSpy = sinon.stub(view, "establish");
-        
+
         view.hasRendered = false;
-        view.promise = function () { 
+        view.promise = function () {
           var promise = $.Deferred();
           promise.resolve();
           return promise;
@@ -101,7 +101,7 @@ define([
         var view = new FauxtonAPI.View(),
             getViewsSpy = sinon.stub(testRouteObject,"getViews"),
             viewSpy = sinon.stub(view, "establish");
-        
+
         view.hasRendered = true;
         getViewsSpy.returns({'#view': view});
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/tasks/addon/template.js
----------------------------------------------------------------------
diff --git a/tasks/addon/template.js b/tasks/addon/template.js
index 459ff34..6199c7b 100644
--- a/tasks/addon/template.js
+++ b/tasks/addon/template.js
@@ -67,4 +67,4 @@ exports.template = function(grunt, init, done) {
       done();
     }
   )
-};
\ No newline at end of file
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index 2cbe240..1fab584 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -97,7 +97,7 @@ module.exports = function(grunt) {
         dest = "app/initialize.js"
         tmpl = _.template(grunt.file.read(template)),
         app = {};
-      
+
 
     _.defaults(app, settings.app, {
       root: '/',
@@ -118,7 +118,7 @@ module.exports = function(grunt) {
    var testFiles =  grunt.file.expand(fileSrc);
 
     var configTemplate = _.template(grunt.file.read(configTemplateSrc));
-    // a bit of a nasty hack to read our current config.js and get the info so we can change it 
+    // a bit of a nasty hack to read our current config.js and get the info so we can change it
     // for our testing setup
     var require = {
       config: function (args) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/test/nightwatch_tests/custom-commands/createDatabase.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/createDatabase.js b/test/nightwatch_tests/custom-commands/createDatabase.js
index fc0fbe6..ab7efd4 100644
--- a/test/nightwatch_tests/custom-commands/createDatabase.js
+++ b/test/nightwatch_tests/custom-commands/createDatabase.js
@@ -28,7 +28,7 @@ CreateDatabase.prototype.command = function (databaseName) {
   nano.db.create(databaseName, function (err, body, header) {
     if (err) {
       console.log('Error in nano CreateDatabase Function: '+ databaseName, err.message);
-      
+
     }
     console.log('nano - created a database: ' + databaseName);
     // emit the complete event

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5fb57a61/test/nightwatch_tests/custom-commands/createDocument.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/createDocument.js b/test/nightwatch_tests/custom-commands/createDocument.js
index f412dbe..b7a2c47 100644
--- a/test/nightwatch_tests/custom-commands/createDocument.js
+++ b/test/nightwatch_tests/custom-commands/createDocument.js
@@ -27,11 +27,11 @@ CreateDocument.prototype.command = function (documentName, databaseName, docCont
       database = nano.use(databaseName);
 
   if (docContents === undefined) {
-    docContents = { dummyKey: "testingValue" }; 
+    docContents = { dummyKey: "testingValue" };
   }
 
   database.insert(docContents, documentName, function (err, body, header) {
-  
+
     if (err) {
       console.log('Error in nano CreateDocument Function: '+documentName+', in database: '+databaseName, err.message);
     }


[10/11] fauxton commit: updated refs/heads/master to 9343084

Posted by ro...@apache.org.
tooling: automatically test for code style

Currently taking a look if our js coding guidelines are followed
is done manually during the main code review of a PR. This takes
a lot of time for the reviewer and often results in 1-2 more
iterations until the patch is landed, just taking the style issues
into account.

Additionally there are sometimes so much style issues that it
gets hard to focus on the real issues, e.g. the architecture of a
patch or the overall implementation.

This PR enables a precheck that allows to automatically detect if
our styleguide was followed. The errors can now get cleaned up
before the review, saving time of the reviewer and the submitter.
As most style issues won't appear any more in a review the review
focus will change to a discussion that is more related to the
actual implementation, probably resulting in better reviews and
overall code quality.

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/ae16ad93
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/ae16ad93
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/ae16ad93

Branch: refs/heads/master
Commit: ae16ad93cfe5097b759655603c253e413ecfe6a6
Parents: c54822a
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 22 22:20:21 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:12:02 2015 +0100

----------------------------------------------------------------------
 .jscsrc      | 42 ++++++++++++++++++++++++++++++++++++++++++
 package.json | 14 ++++++++------
 2 files changed, 50 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ae16ad93/.jscsrc
----------------------------------------------------------------------
diff --git a/.jscsrc b/.jscsrc
new file mode 100644
index 0000000..4a4ffbb
--- /dev/null
+++ b/.jscsrc
@@ -0,0 +1,42 @@
+{
+  "disallowEmptyBlocks": true,
+  "disallowKeywordsOnNewLine": ["else"],
+  "disallowTrailingWhitespace": true,
+  "validateIndentation": 2,
+  "fileExtensions": [".js", ".jsx"],
+  "excludeFiles": [
+    "app/**/*.react.js",
+    "app/addons/.module-cache",
+    "app/addons/pouchdb/pouchdb.mapreduce.js",
+    "app/addons/pouchdb/pouch.collate.js",
+    "app/load_addons.js"
+  ],
+  "disallowMixedSpacesAndTabs": true,
+  "requireSpaceBeforeBinaryOperators": [
+    "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
+    "&=", "|=", "^=", "+=",
+
+    "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
+    "|", "^", "&&", "||", "===", "==", ">=",
+    "<=", "<", ">", "!=", "!=="
+  ],
+  "requireSpaceAfterBinaryOperators": true,
+  "requireSpacesInConditionalExpression": true,
+  "requireSpaceBeforeBlockStatements": true,
+  "requireLineFeedAtFileEnd": true,
+  "requireSpacesInFunctionExpression": {
+    "beforeOpeningCurlyBrace": true
+  },
+  "requireSpaceAfterKeywords": [
+    "if",
+    "else",
+    "for",
+    "while",
+    "do",
+    "switch",
+    "return",
+    "try",
+    "catch",
+    "function"
+  ]
+}

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ae16ad93/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index f1dc99c..3169bad 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
     "async": "~0.2.6",
     "couchapp": "~0.11.0",
     "grunt": "~0.4.1",
+    "grunt-chmod": "^1.0.3",
     "grunt-cli": "~0.1.6",
     "grunt-contrib-clean": "~0.4.1",
     "grunt-contrib-concat": "~0.3.0",
@@ -24,20 +25,21 @@
     "grunt-couchapp": "~0.2.1",
     "grunt-exec": "~0.4.0",
     "grunt-init": "~0.2.0",
+    "grunt-md5": "^0.1.11",
+    "grunt-mocha-phantomjs": "~0.3.0",
     "grunt-shell": "^1.1.1",
     "http-proxy": "~1.1.4",
+    "jsxcs": "~0.2.1",
+    "nano": "~5.12.0",
+    "nightwatch": "~0.5.33",
     "react-tools": "^0.12.0",
     "send": "~0.1.1",
     "underscore": "~1.4.2",
     "url": "~0.7.9",
-    "urls": "~0.0.3",
-    "grunt-mocha-phantomjs": "~0.3.0",
-    "nightwatch": "~0.5.33",
-    "nano": "~5.12.0",
-    "grunt-chmod": "^1.0.3",
-    "grunt-md5": "^0.1.11"
+    "urls": "~0.0.3"
   },
   "scripts": {
+    "stylecheck": "jsxcs app && jsxcs test/nightwatch_tests && jsxcs tasks && jsxcs Gruntfile.js",
     "test": "grunt test",
     "couchdebug": "grunt couchdebug",
     "couchdb": "grunt couchdb"


[09/11] fauxton commit: updated refs/heads/master to 9343084

Posted by ro...@apache.org.
styleguide: requireSpaceAfterKeywords

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/c54822ab
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/c54822ab
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/c54822ab

Branch: refs/heads/master
Commit: c54822ab81b34dca7b1a49ca7bc314c8d5a86ce2
Parents: e3425b0
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 22 22:09:32 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:11:58 2015 +0100

----------------------------------------------------------------------
 Gruntfile.js                                    | 24 +++----
 app/addons/activetasks/views.js                 |  4 +-
 app/addons/auth/base.js                         |  6 +-
 app/addons/auth/resources.js                    | 10 +--
 app/addons/auth/routes.js                       |  2 +-
 app/addons/compaction/base.js                   |  4 +-
 app/addons/compaction/routes.js                 |  2 +-
 .../components/tests/beautifySpec.react.jsx     |  2 +-
 app/addons/config/base.js                       |  4 +-
 app/addons/config/routes.js                     |  4 +-
 app/addons/config/views.js                      | 12 ++--
 app/addons/cors/actions.js                      |  4 +-
 app/addons/cors/base.js                         |  2 +-
 app/addons/cors/components.react.jsx            |  2 +-
 app/addons/cors/resources.js                    |  4 +-
 app/addons/databases/base.js                    |  8 +--
 app/addons/databases/resources.js               | 36 +++++------
 app/addons/databases/routes.js                  |  6 +-
 app/addons/databases/views.js                   |  8 +--
 app/addons/documents/base.js                    |  2 +-
 app/addons/documents/header/header.react.jsx    |  4 +-
 app/addons/documents/helpers.js                 |  2 +-
 .../documents/index-editor/components.react.jsx | 14 ++---
 app/addons/documents/index-editor/stores.js     |  8 +--
 .../documents/pagination/pagination.react.jsx   |  8 +--
 app/addons/documents/resources.js               | 38 +++++------
 app/addons/documents/routes-doc-editor.js       |  6 +-
 app/addons/documents/routes-documents.js        |  4 +-
 app/addons/documents/routes.js                  |  2 +-
 app/addons/documents/shared-resources.js        | 48 +++++++-------
 app/addons/documents/shared-views.js            | 26 ++++----
 .../documents/tests/changes.storesSpec.js       |  4 +-
 app/addons/documents/tests/resourcesSpec.js     | 24 +++----
 app/addons/documents/tests/storesSpec.js        |  4 +-
 app/addons/documents/views-changes.js           |  4 +-
 app/addons/documents/views-doceditor.js         |  6 +-
 app/addons/documents/views-queryoptions.js      |  2 +-
 app/addons/documents/views.js                   | 44 ++++++-------
 app/addons/fauxton/actions.js                   |  2 +-
 app/addons/fauxton/actiontypes.js               |  2 +-
 app/addons/fauxton/base.js                      | 12 ++--
 app/addons/fauxton/components.js                | 66 ++++++++++----------
 app/addons/fauxton/components.react.jsx         |  4 +-
 app/addons/fauxton/stores.js                    |  6 +-
 app/addons/fauxton/templates/breadcrumbs.html   |  2 +-
 app/addons/fauxton/templates/pagination.html    |  2 +-
 app/addons/permissions/base.js                  |  4 +-
 app/addons/permissions/views.js                 |  2 +-
 app/addons/plugins/base.js                      |  4 +-
 app/addons/plugins/routes.js                    |  2 +-
 app/addons/plugins/templates/plugins.html       | 16 ++---
 app/addons/pouchdb/base.js                      |  8 +--
 app/addons/replication/base.js                  |  4 +-
 app/addons/replication/resources.js             | 12 ++--
 app/addons/replication/route.js                 |  4 +-
 app/addons/replication/templates/form.html      |  4 +-
 app/addons/replication/views.js                 | 16 ++---
 app/addons/styletests/base.js                   |  4 +-
 app/addons/styletests/routes.js                 |  6 +-
 app/addons/verifyinstall/base.js                |  2 +-
 app/addons/verifyinstall/routes.js              |  2 +-
 app/addons/verifyinstall/views.js               |  2 +-
 app/app.js                                      | 12 ++--
 app/core/api.js                                 |  2 +-
 app/core/auth.js                                |  6 +-
 app/core/base.js                                | 10 +--
 app/core/layout.js                              | 12 ++--
 app/core/routeObject.js                         | 44 ++++++-------
 app/core/router.js                              | 16 ++---
 app/core/store.js                               |  2 +-
 app/core/utils.js                               | 16 ++---
 app/helpers.js                                  |  6 +-
 app/initialize.js.underscore                    |  4 +-
 app/load_addons.js.underscore                   |  2 +-
 app/main.js                                     |  4 +-
 tasks/addon/root/base.js.underscore             |  2 +-
 tasks/addon/root/routes.js.underscore           |  4 +-
 tasks/addon/template.js                         |  2 +-
 tasks/fauxton.js                                | 34 +++++-----
 tasks/helper.js                                 |  2 +-
 .../custom-commands/clickWhenVisible.js         |  2 +-
 .../custom-commands/deleteDocument.js           |  4 +-
 82 files changed, 384 insertions(+), 384 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 22997d1..1bbcd94 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -18,7 +18,7 @@
 /*jslint node: true */
 "use strict";
 
-module.exports = function(grunt) {
+module.exports = function (grunt) {
   var helper = require('./tasks/helper').init(grunt),
   _ = grunt.util._,
   fs = require('fs');
@@ -41,7 +41,7 @@ module.exports = function(grunt) {
 
   var cleanableAddons =  function () {
     var theListToClean = [];
-    helper.processAddons(function(addon) {
+    helper.processAddons(function (addon) {
       // Only clean addons that are included from a local dir
       if (addon.path) {
         theListToClean.push("app/addons/" + addon.name);
@@ -51,14 +51,14 @@ module.exports = function(grunt) {
     return theListToClean;
   }();
 
-  var cleanable = function() {
+  var cleanable = function () {
     // Whitelist files and directories to be cleaned
     // You'll always want to clean these two directories
     // Now find the external addons you have and add them for cleaning up
     return _.union(["dist/", "app/load_addons.js"], cleanableAddons);
   }();
 
-  var assets = function() {
+  var assets = function () {
     // Base assets
     var theAssets = {
       less:{
@@ -73,11 +73,11 @@ module.exports = function(grunt) {
       // fauxton.css should load first
       css: ["assets/css/*.css", "dist/debug/css/fauxton.css"]
     };
-    helper.processAddons(function(addon) {
+    helper.processAddons(function (addon) {
       // Less files from addons
       var root = addon.path || "app/addons/" + addon.name;
       var lessPath = root + "/assets/less";
-      if(fs.existsSync(lessPath)) {
+      if (fs.existsSync(lessPath)) {
         // .less files exist for this addon
         theAssets.less.paths.push(lessPath);
         theAssets.less.files["dist/debug/css/" + addon.name + ".css"] =
@@ -87,18 +87,18 @@ module.exports = function(grunt) {
       // Images
       root = addon.path || "app/addons/" + addon.name;
       var imgPath = root + "/assets/img";
-      if(fs.existsSync(imgPath)) {
+      if (fs.existsSync(imgPath)) {
         theAssets.img.push(imgPath + "/**");
       }
       var fontsPath = root + "/assets/fonts";
-      if(fs.existsSync(fontsPath)) {
+      if (fs.existsSync(fontsPath)) {
         theAssets.fonts.push(fontsPath + "/**");
       }
     });
     return theAssets;
   }();
 
-  var templateSettings = function() {
+  var templateSettings = function () {
     var defaultSettings = {
      "development": {
         "src": "assets/index.underscore",
@@ -159,7 +159,7 @@ module.exports = function(grunt) {
 
     // The jshint option for scripturl is set to lax, because the anchor
     // override inside main.js needs to test for them so as to not accidentally
-    // route. Settings expr true so we can do `mightBeNullObject && mightBeNullObject.coolFunction()`
+    // route. Settings expr true so we can do `mightBeNullObject && mightBeNullObject.coolfunction()`
     jshint: {
       all: ['app/**/*.js', 'Gruntfile.js', "!app/**/assets/js/*.js", "!app/**/*.jsx"],
       options: {
@@ -211,7 +211,7 @@ module.exports = function(grunt) {
     jst: {
       compile: {
         options: {
-          processContent: function(src) {
+          processContent: function (src) {
             return src.replace(/<!--[\s\S]*?-->/gm, '');
           }
         },
@@ -464,7 +464,7 @@ module.exports = function(grunt) {
   grunt.initConfig(config);
 
   // on watch events configure jshint:all to only run on changed file
-  grunt.event.on('watch', function(action, filepath) {
+  grunt.event.on('watch', function (action, filepath) {
     if (!!filepath.match(/.js$/) && filepath.indexOf('test.config.js') === -1) {
       grunt.config(['jshint', 'all'], filepath);
     }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/activetasks/views.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/views.js b/app/addons/activetasks/views.js
index 053e252..dadb9e0 100644
--- a/app/addons/activetasks/views.js
+++ b/app/addons/activetasks/views.js
@@ -137,7 +137,7 @@ function (app, FauxtonAPI, ActiveTasks) {
       this.$('.task-tabs').find('li').eq(0).addClass('active');
     },
 
-    changePollInterval: function(e) {
+    changePollInterval: function (e) {
       var range = this.$(e.currentTarget).val();
       this.$('label[for="pollingRange"] span').text(range);
       pollingInfo.rate = range;
@@ -149,7 +149,7 @@ function (app, FauxtonAPI, ActiveTasks) {
       clearInterval(pollingInfo.intervalId);
     },
 
-    requestByType: function(e) {
+    requestByType: function (e) {
       var currentTarget = e.currentTarget,
           filter = this.$(currentTarget).attr('data-type');
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/auth/base.js
----------------------------------------------------------------------
diff --git a/app/addons/auth/base.js b/app/addons/auth/base.js
index d1f6d65..8f4b1b3 100644
--- a/app/addons/auth/base.js
+++ b/app/addons/auth/base.js
@@ -16,13 +16,13 @@ define([
   "addons/auth/routes"
 ],
 
-function(app, FauxtonAPI, Auth) {
+function (app, FauxtonAPI, Auth) {
 
   Auth.session = new Auth.Session();
   FauxtonAPI.setSession(Auth.session);
   app.session = Auth.session;
 
-  Auth.initialize = function() {
+  Auth.initialize = function () {
 
     FauxtonAPI.addHeaderLink({
       id: "auth",
@@ -85,7 +85,7 @@ function(app, FauxtonAPI, Auth) {
       if (session.isAdminParty()) {
         session.trigger("authenticated");
         deferred.resolve();
-      } else if(session.matchesRoles(roles)) {
+      } else if (session.matchesRoles(roles)) {
         session.trigger("authenticated");
         deferred.resolve();
       } else {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/auth/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/auth/resources.js b/app/addons/auth/resources.js
index b8fc9b0..3b6d295 100644
--- a/app/addons/auth/resources.js
+++ b/app/addons/auth/resources.js
@@ -33,10 +33,10 @@ function (app, FauxtonAPI, CouchdbSession) {
   };
 
   var Admin = Backbone.Model.extend({
-    url: function() {
+    url: function () {
       return app.host + '/_config/admins/' + this.get("name");
     },
-    isNew: function() { return false; },
+    isNew: function () { return false; },
 
     sync: function (method, model, options) {
       var params = {
@@ -259,7 +259,7 @@ function (app, FauxtonAPI, CouchdbSession) {
       });
     },
 
-    afterRender: function() {
+    afterRender: function () {
       $("#username").focus();
     }
   });
@@ -283,7 +283,7 @@ function (app, FauxtonAPI, CouchdbSession) {
           urlBack = this.urlBack,
           promise = this.model.login(username, password);
 
-      promise.then(function() {
+      promise.then(function () {
         FauxtonAPI.addNotification({msg:  FauxtonAPI.session.messages.loggedIn });
 
         if (urlBack) {
@@ -296,7 +296,7 @@ function (app, FauxtonAPI, CouchdbSession) {
       promise.fail(errorHandler);
     },
 
-    afterRender: function() {
+    afterRender: function () {
       $("#username").focus();
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/auth/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/auth/routes.js b/app/addons/auth/routes.js
index 785a492..b6ea57d 100644
--- a/app/addons/auth/routes.js
+++ b/app/addons/auth/routes.js
@@ -16,7 +16,7 @@ define([
        "addons/auth/resources"
 ],
 
-function(app, FauxtonAPI, Auth) {
+function (app, FauxtonAPI, Auth) {
   var authRouteObject = FauxtonAPI.RouteObject.extend({
     layout: 'one_pane',
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/compaction/base.js
----------------------------------------------------------------------
diff --git a/app/addons/compaction/base.js b/app/addons/compaction/base.js
index d320cd2..b82852a 100644
--- a/app/addons/compaction/base.js
+++ b/app/addons/compaction/base.js
@@ -16,9 +16,9 @@ define([
   "addons/compaction/routes"
 ],
 
-function(app, FauxtonAPI, Compaction) {
+function (app, FauxtonAPI, Compaction) {
 
-  Compaction.initialize = function() {
+  Compaction.initialize = function () {
     FauxtonAPI.registerExtension('docLinks', {
       title: "Compact & Clean",
       url: "compact",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/compaction/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/compaction/routes.js b/app/addons/compaction/routes.js
index 6d39524..295765e 100644
--- a/app/addons/compaction/routes.js
+++ b/app/addons/compaction/routes.js
@@ -20,7 +20,7 @@ define([
   'addons/documents/shared-routes'
 ],
 
-function(app, FauxtonAPI, Compaction, Databases, BaseRoute) {
+function (app, FauxtonAPI, Compaction, Databases, BaseRoute) {
 
   var CompactionRouteObject = BaseRoute.extend({
     routes: {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/components/tests/beautifySpec.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/components/tests/beautifySpec.react.jsx b/app/addons/components/tests/beautifySpec.react.jsx
index 7315986..c7eefdf 100644
--- a/app/addons/components/tests/beautifySpec.react.jsx
+++ b/app/addons/components/tests/beautifySpec.react.jsx
@@ -57,7 +57,7 @@ define([
       beautifyEl = TestUtils.renderIntoDocument(
         <ReactComponents.Beautify
           beautifiedCode={beautifiedCode}
-          code={'function () { console.log("hello"); }'}
+          code={'function() { console.log("hello"); }'}
           noOfLines={1}/>,
         container
       );

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/config/base.js
----------------------------------------------------------------------
diff --git a/app/addons/config/base.js b/app/addons/config/base.js
index 8362cb5..6c59e43 100644
--- a/app/addons/config/base.js
+++ b/app/addons/config/base.js
@@ -19,8 +19,8 @@ define([
   "addons/config/routes"
 ],
 
-function(app, FauxtonAPI, Config) {
-  Config.initialize = function() {
+function (app, FauxtonAPI, Config) {
+  Config.initialize = function () {
     FauxtonAPI.addHeaderLink({title: "Config", href: "#_config", icon:"fonticon-cog", className: 'config'});
   };
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/config/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/config/routes.js b/app/addons/config/routes.js
index 85b8ff6..f2cf2d0 100644
--- a/app/addons/config/routes.js
+++ b/app/addons/config/routes.js
@@ -18,7 +18,7 @@ define([
   'addons/cors/views'
 ],
 
-function(app, FauxtonAPI, Config, Views, CORS) {
+function (app, FauxtonAPI, Config, Views, CORS) {
 
   var ConfigRouteObject = FauxtonAPI.RouteObject.extend({
     layout: 'with_tabs_sidebar',
@@ -66,7 +66,7 @@ function(app, FauxtonAPI, Config, Views, CORS) {
       this.sidebar.setSelectedTab("main");
     },
 
-    configCORS: function() {
+    configCORS: function () {
       this.removeView('#right-header');
       this.newSection = this.setView('#dashboard-content', new CORS.Views.CORSWrapper({
         cors: this.cors,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/config/views.js
----------------------------------------------------------------------
diff --git a/app/addons/config/views.js b/app/addons/config/views.js
index f04aec8..35318e3 100644
--- a/app/addons/config/views.js
+++ b/app/addons/config/views.js
@@ -16,7 +16,7 @@ define([
   "addons/config/resources",
   "addons/fauxton/components"
 ],
-function(app, FauxtonAPI, Config, Components) {
+function (app, FauxtonAPI, Config, Components) {
   var Views = {};
 
   Views.TableRow = FauxtonAPI.View.extend({
@@ -111,15 +111,15 @@ function(app, FauxtonAPI, Config, Components) {
   Views.Table = FauxtonAPI.View.extend({
     template: "addons/config/templates/dashboard",
 
-    initialize: function() {
+    initialize: function () {
       this.listenTo(FauxtonAPI.Events, "config:newSection", this.render);
       this.listenTo(FauxtonAPI.Events, "config:rerender", this.render);
     },
 
-    beforeRender: function() {
+    beforeRender: function () {
       var collection = this.collection;
 
-      this.collection.each(function(config) {
+      this.collection.each(function (config) {
         _.each(config.get("options"), function (option, index) {
           this.insertView("table.config tbody", new Views.TableRow({
             collection: collection,
@@ -134,7 +134,7 @@ function(app, FauxtonAPI, Config, Components) {
       }, this);
     },
 
-    establish: function() {
+    establish: function () {
       return [this.collection.fetch()];
     }
   });
@@ -257,7 +257,7 @@ function(app, FauxtonAPI, Config, Components) {
       this.$('li').removeClass('active');
       this.$('a[data-type-select="' + this.selectedTab + '"]').parent("li").addClass('active');
     },
-    afterRender: function() {
+    afterRender: function () {
       this.setSelectedTab(this.selectedTab);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/cors/actions.js
----------------------------------------------------------------------
diff --git a/app/addons/cors/actions.js b/app/addons/cors/actions.js
index bb9e25b..071f2ed 100644
--- a/app/addons/cors/actions.js
+++ b/app/addons/cors/actions.js
@@ -114,7 +114,7 @@ define([
       },
 
       sanitizeOrigins: function (origins) {
-        if(_.isEmpty(origins)) {
+        if (_.isEmpty(origins)) {
           return '';
         }
 
@@ -125,7 +125,7 @@ define([
         var promises = [];
         promises.push(this.saveEnableCorsToHttpd(options.enableCors));
 
-        if(options.enableCors) {
+        if (options.enableCors) {
           promises.push(this.saveCorsOrigins(this.sanitizeOrigins(options.origins)));
           promises.push(this.saveCorsCredentials());
           promises.push(this.saveCorsHeaders());

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/cors/base.js
----------------------------------------------------------------------
diff --git a/app/addons/cors/base.js b/app/addons/cors/base.js
index 300b5b7..f4b9fac 100644
--- a/app/addons/cors/base.js
+++ b/app/addons/cors/base.js
@@ -18,7 +18,7 @@ define([
 
 function (app, FauxtonAPI, CORS) {
 
-  CORS.initialize = function() {};
+  CORS.initialize = function () {};
 
   return CORS;
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/cors/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/cors/components.react.jsx b/app/addons/cors/components.react.jsx
index 357810c..9ea15d9 100644
--- a/app/addons/cors/components.react.jsx
+++ b/app/addons/cors/components.react.jsx
@@ -237,7 +237,7 @@ define([
       corsStore.on('change', this.onChange, this);
     },
 
-    componentWillUnmount: function() {
+    componentWillUnmount: function () {
       corsStore.off('change', this.onChange);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/cors/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/cors/resources.js b/app/addons/cors/resources.js
index 867c356..640db24 100644
--- a/app/addons/cors/resources.js
+++ b/app/addons/cors/resources.js
@@ -20,7 +20,7 @@ function (app, FauxtonAPI) {
 
 
   CORS.Config = FauxtonAPI.Model.extend({
-    url: function() {
+    url: function () {
       return app.host + '/_config/cors';
     },
 
@@ -37,7 +37,7 @@ function (app, FauxtonAPI) {
   });
 
   CORS.Httpd = FauxtonAPI.Model.extend({
-    url: function() {
+    url: function () {
       return app.host + '/_config/httpd';
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/databases/base.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/base.js b/app/addons/databases/base.js
index e5aafd6..ad07c42 100644
--- a/app/addons/databases/base.js
+++ b/app/addons/databases/base.js
@@ -22,7 +22,7 @@ define([
 
 ],
 
-function(app, FauxtonAPI, Databases, Views) {
+function (app, FauxtonAPI, Databases, Views) {
   Databases.Views = Views;
 
   Databases.initialize = function () {
@@ -35,7 +35,7 @@ function(app, FauxtonAPI, Databases, Views) {
   };
 
   // Utility functions
-  Databases.databaseUrl = function(database) {
+  Databases.databaseUrl = function (database) {
     var name = _.isObject(database) ? database.id : database,
         dbname = app.utils.safeURLName(name);
 
@@ -57,7 +57,7 @@ function(app, FauxtonAPI, Databases, Views) {
   });
 
   FauxtonAPI.registerUrls('allDBs', {
-    app: function() {
+    app: function () {
       return '_all_dbs' ;
     }
   });
@@ -67,7 +67,7 @@ function(app, FauxtonAPI, Databases, Views) {
       return window.location.origin + '/' + database;
     },
     app: function (database) {
-      return  '/database/' + database;
+      return '/database/' + database;
     }
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/databases/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/resources.js b/app/addons/databases/resources.js
index 39e05a3..58b265f 100644
--- a/app/addons/databases/resources.js
+++ b/app/addons/databases/resources.js
@@ -19,13 +19,13 @@ define([
   "addons/documents/resources"
 ],
 
-function(app, FauxtonAPI, Documents) {
+function (app, FauxtonAPI, Documents) {
   var Databases = FauxtonAPI.addon();
 
   Databases.DocLimit = 100;
 
   Databases.Model = FauxtonAPI.Model.extend({
-    initialize: function(options) {
+    initialize: function (options) {
       this.status = new Databases.Status({
         database: this
       });
@@ -35,7 +35,7 @@ function(app, FauxtonAPI, Documents) {
       return FauxtonAPI.constants.DOC_URLS.ALL_DBS;
     },
 
-    buildAllDocs: function(params) {
+    buildAllDocs: function (params) {
       this.allDocs = new Documents.AllDocs(null, {
         database: this,
         params: params
@@ -44,7 +44,7 @@ function(app, FauxtonAPI, Documents) {
       return this.allDocs;
     },
 
-    isNew: function() {
+    isNew: function () {
       // Databases are never new, to make Backbone do a PUT
       return false;
     },
@@ -53,7 +53,7 @@ function(app, FauxtonAPI, Documents) {
       return (/^_/).test(this.id);
     },
 
-    url: function(context) {
+    url: function (context) {
       if (context === "index") {
         return "/database/" + this.safeID() + "/_all_docs";
       } else if (context === "web-index") {
@@ -70,10 +70,10 @@ function(app, FauxtonAPI, Documents) {
         return app.host + "/" + this.safeID();
       }
     },
-    safeName: function() {
+    safeName: function () {
       return app.utils.safeURLName(this.get("name"));
     },
-    safeID: function() {
+    safeID: function () {
       return app.utils.safeURLName(this.id);
     },
     buildChanges: function (params) {
@@ -92,11 +92,11 @@ function(app, FauxtonAPI, Documents) {
 
   Databases.Changes = FauxtonAPI.Collection.extend({
 
-    initialize: function(options) {
+    initialize: function (options) {
       this.database = options.database;
       this.params = options.params;
     },
-    documentation: function() {
+    documentation: function () {
       return FauxtonAPI.constants.DOC_URLS.CHANGES;
     },
     url: function (context) {
@@ -117,27 +117,27 @@ function(app, FauxtonAPI, Documents) {
   });
 
   Databases.Status = FauxtonAPI.Model.extend({
-    url: function() {
+    url: function () {
       return app.host + "/" + this.database.safeID();
     },
 
-    initialize: function(options) {
+    initialize: function (options) {
       this.database = options.database;
     },
 
-    numDocs: function() {
+    numDocs: function () {
       return this.get("doc_count");
     },
 
-    numDeletedDocs: function() {
+    numDeletedDocs: function () {
       return this.get("doc_del_count");
     },
 
-    isGraveYard: function() {
+    isGraveYard: function () {
       return this.numDeletedDocs() > this.numDocs();
     },
 
-    updateSeq: function(full) {
+    updateSeq: function (full) {
       var updateSeq = this.get("update_seq");
       if (full || (typeof(updateSeq) === 'number')) {
         return updateSeq;
@@ -178,7 +178,7 @@ function(app, FauxtonAPI, Documents) {
       expires: 60
     },
 
-    url: function(context) {
+    url: function (context) {
       if (context === "apiurl") {
         return window.location.origin + "/_all_dbs";
       } else {
@@ -186,9 +186,9 @@ function(app, FauxtonAPI, Documents) {
       }
     },
 
-    parse: function(resp) {
+    parse: function (resp) {
       // TODO: pagination!
-      return _.map(resp, function(database) {
+      return _.map(resp, function (database) {
         return {
           id: app.utils.safeURLName(database),
           name: database

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/databases/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/routes.js b/app/addons/databases/routes.js
index 143b89c..53cf52b 100644
--- a/app/addons/databases/routes.js
+++ b/app/addons/databases/routes.js
@@ -42,11 +42,11 @@ function (app, FauxtonAPI, Databases, Views, Components) {
 
     selectedHeader: "Databases",
 
-    initialize: function() {
+    initialize: function () {
       this.databases = new Databases.List();
     },
 
-    allDatabases: function() {
+    allDatabases: function () {
       var params = app.getParams(),
           dbPage = params.page ? parseInt(params.page, 10) : 1,
           perPage = FauxtonAPI.constants.MISC.DEFAULT_PAGE_SIZE,
@@ -81,7 +81,7 @@ function (app, FauxtonAPI, Databases, Views, Components) {
       return [this.databases.url("apiurl"), this.databases.documentation()];
     },
 
-    establish: function() {
+    establish: function () {
       return [this.databases.fetch({ cache: false })];
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/databases/views.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/views.js b/app/addons/databases/views.js
index 591e9a8..eedf358 100644
--- a/app/addons/databases/views.js
+++ b/app/addons/databases/views.js
@@ -17,7 +17,7 @@ define([
   'addons/databases/resources'
 ],
 
-function(app, Components, FauxtonAPI, Databases) {
+function (app, Components, FauxtonAPI, Databases) {
 
   var Views = {};
 
@@ -79,9 +79,9 @@ function(app, Components, FauxtonAPI, Databases) {
       var currentDBs = this.paginated();
       var deferred = FauxtonAPI.Deferred();
 
-      FauxtonAPI.when(currentDBs.map(function(database) {
+      FauxtonAPI.when(currentDBs.map(function (database) {
         return database.status.fetchOnce();
-      })).always(function(resp) {
+      })).always(function (resp) {
         //make this always so that even if a user is not allowed access to a database
         //they will still see a list of all databases
         deferred.resolve();
@@ -96,7 +96,7 @@ function(app, Components, FauxtonAPI, Databases) {
     },
 
     beforeRender: function () {
-      _.each(this.paginated(), function(database) {
+      _.each(this.paginated(), function (database) {
         this.insertView('table.databases tbody', new Views.Item({
           model: database
         }));

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/base.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/base.js b/app/addons/documents/base.js
index bbdd90f..776f514 100644
--- a/app/addons/documents/base.js
+++ b/app/addons/documents/base.js
@@ -19,7 +19,7 @@ define([
   "addons/documents/routes"
 ],
 
-function(app, FauxtonAPI, Documents) {
+function (app, FauxtonAPI, Documents) {
 
   FauxtonAPI.registerUrls( 'allDocs', {
     server: function (id, query) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/header/header.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documents/header/header.react.jsx b/app/addons/documents/header/header.react.jsx
index efdf75f..5906974 100644
--- a/app/addons/documents/header/header.react.jsx
+++ b/app/addons/documents/header/header.react.jsx
@@ -42,7 +42,7 @@ function (app, FauxtonAPI, React, Stores, Actions, ReactComponents) {
       bulkDocumentHeaderStore.on('change', this.onChange, this);
     },
 
-    componentWillUnmount: function() {
+    componentWillUnmount: function () {
       bulkDocumentHeaderStore.off('change', this.onChange);
     },
 
@@ -158,7 +158,7 @@ function (app, FauxtonAPI, React, Stores, Actions, ReactComponents) {
       headerBarStore.on('change', this.onChange, this);
     },
 
-    componentWillUnmount: function() {
+    componentWillUnmount: function () {
       headerBarStore.off('change', this.onChange);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/helpers.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/helpers.js b/app/addons/documents/helpers.js
index ad1acef..9197bf8 100644
--- a/app/addons/documents/helpers.js
+++ b/app/addons/documents/helpers.js
@@ -12,7 +12,7 @@
 
 define([
   'api'
-], function(FauxtonAPI) {
+], function (FauxtonAPI) {
 
   var Helpers = {};
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/index-editor/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-editor/components.react.jsx b/app/addons/documents/index-editor/components.react.jsx
index a7c1fcb..01e5153 100644
--- a/app/addons/documents/index-editor/components.react.jsx
+++ b/app/addons/documents/index-editor/components.react.jsx
@@ -127,7 +127,7 @@ function (app, FauxtonAPI, React, Stores, Actions, Components, ReactComponents,
       indexEditorStore.on('change', this.onChange, this);
     },
 
-    componentWillUnmount: function() {
+    componentWillUnmount: function () {
       indexEditorStore.off('change', this.onChange);
     },
 
@@ -218,7 +218,7 @@ function (app, FauxtonAPI, React, Stores, Actions, Components, ReactComponents,
       indexEditorStore.on('change', this.onChange, this);
     },
 
-    componentWillUnmount: function() {
+    componentWillUnmount: function () {
       indexEditorStore.off('change', this.onChange);
     },
 
@@ -294,12 +294,12 @@ function (app, FauxtonAPI, React, Stores, Actions, Components, ReactComponents,
       indexEditorStore.on('change', this.onChange, this);
     },
 
-    componentWillUnmount: function() {
+    componentWillUnmount: function () {
       indexEditorStore.off('change', this.onChange);
     },
 
-    hasValidCode: function() {
-      return _.every(['mapEditor', 'reduceEditor'], function(editorName) {
+    hasValidCode: function () {
+      return _.every(['mapEditor', 'reduceEditor'], function (editorName) {
         if (editorName === 'reduceEditor' && !indexEditorStore.hasCustomReduce()) {
           return true;
         }
@@ -418,11 +418,11 @@ function (app, FauxtonAPI, React, Stores, Actions, Components, ReactComponents,
       };
     },
 
-    componentDidMount: function() {
+    componentDidMount: function () {
       indexEditorStore.on('change', this.onChange, this);
     },
 
-    componentWillUnmount: function() {
+    componentWillUnmount: function () {
       indexEditorStore.off('change', this.onChange);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/index-editor/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-editor/stores.js b/app/addons/documents/index-editor/stores.js
index bfcdf29..9ed952d 100644
--- a/app/addons/documents/index-editor/stores.js
+++ b/app/addons/documents/index-editor/stores.js
@@ -15,13 +15,13 @@ define([
   'addons/documents/index-editor/actiontypes'
 ],
 
-function(FauxtonAPI, ActionTypes) {
+function (FauxtonAPI, ActionTypes) {
   var Stores = {};
 
   Stores.IndexEditorStore = FauxtonAPI.Store.extend({
 
-    defaultMap: 'function(doc) {\n  emit(doc._id, 1);\n}',
-    defaultReduce: 'function(keys, values, rereduce) {\n  if (rereduce) {\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}',
+    defaultMap: 'function (doc) {\n  emit(doc._id, 1);\n}',
+    defaultReduce: 'function (keys, values, rereduce) {\n  if (rereduce) {\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}',
 
     editIndex: function (options) {
       this._database = options.database;
@@ -160,7 +160,7 @@ function(FauxtonAPI, ActionTypes) {
     },
 
     dispatch: function (action) {
-      switch(action.type) {
+      switch (action.type) {
         case ActionTypes.EDIT_INDEX:
           this.editIndex(action.options);
           this.triggerChange();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/pagination/pagination.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documents/pagination/pagination.react.jsx b/app/addons/documents/pagination/pagination.react.jsx
index 75ea0a3..b5729d5 100644
--- a/app/addons/documents/pagination/pagination.react.jsx
+++ b/app/addons/documents/pagination/pagination.react.jsx
@@ -31,11 +31,11 @@ define([
         return this.getStoreState();
       },
 
-      componentDidMount: function() {
+      componentDidMount: function () {
         indexPaginationStore.on('change', this.onChange, this);
       },
 
-      componentWillUnmount: function() {
+      componentWillUnmount: function () {
         indexPaginationStore.off('change', this.onChange);
       },
 
@@ -125,11 +125,11 @@ define([
         return this.getStoreState();
       },
 
-      componentDidMount: function() {
+      componentDidMount: function () {
         indexPaginationStore.on('change', this.onChange, this);
       },
 
-      componentWillUnmount: function() {
+      componentWillUnmount: function () {
         indexPaginationStore.off('change', this.onChange);
       },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/resources.js b/app/addons/documents/resources.js
index 18bb213..880cce1 100644
--- a/app/addons/documents/resources.js
+++ b/app/addons/documents/resources.js
@@ -17,7 +17,7 @@ define([
   'cloudant.pagingcollection'
 ],
 
-function(app, FauxtonAPI, Documents, PagingCollection) {
+function (app, FauxtonAPI, Documents, PagingCollection) {
 
   Documents.QueryParams = (function () {
     var _eachParams = function (params, action) {
@@ -47,7 +47,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
   Documents.DdocInfo = FauxtonAPI.Model.extend({
     idAttribute: "_id",
-    documentation: function() {
+    documentation: function () {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
     initialize: function (_attrs, options) {
@@ -66,19 +66,19 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
     // is a separate route. Alternatively, maybe these should be
     // treated separately. For instance, we could default into the
     // json editor for docs, or into a ddoc specific page.
-    safeID: function() {
+    safeID: function () {
       var ddoc = this.id.replace(/^_design\//, "");
       return "_design/" + app.utils.safeURLName(ddoc);
     }
   });
 
   Documents.NewDoc = Documents.Doc.extend({
-    fetch: function() {
+    fetch: function () {
       var uuid = new FauxtonAPI.UUID();
       var deferred = this.deferred = $.Deferred();
       var that = this;
 
-      uuid.fetch().done(function() {
+      uuid.fetch().done(function () {
         that.set("_id", uuid.next());
         deferred.resolve();
       });
@@ -177,10 +177,10 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
   Documents.IndexCollection = PagingCollection.extend({
     model: Documents.Doc,
-    documentation: function() {
+    documentation: function () {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
-    initialize: function(_models, options) {
+    initialize: function (_models, options) {
       this.database = options.database;
       this.params = _.extend({limit: 20, reduce: false}, options.params);
 
@@ -220,13 +220,13 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       return this.urlRef.apply(this, arguments);
     },
 
-    totalRows: function() {
+    totalRows: function () {
       if (this.params.reduce) { return "unknown_reduce";}
 
       return this.viewMeta.total_rows || "unknown";
     },
 
-    updateSeq: function() {
+    updateSeq: function () {
       if (!this.viewMeta) {
         return false;
       }
@@ -251,7 +251,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       });
     },
 
-    parse: function(resp) {
+    parse: function (resp) {
       var rows = resp.rows;
       this.endTime = new Date().getTime();
       this.requestDuration = (this.endTime - this.startTime);
@@ -259,7 +259,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       return PagingCollection.prototype.parse.apply(this, arguments);
     },
 
-    buildAllDocs: function() {
+    buildAllDocs: function () {
       this.fetch();
     },
 
@@ -270,7 +270,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       return PagingCollection.prototype.fetch.call(this);
     },
 
-    allDocs: function() {
+    allDocs: function () {
       return this.models;
     },
 
@@ -311,10 +311,10 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
   Documents.PouchIndexCollection = PagingCollection.extend({
     model: Documents.ViewRow,
-    documentation: function() {
+    documentation: function () {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
-    initialize: function(_models, options) {
+    initialize: function (_models, options) {
       this.database = options.database;
       this.rows = options.rows;
       this.view = options.view;
@@ -352,7 +352,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
     },
 
-    fetch: function() {
+    fetch: function () {
       var deferred = FauxtonAPI.Deferred();
       this.reset(this.rows, {silent: true});
 
@@ -360,19 +360,19 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       return deferred;
     },
 
-    totalRows: function() {
+    totalRows: function () {
       return this.viewMeta.total_rows || "unknown";
     },
 
-    updateSeq: function() {
+    updateSeq: function () {
       return this.viewMeta.update_seq || false;
     },
 
-    buildAllDocs: function() {
+    buildAllDocs: function () {
       this.fetch();
     },
 
-    allDocs: function() {
+    allDocs: function () {
       return this.models;
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/routes-doc-editor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-doc-editor.js b/app/addons/documents/routes-doc-editor.js
index 296d665..400de43 100644
--- a/app/addons/documents/routes-doc-editor.js
+++ b/app/addons/documents/routes-doc-editor.js
@@ -21,7 +21,7 @@ define([
   "addons/databases/base"
 ],
 
-function(app, FauxtonAPI, Helpers, Documents, DocEditor, Databases) {
+function (app, FauxtonAPI, Helpers, Documents, DocEditor, Databases) {
 
 
   var DocEditorRouteObject = FauxtonAPI.RouteObject.extend({
@@ -29,7 +29,7 @@ function(app, FauxtonAPI, Helpers, Documents, DocEditor, Databases) {
     disableLoader: true,
     selectedHeader: 'Databases',
 
-    initialize: function(route, masterLayout, options) {
+    initialize: function (route, masterLayout, options) {
       this.databaseName = options[0];
       this.docID = options[1] || 'new';
 
@@ -110,7 +110,7 @@ function(app, FauxtonAPI, Helpers, Documents, DocEditor, Databases) {
       });
     },
 
-    apiUrl: function() {
+    apiUrl: function () {
       return [this.doc.url('apiurl'), this.doc.documentation()];
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/routes-documents.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-documents.js b/app/addons/documents/routes-documents.js
index 9920176..0b607de 100644
--- a/app/addons/documents/routes-documents.js
+++ b/app/addons/documents/routes-documents.js
@@ -28,7 +28,7 @@ define([
   'addons/documents/pagination/stores'
 ],
 
-function(app, FauxtonAPI, BaseRoute, Documents, Changes, Index, DocEditor,
+function (app, FauxtonAPI, BaseRoute, Documents, Changes, Index, DocEditor,
         Databases, Resources, Components, PaginationActions, PaginationStores) {
 
 
@@ -126,7 +126,7 @@ function(app, FauxtonAPI, BaseRoute, Documents, Changes, Index, DocEditor,
      * urlParams are what are shown in the url and to the user
      * They are not the same when paginating
      */
-    allDocs: function(databaseName, options) {
+    allDocs: function (databaseName, options) {
       var params = this.createParams(options),
           urlParams = params.urlParams,
           docParams = params.docParams,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes.js b/app/addons/documents/routes.js
index 2b9aec6..0f16d4a 100644
--- a/app/addons/documents/routes.js
+++ b/app/addons/documents/routes.js
@@ -17,7 +17,7 @@ define([
   'addons/documents/routes-index-editor'
 ],
 
-function(Documents, DocumentsRouteObject, docEditor, IndexEditorRouteObject) {
+function (Documents, DocumentsRouteObject, docEditor, IndexEditorRouteObject) {
 
   Documents.RouteObjects = [
     docEditor.DocEditorRouteObject,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/shared-resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-resources.js b/app/addons/documents/shared-resources.js
index 930c600..06306cf 100644
--- a/app/addons/documents/shared-resources.js
+++ b/app/addons/documents/shared-resources.js
@@ -23,17 +23,17 @@ define([
 
   Documents.Doc = FauxtonAPI.Model.extend({
     idAttribute: "_id",
-    documentation: function() {
+    documentation: function () {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
-    url: function(context) {
+    url: function (context) {
       if (context === undefined) {
         context = 'server';
       }
       return FauxtonAPI.urls('document', context, this.getDatabase().safeID(), this.safeID());
     },
 
-    initialize: function(_attrs, options) {
+    initialize: function (_attrs, options) {
       if (this.collection && this.collection.database) {
         this.database = this.collection.database;
       } else if (options.database) {
@@ -43,25 +43,25 @@ define([
 
     // HACK: the doc needs to know about the database, but it may be
     // set directly or indirectly in all docs
-    getDatabase: function() {
+    getDatabase: function () {
       return this.database ? this.database : this.collection.database;
     },
 
-    validate: function(attrs, options) {
+    validate: function (attrs, options) {
       if (this.id && this.id !== attrs._id && this.get('_rev') ) {
         return "Cannot change a documents id.";
       }
     },
 
-    docType: function() {
+    docType: function () {
       return this.id && this.id.match(/^_design\//) ? "design doc" : "doc";
     },
 
-    isEditable: function() {
+    isEditable: function () {
       return this.docType() != "reduction";
     },
 
-    isFromView: function() {
+    isFromView: function () {
       return !this.id;
     },
 
@@ -73,11 +73,11 @@ define([
       }
     },
 
-    isDdoc: function() {
+    isDdoc: function () {
       return this.docType() === "design doc";
     },
 
-    hasViews: function() {
+    hasViews: function () {
       if (!this.isDdoc()) return false;
       var doc = this.get('doc');
       if (doc) {
@@ -92,7 +92,7 @@ define([
       return !!this.get('_attachments');
     },
 
-    getDdocView: function(view) {
+    getDdocView: function (view) {
       if (!this.isDdoc() || !this.hasViews()) {
         return false;
       }
@@ -144,7 +144,7 @@ define([
       return this;
     },
 
-    viewHasReduce: function(viewName) {
+    viewHasReduce: function (viewName) {
       var view = this.getDdocView(viewName);
 
       return view && view.reduce;
@@ -154,16 +154,16 @@ define([
     // is a separate route. Alternatively, maybe these should be
     // treated separately. For instance, we could default into the
     // json editor for docs, or into a ddoc specific page.
-    safeID: function() {
+    safeID: function () {
       if (this.isDdoc()) {
         var ddoc = this.id.replace(/^_design\//, "");
         return "_design/" + app.utils.safeURLName(ddoc);
-      }else{
+      }else {
         return app.utils.safeURLName(this.id);
       }
     },
 
-    destroy: function() {
+    destroy: function () {
       var url = this.url() + "?rev=" + this.get('_rev');
       return $.ajax({
         url: url,
@@ -172,7 +172,7 @@ define([
       });
     },
 
-    parse: function(resp) {
+    parse: function (resp) {
       if (resp.rev) {
         resp._rev = resp.rev;
         delete resp.rev;
@@ -191,7 +191,7 @@ define([
       return resp;
     },
 
-    prettyJSON: function() {
+    prettyJSON: function () {
       var data = this.get("doc") ? this.get("doc") : this.attributes;
 
       return JSON.stringify(data, null, "  ");
@@ -216,7 +216,7 @@ define([
     documentation: function () {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
-    initialize: function(_models, options) {
+    initialize: function (_models, options) {
       this.viewMeta = options.viewMeta;
       this.database = options.database;
       this.params = _.clone(options.params);
@@ -229,7 +229,7 @@ define([
       }
     },
 
-    urlRef: function(context, params) {
+    urlRef: function (context, params) {
       var query = "";
 
       if (params) {
@@ -265,7 +265,7 @@ define([
       });
     },
 
-    totalRows: function() {
+    totalRows: function () {
       return this.viewMeta.total_rows || "unknown";
     },
 
@@ -276,23 +276,23 @@ define([
       }
     },
 
-    updateSeq: function() {
+    updateSeq: function () {
       if (!this.viewMeta) {
         return false;
       }
       return this.viewMeta.update_seq || false;
     },
 
-    parse: function(resp) {
+    parse: function (resp) {
       var rows = resp.rows;
 
       // remove any query errors that may return without doc info
       // important for when querying keys on all docs
-      var cleanRows = _.filter(rows, function(row) {
+      var cleanRows = _.filter(rows, function (row) {
         return row.value;
       });
 
-      resp.rows = _.map(cleanRows, function(row) {
+      resp.rows = _.map(cleanRows, function (row) {
         return {
           _id: row.id,
           _rev: row.value.rev,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/shared-views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-views.js b/app/addons/documents/shared-views.js
index f4595f8..93876a7 100644
--- a/app/addons/documents/shared-views.js
+++ b/app/addons/documents/shared-views.js
@@ -20,7 +20,7 @@ define([
        "addons/databases/resources"
 ],
 
-function(app, FauxtonAPI, Components, Documents, Databases) {
+function (app, FauxtonAPI, Components, Documents, Databases) {
   var Views = {};
 
   Views.Sidebar = FauxtonAPI.View.extend({
@@ -28,7 +28,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
     className: "sidenav",
     tagName: "nav",
 
-    initialize: function(options) {
+    initialize: function (options) {
       this.database = options.database;
 
       if (options.ddocInfo) {
@@ -39,7 +39,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       this.designDocList = [];
     },
 
-    serialize: function() {
+    serialize: function () {
       var docLinks = FauxtonAPI.getExtensions('docLinks'),
           newLinks = FauxtonAPI.getExtensions('sidebar:newLinks'),
           addLinks = FauxtonAPI.getExtensions('sidebar:links'),
@@ -92,7 +92,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       }]);
     },
 
-    beforeRender: function(manage) {
+    beforeRender: function (manage) {
       this.deleteDBModal = this.setView(
         '#delete-db-modal',
         new Views.DeleteDBModal({
@@ -117,7 +117,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       _.each(this.designDocList, function (view) { view.remove(); view = undefined;});
       this.designDocList = [];
 
-      this.collection.each(function(design) {
+      this.collection.each(function (design) {
         if (design.has('doc')) {
           design.collection = this.collection;
           var view = this.insertView(new Views.DdocSidenav({
@@ -163,10 +163,10 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       "click .js-collapse-toggle": "toggleArrow"
     },
 
-    toggleArrow:  function(e) {
+    toggleArrow:  function (e) {
       this.$(e.currentTarget).toggleClass("down");
     },
-    buildIndexList: function(designDocs, info) {
+    buildIndexList: function (designDocs, info) {
       var design = this.model.id.replace(/^_design\//, "");
       var databaseId = this.model.database.id;
 
@@ -181,12 +181,12 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       }));
     },
 
-    serialize: function() {
+    serialize: function () {
       var ddocName = this.model.id.replace(/^_design\//, ""),
           docSafe = app.utils.safeURLName(ddocName),
           databaseName = this.collection.database.safeID();
 
-      return{
+      return {
         designDocMetaUrl: FauxtonAPI.urls('designDocs', 'app', databaseName, docSafe),
         designDoc: ddocName,
         ddoc_clean: docSafe,
@@ -233,7 +233,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
 
     },
 
-    beforeRender: function(manage) {
+    beforeRender: function (manage) {
       var sideBarMenuLinks = [];
 
       sideBarMenuLinks.push({
@@ -252,7 +252,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
     template: "addons/documents/templates/index_menu_item",
     tagName: 'li',
 
-    initialize: function(options) {
+    initialize: function (options) {
       this.index = options.index;
       this.ddoc = options.ddoc;
       this.database = options.database;
@@ -266,7 +266,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       };
     },
 
-    serialize: function() {
+    serialize: function () {
       return {
         icon: this.indexTypeMap[this.selector].icon,
         urlFolder: this.indexTypeMap[this.selector].urlFolder,
@@ -281,7 +281,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       };
     },
 
-    afterRender: function() {
+    afterRender: function () {
       if (this.selected) {
         $(".sidenav ul.nav-list li").removeClass("active");
         this.$el.addClass("active");

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/tests/changes.storesSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/changes.storesSpec.js b/app/addons/documents/tests/changes.storesSpec.js
index 9bcc023..36b313e 100644
--- a/app/addons/documents/tests/changes.storesSpec.js
+++ b/app/addons/documents/tests/changes.storesSpec.js
@@ -29,13 +29,13 @@ define([
       Stores.changesStore.reset();
     });
 
-    it('toggleTabVisibility() changes state in store', function() {
+    it('toggleTabVisibility() changes state in store', function () {
       assert.ok(Stores.changesStore.isTabVisible() === false);
       Stores.changesStore.toggleTabVisibility();
       assert.ok(Stores.changesStore.isTabVisible() === true);
     });
 
-    it('reset() changes tab visibility to hidden', function() {
+    it('reset() changes tab visibility to hidden', function () {
       Stores.changesStore.toggleTabVisibility();
       Stores.changesStore.reset();
       assert.ok(Stores.changesStore.isTabVisible() === false);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/tests/resourcesSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/resourcesSpec.js b/app/addons/documents/tests/resourcesSpec.js
index 1b467c9..ad480f2 100644
--- a/app/addons/documents/tests/resourcesSpec.js
+++ b/app/addons/documents/tests/resourcesSpec.js
@@ -88,16 +88,16 @@ define([
     });
   });
 
-  describe('QueryParams', function() {
-    describe('parse', function() {
-      it('should not parse arbitrary parameters', function() {
+  describe('QueryParams', function () {
+    describe('parse', function () {
+      it('should not parse arbitrary parameters', function () {
         var params = {"foo": "[1]]"};
         var result = Models.QueryParams.parse(params);
 
         assert.deepEqual(result, params);
       });
 
-      it('parses startkey, endkey', function() {
+      it('parses startkey, endkey', function () {
         var params = {
           "startkey":"[\"a\",\"b\"]",
           "endkey":"[\"c\",\"d\"]"
@@ -110,7 +110,7 @@ define([
         });
       });
 
-      it('parses key', function() {
+      it('parses key', function () {
         var params = {
           "key":"[1,2]"
         };
@@ -119,7 +119,7 @@ define([
         assert.deepEqual(result, {"key": [1, 2]});
       });
 
-      it('does not modify input', function() {
+      it('does not modify input', function () {
         var params = {
           "key":"[\"a\",\"b\"]"
         };
@@ -130,15 +130,15 @@ define([
       });
     });
 
-    describe('stringify', function() {
-      it('should not stringify arbitrary parameters', function() {
+    describe('stringify', function () {
+      it('should not stringify arbitrary parameters', function () {
         var params = {"foo": [1, 2, 3]};
         var result = Models.QueryParams.stringify(params);
 
         assert.deepEqual(result, params);
       });
 
-      it('stringifies startkey, endkey', function() {
+      it('stringifies startkey, endkey', function () {
         var params = {
           "startkey": ["a", "b"],
           "endkey": ["c", "d"]
@@ -152,14 +152,14 @@ define([
         });
       });
 
-      it('stringifies key', function() {
+      it('stringifies key', function () {
         var params = {"key":[ "a", "b"]};
         var result = Models.QueryParams.stringify(params);
 
         assert.deepEqual(result, { "key": "[\"a\",\"b\"]" });
       });
 
-      it('does not modify input', function() {
+      it('does not modify input', function () {
         var params = {"key": ["a", "b"]};
         var clone = _.clone(params);
         var result = Models.QueryParams.stringify(params);
@@ -167,7 +167,7 @@ define([
         assert.deepEqual(params, clone);
       });
 
-      it('is symmetrical with parse', function() {
+      it('is symmetrical with parse', function () {
         var params = {
           "startkey": ["a", "b"],
           "endkey": ["c", "d"],

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/tests/storesSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/storesSpec.js b/app/addons/documents/tests/storesSpec.js
index 492213c..4a042ed 100644
--- a/app/addons/documents/tests/storesSpec.js
+++ b/app/addons/documents/tests/storesSpec.js
@@ -48,7 +48,7 @@ define([
         });
 
         it('returns default map', function () {
-          assert.equal(store.getMap(), 'function(doc) {\n  emit(doc._id, 1);\n}');
+          assert.equal(store.getMap(), 'function (doc) {\n  emit(doc._id, 1);\n}');
         });
 
         it('Edit Index as title', function () {
@@ -207,7 +207,7 @@ define([
             type: ActionTypes.SELECT_REDUCE_CHANGE,
             reduceSelectedOption: 'CUSTOM'
           });
-          assert.equal(store.getReduce(), 'function(keys, values, rereduce) {\n  if (rereduce) {\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}');
+          assert.equal(store.getReduce(), 'function (keys, values, rereduce) {\n  if (rereduce) {\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}');
         });
       });
     });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/views-changes.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-changes.js b/app/addons/documents/views-changes.js
index fd56412..416270d 100644
--- a/app/addons/documents/views-changes.js
+++ b/app/addons/documents/views-changes.js
@@ -21,7 +21,7 @@ define([
   'addons/documents/changes/actions'
 ],
 
-function(app, FauxtonAPI, Components, Changes, ChangesActions) {
+function (app, FauxtonAPI, Components, Changes, ChangesActions) {
 
   var Views = {};
 
@@ -52,7 +52,7 @@ function(app, FauxtonAPI, Components, Changes, ChangesActions) {
       Changes.renderChanges(this.el);
     },
 
-    establish: function() {
+    establish: function () {
       return [this.model.changes.fetchOnce({ prefill: true })];
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/views-doceditor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-doceditor.js b/app/addons/documents/views-doceditor.js
index 9cc767e..3ac3554 100644
--- a/app/addons/documents/views-doceditor.js
+++ b/app/addons/documents/views-doceditor.js
@@ -304,7 +304,7 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
             clear: true
           });
         });
-      } else if(this.model.validationError && this.model.validationError === 'Cannot change a documents id.') {
+      } else if (this.model.validationError && this.model.validationError === 'Cannot change a documents id.') {
         FauxtonAPI.addNotification({
           msg: 'Cannot save. Cannot change a documents _id, try Clone Document instead!',
           type: 'error',
@@ -582,8 +582,8 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
     afterRender: function () {
       var that = this;
       this.$('.modal').on('hide', function (e) {
-        if(that.subEditor.edited) {
-          if(!confirm("Close without saving changes?")) {
+        if (that.subEditor.edited) {
+          if (!confirm("Close without saving changes?")) {
             e.preventDefault();
             return;
           }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/views-queryoptions.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-queryoptions.js b/app/addons/documents/views-queryoptions.js
index c9d1894..3eb8eef 100644
--- a/app/addons/documents/views-queryoptions.js
+++ b/app/addons/documents/views-queryoptions.js
@@ -408,7 +408,7 @@ define([
       parseJSON: function (value) {
         try {
           return JSON.parse(value);
-        } catch(e) {
+        } catch (e) {
           return undefined;
         }
       },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index b7a2257..8685db7 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -76,7 +76,7 @@ function (app, FauxtonAPI, Components, Documents,
       'click .toggle-select-menu': 'selectAllMenu'
     },
 
-    initialize: function(options) {
+    initialize: function (options) {
       this.database = options.database;
       this.params = options.params;
 
@@ -97,53 +97,53 @@ function (app, FauxtonAPI, Components, Documents,
       }));
     },
 
-    afterRender: function() {
+    afterRender: function () {
       this.toggleQueryOptionsHeader(this.isHidden);
     },
 
-    cleanup: function() {
+    cleanup: function () {
       FauxtonAPI.Events.unbind('success:bulkDelete');
     },
 
-    selectAllMenu: function(e) {
+    selectAllMenu: function (e) {
       FauxtonAPI.triggerRouteEvent("toggleSelectHeader");
       FauxtonAPI.Events.trigger("documents:showSelectAll", this.selectVisible);
     },
 
     // updates the API bar when the route changes
-    updateApiUrl: function(api) {
+    updateApiUrl: function (api) {
       this.apiBar && this.apiBar.update(api);
     },
 
     // these are similar, but different! resetQueryOptions() completely resets the settings then overlays the new ones;
     // updateQueryOptions() just updates the existing settings with whatever is specified. Between them, the
-    resetQueryOptions: function(options) {
+    resetQueryOptions: function (options) {
       this.queryOptions.resetQueryOptions(options);
     },
 
-    updateQueryOptions: function(options) {
+    updateQueryOptions: function (options) {
       this.queryOptions.updateQueryOptions(options);
     },
 
-    hideQueryOptions: function() {
+    hideQueryOptions: function () {
       this.isHidden = true;
       if (this.hasRendered) {
         this.toggleQueryOptionsHeader(this.isHidden);
       }
     },
 
-    showQueryOptions: function() {
+    showQueryOptions: function () {
       this.isHidden = false;
       if (this.hasRendered) {
         this.toggleQueryOptionsHeader(this.isHidden);
       }
     },
 
-    toggleQueryOptionsHeader: function(hide) {
+    toggleQueryOptionsHeader: function (hide) {
       $("#header-query-options").toggleClass("hide", hide);
     },
 
-    serialize: function() {
+    serialize: function () {
       return {
         database: this.database.get('id')
       };
@@ -170,7 +170,7 @@ function (app, FauxtonAPI, Components, Documents,
       this.showModal();
     },
 
-    cleanup: function() {
+    cleanup: function () {
       FauxtonAPI.Events.off('database:delete', this.showDeleteDatabase);
     },
 
@@ -236,13 +236,13 @@ function (app, FauxtonAPI, Components, Documents,
       "dblclick .doc-item": "edit"
     },
 
-    attributes: function() {
+    attributes: function () {
       return {
         "data-id": this.model.id
       };
     },
 
-    serialize: function() {
+    serialize: function () {
       return {
         docIdentifier: this.model.isReducedShown() ? this.model.get('key') : this.model.get('_id'),
         doc: this.model,
@@ -257,11 +257,11 @@ function (app, FauxtonAPI, Components, Documents,
       }, this);
     },
 
-    establish: function() {
+    establish: function () {
       return [this.model.fetch()];
     },
 
-    edit: function(event) {
+    edit: function (event) {
       event.preventDefault();
       if (!this.model.isReducedShown()) {
         FauxtonAPI.navigate(this.model.url('app'));
@@ -361,7 +361,7 @@ function (app, FauxtonAPI, Components, Documents,
       });
     },
 
-    establish: function() {
+    establish: function () {
       if (this.newView) { return null; }
 
       return this.collection.fetch({reset: true}).then(function () {
@@ -421,7 +421,7 @@ function (app, FauxtonAPI, Components, Documents,
       });
     },
 
-    serialize: function() {
+    serialize: function () {
       return {
         endOfResults: !PaginationStores.indexPaginationStore.canShowNext()
       };
@@ -437,7 +437,7 @@ function (app, FauxtonAPI, Components, Documents,
       this.render();
     },
 
-    bulkDelete: function() {
+    bulkDelete: function () {
       var that = this,
           documentsLength = this.bulkDeleteDocsCollection.length,
           msg;
@@ -466,14 +466,14 @@ function (app, FauxtonAPI, Components, Documents,
       this.rows = {};
     },
 
-    beforeRender: function() {
+    beforeRender: function () {
       var docs;
 
       this.removeNestedViews();
 
       docs = this.expandDocs ? this.collection : this.collection.simple();
 
-      docs.each(function(doc) {
+      docs.each(function (doc) {
         var isChecked;
         if (this.bulkDeleteDocsCollection) {
           isChecked = this.bulkDeleteDocsCollection.get(doc.id);
@@ -555,7 +555,7 @@ function (app, FauxtonAPI, Components, Documents,
       return this.model.fetch();
     },
 
-    afterRender: function() {
+    afterRender: function () {
       this.startRefreshInterval();
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/fauxton/actions.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/actions.js b/app/addons/fauxton/actions.js
index 234f629..9794358 100644
--- a/app/addons/fauxton/actions.js
+++ b/app/addons/fauxton/actions.js
@@ -34,7 +34,7 @@ function (app, FauxtonAPI, ActionTypes) {
       });
     },
 
-    removeHeaderLink: function(link) {
+    removeHeaderLink: function (link) {
       FauxtonAPI.dispatch({
         type: ActionTypes.REMOVE_NAVBAR_LINK,
         link: link

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/fauxton/actiontypes.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/actiontypes.js b/app/addons/fauxton/actiontypes.js
index ca85a21..0c9ccdd 100644
--- a/app/addons/fauxton/actiontypes.js
+++ b/app/addons/fauxton/actiontypes.js
@@ -10,7 +10,7 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([], function() {
+define([], function () {
   return {
     ADD_NAVBAR_LINK: 'ADD_NAVBAR_LINK',
     TOGGLE_NAVBAR_MENU: 'TOGGLE_NAVBAR_MENU',

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/fauxton/base.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/base.js b/app/addons/fauxton/base.js
index 01cf6f5..2ff9a47 100644
--- a/app/addons/fauxton/base.js
+++ b/app/addons/fauxton/base.js
@@ -19,7 +19,7 @@ define([
   "plugins/zeroclipboard/ZeroClipboard"
 ],
 
-function(app, FauxtonAPI, Components, ReactComponents, Actions, ZeroClipboard) {
+function (app, FauxtonAPI, Components, ReactComponents, Actions, ZeroClipboard) {
 
   var Fauxton = FauxtonAPI.addon();
   FauxtonAPI.addNotification = function (options) {
@@ -35,16 +35,16 @@ function(app, FauxtonAPI, Components, ReactComponents, Actions, ZeroClipboard) {
   };
 
   FauxtonAPI.UUID = FauxtonAPI.Model.extend({
-    initialize: function(options) {
+    initialize: function (options) {
       options = _.extend({count: 1}, options);
       this.count = options.count;
     },
 
-    url: function() {
+    url: function () {
       return app.host + "/_uuids?count=" + this.count;
     },
 
-    next: function() {
+    next: function () {
       return this.get("uuids").pop();
     }
   });
@@ -109,7 +109,7 @@ function(app, FauxtonAPI, Components, ReactComponents, Actions, ZeroClipboard) {
       'click .js-dismiss': 'onClickRemoveWithAnimation'
     },
 
-    initialize: function(options) {
+    initialize: function (options) {
       this.htmlToRender = options.msg;
       // escape always, except the value is false
       if (options.escape !== false) {
@@ -166,7 +166,7 @@ function(app, FauxtonAPI, Components, ReactComponents, Actions, ZeroClipboard) {
       }.bind(this), this.animationTimer);
     },
 
-    renderNotification: function(selector) {
+    renderNotification: function (selector) {
       selector = selector || this.selector;
       if (this.clear) {
         $(selector).html('');

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index 0348296..7d5d766 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -33,7 +33,7 @@ define([
   "velocity.ui"
 ],
 
-function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
+function (app, FauxtonAPI, ace, spin, ZeroClipboard) {
   var Components = FauxtonAPI.addon();
 
   // setting up the left header with the backbutton used in Views and All docs
@@ -73,7 +73,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       }
     },
 
-    beforeRender: function() {
+    beforeRender: function () {
       this.setUpCrumbs();
       this.setUpDropDownMenu();
 
@@ -82,13 +82,13 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       }
     },
 
-    setUpCrumbs: function() {
+    setUpCrumbs: function () {
       this.breadcrumbs = this.insertView("#header-breadcrumbs", new Components.Breadcrumbs({
         crumbs: this.crumbs
       }));
     },
 
-    setUpDropDownMenu: function() {
+    setUpDropDownMenu: function () {
       if (this.dropdownMenuLinks) {
         this.dropdown = this.insertView("#header-dropdown-menu", new Components.MenuDropDown({
           icon: 'fonticon-cog',
@@ -124,11 +124,11 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       "click .js-lastelement": "toggleLastElement"
     },
 
-    serialize: function() {
+    serialize: function () {
       var crumbs = _.clone(this.crumbs);
 
       // helper template function to determine when to insert a delimiter char
-      var nextCrumbHasLabel = function(crumb, index) {
+      var nextCrumbHasLabel = function (crumb, index) {
         var nextHasLabel = crumbs[index + 1].name !== "";
         return index < crumbs.length && crumb.name && nextHasLabel;
       };
@@ -155,12 +155,12 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       this.$('.js-enabled').removeClass('js-enabled');
     },
 
-    update: function(crumbs) {
+    update: function (crumbs) {
       this.crumbs = crumbs;
       this.render();
     },
 
-    initialize: function(options) {
+    initialize: function (options) {
       this.crumbs = options.crumbs;
       this.toggleDisabled = options.toggleDisabled || false;
     }
@@ -197,7 +197,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       this.trayId = 'tray-' + this.cid;
 
       var that = this;
-      $('body').on('click.' + this.trayId, function(e) {
+      $('body').on('click.' + this.trayId, function (e) {
         var $clickEl = $(e.target);
 
         if (!that.trayVisible()) {
@@ -214,7 +214,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       FauxtonAPI.Events.on(FauxtonAPI.constants.EVENTS.TRAY_OPENED, this.onTrayOpenEvent, this);
     },
 
-    cleanup: function() {
+    cleanup: function () {
       $('body').off('click.' + this.trayId);
     },
 
@@ -283,7 +283,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       this.initTray({ toggleTrayBtnSelector: '.api-url-btn' });
     },
 
-    serialize: function() {
+    serialize: function () {
       return {
         endpoint: this.endpoint,
         documentation: this.documentation
@@ -298,7 +298,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       this.$el.removeClass('hide');
     },
 
-    update: function(endpoint) {
+    update: function (endpoint) {
       this.endpoint = endpoint[0];
       this.documentation = endpoint[1];
       this.render();
@@ -514,7 +514,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       ].join('');
     },
 
-    source: function(query, process) {
+    source: function (query, process) {
       var url = this.getURL(query, this.dbLimit);
       var resultFilter = this.resultFilter;
 
@@ -524,7 +524,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
         cache: false,
         url: url,
         dataType: 'json',
-        success: function(data) {
+        success: function (data) {
           if (resultFilter) {
             data = resultFilter(data);
           }
@@ -540,7 +540,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       this.database = options.database;
       _.bindAll(this);
     },
-    source: function(id, process) {
+    source: function (id, process) {
       var query = '?' + $.param({
         startkey: JSON.stringify(id),
         endkey: JSON.stringify(id + "\u9999"),
@@ -555,7 +555,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
         cache: false,
         url: url,
         dataType: 'json',
-        success: function(data) {
+        success: function (data) {
           var ids = _.map(data.rows, function (row) {
             return row.id;
           });
@@ -674,7 +674,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       return Math.floor(this.availableEditorHeight  / singleLine);
     },
 
-    getLines: function() {
+    getLines: function () {
       return this.editor.getSession().getDocument().getLength();
     },
 
@@ -728,7 +728,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
     hadValidCode: function () {
       var errors = this.getAnnotations();
       // By default CouchDB view functions don't pass lint
-      return _.every(errors, function(error) {
+      return _.every(errors, function (error) {
         return this.isIgnorableError(error.raw);
       }, this);
     },
@@ -740,15 +740,15 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       "['{a}'] is better written in dot notation."
     ],
 
-    isIgnorableError: function(msg) {
+    isIgnorableError: function (msg) {
       return _.contains(this.excludedViewErrors, msg);
     },
 
-    configureFixedHeightEditor: function(numLines) {
+    configureFixedHeightEditor: function (numLines) {
       this.editor.renderer.setVScrollBarAlwaysVisible(true);
       this.editor.renderer.setHScrollBarAlwaysVisible(true);
       /* customize the ace scrolling for static edit height */
-      this.editor.renderer.$autosize = function() {
+      this.editor.renderer.$autosize = function () {
         this.$size.height = numLines * this.lineHeight;
         this.desiredHeight = numLines * this.lineHeight;
         this.container.style.height = this.desiredHeight + "px";
@@ -757,33 +757,33 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       };
     },
 
-    replaceCurrentLine: function(replacement) {
+    replaceCurrentLine: function (replacement) {
       this.editor.getSelection().selectLine();
       this.editor.insert(replacement);
       this.editor.getSelection().moveCursorUp();
     },
 
-    getLine: function(lineNum) {
+    getLine: function (lineNum) {
       return this.editor.session.getLine(lineNum);
     },
 
-    getSelectionStart: function() {
+    getSelectionStart: function () {
       return this.editor.getSelectionRange().start;
     },
 
-    getSelectionEnd: function() {
+    getSelectionEnd: function () {
       return this.editor.getSelectionRange().end;
     },
 
-    getRowHeight: function() {
+    getRowHeight: function () {
       return this.editor.renderer.layerConfig.lineHeight;
     },
 
-    isRowExpanded: function(row) {
+    isRowExpanded: function (row) {
       return !this.editor.getSession().isRowFolded(row);
     },
 
-    documentToScreenRow: function(row) {
+    documentToScreenRow: function (row) {
       return this.editor.getSession().documentToScreenRow(row, 0);
     }
 
@@ -802,12 +802,12 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
   Components.MenuDropDown = FauxtonAPI.View.extend({
     template: "addons/fauxton/templates/menu_dropdown",
     className: "dropdown",
-    initialize: function(options) {
+    initialize: function (options) {
       this.links = options.links;
       this.icon = options.icon || "fonticon-plus-circled";
       this.setUpEvents();
     },
-    setUpEvents: function() {
+    setUpEvents: function () {
       this.events = {};
       _.each(this.links, function (parentLink) {
         _.each(parentLink.links, function (link) {
@@ -816,16 +816,16 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
         }, this);
       }, this);
     },
-    triggerEvent: function(e) {
+    triggerEvent: function (e) {
       e.preventDefault();
       var eventTrigger = $(e.currentTarget).attr('triggerEvent');
       FauxtonAPI.Events.trigger(eventTrigger);
     },
-    update: function(links) {
+    update: function (links) {
       this.links = links;
       this.render();
     },
-    serialize: function() {
+    serialize: function () {
       return {
         links: this.links,
         icon: this.icon

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/fauxton/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.react.jsx b/app/addons/fauxton/components.react.jsx
index 32a07c7..474289d 100644
--- a/app/addons/fauxton/components.react.jsx
+++ b/app/addons/fauxton/components.react.jsx
@@ -19,7 +19,7 @@ define([
   'plugins/zeroclipboard/ZeroClipboard'
 ],
 
-function(app, FauxtonAPI, React, Stores, Actions, ZeroClipboard) {
+function (app, FauxtonAPI, React, Stores, Actions, ZeroClipboard) {
   var navBarStore = Stores.navBarStore;
 
   var Footer = React.createClass({
@@ -106,7 +106,7 @@ function(app, FauxtonAPI, React, Stores, Actions, ZeroClipboard) {
       this.setMenuState();
     },
 
-    componentWillUnmount: function() {
+    componentWillUnmount: function () {
       navBarStore.off('change', this.onChange);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/fauxton/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/stores.js b/app/addons/fauxton/stores.js
index 5211d9e..ef1249b 100644
--- a/app/addons/fauxton/stores.js
+++ b/app/addons/fauxton/stores.js
@@ -16,7 +16,7 @@ define([
   'addons/fauxton/actiontypes'
 ],
 
-function(app, FauxtonAPI, ActionTypes) {
+function (app, FauxtonAPI, ActionTypes) {
   var Stores = {};
 
   Stores.NavBarStore = FauxtonAPI.Store.extend({
@@ -111,7 +111,7 @@ function(app, FauxtonAPI, ActionTypes) {
         return oldLink.id === link.id;
       });
 
-      if(!oldLink) { return; }
+      if (!oldLink) { return; }
 
       oldLink.title = link.title;
       oldLink.href = link.href;
@@ -139,7 +139,7 @@ function(app, FauxtonAPI, ActionTypes) {
     },
 
     dispatch: function (action) {
-      switch(action.type) {
+      switch (action.type) {
 
         case ActionTypes.ADD_NAVBAR_LINK:
           this.addLink(action.link);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/fauxton/templates/breadcrumbs.html
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/templates/breadcrumbs.html b/app/addons/fauxton/templates/breadcrumbs.html
index c795877..1db3971 100644
--- a/app/addons/fauxton/templates/breadcrumbs.html
+++ b/app/addons/fauxton/templates/breadcrumbs.html
@@ -12,7 +12,7 @@ License for the specific language governing permissions and limitations under
 the License.
 */%>
 
-<% _.each(_.initial(crumbs), function(crumb, index) { %>
+<% _.each(_.initial(crumbs), function (crumb, index) { %>
 
   <% if (crumb.type === 'back') { %>
     <li class="pull-left breadcrumb-back-link">

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/fauxton/templates/pagination.html
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/templates/pagination.html b/app/addons/fauxton/templates/pagination.html
index 7fb5b41..19a4eb5 100644
--- a/app/addons/fauxton/templates/pagination.html
+++ b/app/addons/fauxton/templates/pagination.html
@@ -16,7 +16,7 @@ the License.
 <% } else { %>
   <li class="disabled"> <a href="<%- urlFun(page) %>">&laquo;</a></li>
 <% } %>
-<% _.each(_.range(from, to), function(i) { %>
+<% _.each(_.range(from, to), function (i) { %>
   <li <% if (page == i) { %>class="active"<% } %>> <a href="<%- urlFun(i) %>"><%- i %></a></li>
 <% }) %>
 <% if (page < totalPages) { %>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/permissions/base.js
----------------------------------------------------------------------
diff --git a/app/addons/permissions/base.js b/app/addons/permissions/base.js
index 6c071c6..cc7fb8b 100644
--- a/app/addons/permissions/base.js
+++ b/app/addons/permissions/base.js
@@ -16,9 +16,9 @@ define([
   'addons/permissions/routes'
 ],
 
-function(app, FauxtonAPI, Permissions) {
+function (app, FauxtonAPI, Permissions) {
 
-  Permissions.initialize = function() {};
+  Permissions.initialize = function () {};
 
   return Permissions;
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/permissions/views.js
----------------------------------------------------------------------
diff --git a/app/addons/permissions/views.js b/app/addons/permissions/views.js
index e410018..7a111ca 100644
--- a/app/addons/permissions/views.js
+++ b/app/addons/permissions/views.js
@@ -119,7 +119,7 @@ function (app, FauxtonAPI, Permissions) {
     items: function () {
       this.discardRemovedViews();
 
-      return  {
+      return {
         names: this.getItemFromView(this.nameViews),
         roles: this.getItemFromView(this.roleViews)
       };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/plugins/base.js
----------------------------------------------------------------------
diff --git a/app/addons/plugins/base.js b/app/addons/plugins/base.js
index 0798fbd..cfdb62d 100644
--- a/app/addons/plugins/base.js
+++ b/app/addons/plugins/base.js
@@ -16,8 +16,8 @@ define([
   "addons/plugins/routes"
 ],
 
-function(app, FauxtonAPI, plugins) {
-  plugins.initialize = function() {
+function (app, FauxtonAPI, plugins) {
+  plugins.initialize = function () {
     //FauxtonAPI.addHeaderLink({title: "Plugins", href: "#_plugins", icon: "fonticon-plugins", className: 'plugins'});
   };
   return plugins;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/plugins/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/plugins/routes.js b/app/addons/plugins/routes.js
index 5077c53..3971d69 100644
--- a/app/addons/plugins/routes.js
+++ b/app/addons/plugins/routes.js
@@ -15,7 +15,7 @@ define([
   "api",
   "addons/plugins/resources"
 ],
-function(app, FauxtonAPI, plugins) {
+function (app, FauxtonAPI, plugins) {
   var  PluginsRouteObject = FauxtonAPI.RouteObject.extend({
     layout: "one_pane",
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/plugins/templates/plugins.html
----------------------------------------------------------------------
diff --git a/app/addons/plugins/templates/plugins.html b/app/addons/plugins/templates/plugins.html
index 3002247..f1afa98 100644
--- a/app/addons/plugins/templates/plugins.html
+++ b/app/addons/plugins/templates/plugins.html
@@ -44,13 +44,13 @@ specific language governing permissions and limitations under the License.
     </div>
   </div></body>
   <script>
-    $('.install-plugin').each(function() {
+    $('.install-plugin').each(function () {
       var button = $(this);
       var name = button.data('name');
       var version = button.data('version');
-      $.get("/_config/plugins/" + name + "/", function(body, textStatus) {
+      $.get("/_config/plugins/" + name + "/", function (body, textStatus) {
         body = JSON.parse(body);
-        if(body == version) {
+        if (body == version) {
           button.html('Already Installed. Click to Uninstall');
           button.data('delete', true);
         } else {
@@ -60,7 +60,7 @@ specific language governing permissions and limitations under the License.
       });
     });
 
-    $('.install-plugin').click(function(event) {
+    $('.install-plugin').click(function (event) {
       var button = $(this);
       var delete_plugin = button.data('delete') || false;
       var plugin_spec = JSON.stringify({
@@ -78,8 +78,8 @@ specific language governing permissions and limitations under the License.
         contentType: 'application/json', // what we send to the server
         dataType: 'json', // expected from the server
         processData: false, // keep our precious JSON
-        success: function(data, textStatus, jqXhr) {
-          if(textStatus == "success") {
+        success: function (data, textStatus, jqXhr) {
+          if (textStatus == "success") {
             var action = delete_plugin ? 'Uninstalled' : 'Installed';
             button.html('Sucessfully ' + action);
             button.attr('disabled', true);
@@ -87,7 +87,7 @@ specific language governing permissions and limitations under the License.
             button.html(textStatus);
           }
         },
-        beforeSend: function(xhr) {
+        beforeSend: function (xhr) {
           xhr.setRequestHeader('Accept', 'application/json');
         },
       });
@@ -99,4 +99,4 @@ specific language governing permissions and limitations under the License.
     padding:1em;
     margin-bottom:1em;
   }
-  </style>
\ No newline at end of file
+  </style>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/pouchdb/base.js
----------------------------------------------------------------------
diff --git a/app/addons/pouchdb/base.js b/app/addons/pouchdb/base.js
index 3cd2b43..b2ee6da 100644
--- a/app/addons/pouchdb/base.js
+++ b/app/addons/pouchdb/base.js
@@ -25,11 +25,11 @@ define([
   "addons/pouchdb/pouchdb.mapreduce"
 ],
 
-function(app, FauxtonAPI, MapReduce) {
+function (app, FauxtonAPI, MapReduce) {
   var Pouch = FauxtonAPI.addon();
   Pouch.MapReduce = MapReduce;
 
-  Pouch.runViewQuery = function(fun, opts) {
+  Pouch.runViewQuery = function (fun, opts) {
     /*docs = [
       {_id: 'test_doc_1', foo: 'bar-1'},
       {_id: 'test_doc_2', foo: 'bar-2'},
@@ -44,7 +44,7 @@ function(app, FauxtonAPI, MapReduce) {
     ];*/
 
     var deferred = FauxtonAPI.Deferred();
-    var complete = function(resp, rows) {
+    var complete = function (resp, rows) {
       deferred.resolve(rows);
     };
 
@@ -53,6 +53,6 @@ function(app, FauxtonAPI, MapReduce) {
     Pouch.MapReduce.query(fun, options);
     return deferred;
   };
-  //pdb.runViewQuery({map:function(doc) { emit(doc._id, doc.foo) }})
+  //pdb.runViewQuery({map:function (doc) { emit(doc._id, doc.foo) }})
   return Pouch;
 });


[03/11] fauxton commit: updated refs/heads/master to 9343084

Posted by ro...@apache.org.
styleguide: disallowEmptyBlocks

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/0609b40c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/0609b40c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/0609b40c

Branch: refs/heads/master
Commit: 0609b40c63e194c7ba83f761627a92080c713cc5
Parents: 7f441fa
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 22 19:43:27 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:11:43 2015 +0100

----------------------------------------------------------------------
 Gruntfile.js | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0609b40c/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 089d00a..97228ea 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -472,10 +472,6 @@ module.exports = function(grunt) {
     if (!!filepath.match(/.jsx$/)) {
       grunt.task.run(['jsx']);
     }
-
-    if (!!filepath.match(/[Ss]pec.js$/)) {
-      //grunt.task.run(['mochaSetup','jst', 'concat:test_config_js', 'mocha_phantomjs']);
-    }
   });
 
 


[04/11] fauxton commit: updated refs/heads/master to 9343084

Posted by ro...@apache.org.
styleguide: space around binary operators

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/55c8b182
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/55c8b182
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/55c8b182

Branch: refs/heads/master
Commit: 55c8b182006e2f5863964890c7dc9e57b433e618
Parents: 0609b40
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 22 20:11:31 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:11:46 2015 +0100

----------------------------------------------------------------------
 app/addons/activetasks/views.js                         |  2 +-
 app/addons/config/views.js                              |  2 +-
 app/addons/cors/views.js                                |  2 +-
 app/addons/databases/base.js                            |  2 +-
 app/addons/databases/resources.js                       |  2 +-
 .../databases/tests/nightwatch/createsDatabase.js       |  2 +-
 app/addons/documents/resources.js                       |  2 +-
 app/addons/documents/routes-documents.js                |  2 +-
 app/addons/documents/shared-resources.js                |  6 +++---
 app/addons/documents/shared-routes.js                   |  2 +-
 .../documents/tests/nightwatch/createsDocument.js       | 12 ++++++------
 .../documents/tests/nightwatch/deletesDocument.js       |  2 +-
 ...navigateAfterEditingDocShouldShowAConfirmationBox.js |  4 ++--
 .../documents/tests/nightwatch/navigateFromNewDoc.js    |  4 ++--
 .../documents/tests/nightwatch/navigateToNewView.js     |  2 +-
 app/addons/documents/views-doceditor.js                 |  4 ++--
 app/addons/fauxton/components.js                        |  2 +-
 app/addons/styletests/views.js                          |  2 +-
 app/core/routeObject.js                                 |  2 +-
 app/core/utils.js                                       |  2 +-
 tasks/addon/template.js                                 |  2 +-
 .../nightwatch_tests/custom-commands/auth/loginToGUI.js |  2 +-
 test/nightwatch_tests/custom-commands/createDatabase.js |  2 +-
 test/nightwatch_tests/custom-commands/createDocument.js |  4 ++--
 test/nightwatch_tests/custom-commands/deleteDatabase.js |  4 ++--
 .../custom-commands/populateDatabase.js                 |  2 +-
 test/nightwatch_tests/helpers/helpers.js                |  4 ++--
 27 files changed, 40 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/activetasks/views.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/views.js b/app/addons/activetasks/views.js
index 6e54b0d..bd3e30a 100644
--- a/app/addons/activetasks/views.js
+++ b/app/addons/activetasks/views.js
@@ -183,7 +183,7 @@ function (app, FauxtonAPI, ActiveTasks) {
       if (this.type === 'indexer') {
         progress = 'Processed ' + this.model.get('changes_done') + ' of ' + this.model.get('total_changes') + ' changes. ';
       } else if (this.type === 'replication') {
-        progress = this.model.get('docs_written')+ ' docs written. ';
+        progress = this.model.get('docs_written') + ' docs written. ';
         if (!_.isUndefined(this.model.get('changes_pending'))) {
           progress += this.model.get('changes_pending') + ' pending changes. ';
         }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/config/views.js
----------------------------------------------------------------------
diff --git a/app/addons/config/views.js b/app/addons/config/views.js
index 6a9e17d..a234810 100644
--- a/app/addons/config/views.js
+++ b/app/addons/config/views.js
@@ -255,7 +255,7 @@ function(app, FauxtonAPI, Config, Components) {
     setSelectedTab: function (selectedTab) {
       this.selectedTab = selectedTab;
       this.$('li').removeClass('active');
-      this.$('a[data-type-select="'+this.selectedTab+'"]').parent("li").addClass('active');
+      this.$('a[data-type-select="' + this.selectedTab + '"]').parent("li").addClass('active');
     },
     afterRender: function(){
       this.setSelectedTab(this.selectedTab);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/cors/views.js
----------------------------------------------------------------------
diff --git a/app/addons/cors/views.js b/app/addons/cors/views.js
index 66e2f94..99a4d88 100644
--- a/app/addons/cors/views.js
+++ b/app/addons/cors/views.js
@@ -20,7 +20,7 @@ define([
 
 
 function (app, FauxtonAPI, CORS, Components, Actions) {
-  var Views= {};
+  var Views = {};
 
   Views.CORSWrapper = FauxtonAPI.View.extend({
     className: 'list',

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/databases/base.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/base.js b/app/addons/databases/base.js
index 546bd94..1be1ddf 100644
--- a/app/addons/databases/base.js
+++ b/app/addons/databases/base.js
@@ -79,7 +79,7 @@ function(app, FauxtonAPI, Databases, Views) {
       return '/database/' + id + '/permissions';
     },
     apiurl: function (id) {
-      return window.location.origin + '/_api/v2/db/'+ id + '/_security' ;
+      return window.location.origin + '/_api/v2/db/' + id + '/_security' ;
     }
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/databases/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/resources.js b/app/addons/databases/resources.js
index c49aa47..89c1c47 100644
--- a/app/addons/databases/resources.js
+++ b/app/addons/databases/resources.js
@@ -57,7 +57,7 @@ function(app, FauxtonAPI, Documents) {
       if (context === "index") {
         return "/database/" + this.safeID() + "/_all_docs";
       } else if (context === "web-index") {
-        return "#/database/"+ this.safeID() + "/_all_docs?limit=" + Databases.DocLimit;
+        return "#/database/" + this.safeID() + "/_all_docs?limit=" + Databases.DocLimit;
       } else if (context === "apiurl") {
         return window.location.origin + "/database/" + this.safeID() + "/_all_docs";
       } else if (context === "changes") {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/databases/tests/nightwatch/createsDatabase.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/nightwatch/createsDatabase.js b/app/addons/databases/tests/nightwatch/createsDatabase.js
index c472ec6..fca6f79 100644
--- a/app/addons/databases/tests/nightwatch/createsDatabase.js
+++ b/app/addons/databases/tests/nightwatch/createsDatabase.js
@@ -27,7 +27,7 @@ module.exports = {
       .setValue('#js-new-database-name', [newDatabaseName])
       .click('#js-create-database')
       .waitForElementVisible('#global-notifications div.alert-success', waitTime, false)
-      .url(baseUrl+'/_all_dbs')
+      .url(baseUrl + '/_all_dbs')
       .waitForElementVisible('html', waitTime, false)
       .getText('html', function (result) {
         var data = result.value,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/documents/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/resources.js b/app/addons/documents/resources.js
index c07c758..cc44fc4 100644
--- a/app/addons/documents/resources.js
+++ b/app/addons/documents/resources.js
@@ -68,7 +68,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
     // json editor for docs, or into a ddoc specific page.
     safeID: function() {
       var ddoc = this.id.replace(/^_design\//,"");
-      return "_design/"+app.utils.safeURLName(ddoc);
+      return "_design/" + app.utils.safeURLName(ddoc);
     }
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/documents/routes-documents.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-documents.js b/app/addons/documents/routes-documents.js
index 0131adc..9920176 100644
--- a/app/addons/documents/routes-documents.js
+++ b/app/addons/documents/routes-documents.js
@@ -114,7 +114,7 @@ function(app, FauxtonAPI, BaseRoute, Documents, Changes, Index, DocEditor,
         model: designDocInfo
       }));
 
-      this.sidebar.setSelectedTab(app.utils.removeSpecialCharacters(ddoc)+"_metadata");
+      this.sidebar.setSelectedTab(app.utils.removeSpecialCharacters(ddoc) + "_metadata");
       this.leftheader.updateCrumbs(this.getCrumbs(this.database));
       this.rightHeader.hideQueryOptions();
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/documents/shared-resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-resources.js b/app/addons/documents/shared-resources.js
index 11e6b04..a3cba90 100644
--- a/app/addons/documents/shared-resources.js
+++ b/app/addons/documents/shared-resources.js
@@ -113,11 +113,11 @@ define([
         tempView = views[view] || {};
 
       if (reduce) {
-        tempView.reduce=reduce;
+        tempView.reduce = reduce;
       } else {
         delete tempView.reduce;
       }
-      tempView.map= map;
+      tempView.map  = map;
 
       views[view] = tempView;
       this.set({views: views});
@@ -157,7 +157,7 @@ define([
     safeID: function() {
       if (this.isDdoc()){
         var ddoc = this.id.replace(/^_design\//,"");
-        return "_design/"+app.utils.safeURLName(ddoc);
+        return "_design/" + app.utils.safeURLName(ddoc);
       }else{
         return app.utils.safeURLName(this.id);
       }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/documents/shared-routes.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-routes.js b/app/addons/documents/shared-routes.js
index dd97225..497d059 100644
--- a/app/addons/documents/shared-routes.js
+++ b/app/addons/documents/shared-routes.js
@@ -49,7 +49,7 @@ define([
       hasReduceFunction;
 
       promise.then(function (resp) {
-        var design = _.findWhere(that.designDocs.models, {id: '_design/'+ddoc});
+        var design = _.findWhere(that.designDocs.models, {id: '_design/' + ddoc});
         !_.isUndefined(hasReduceFunction = design.attributes.doc.views[viewName].reduce);
 
         that.rightHeader.showQueryOptions();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/documents/tests/nightwatch/createsDocument.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/createsDocument.js b/app/addons/documents/tests/nightwatch/createsDocument.js
index 55623f4..a1fdaf1 100644
--- a/app/addons/documents/tests/nightwatch/createsDocument.js
+++ b/app/addons/documents/tests/nightwatch/createsDocument.js
@@ -20,23 +20,23 @@ module.exports = {
 
     client
       .loginToGUI()
-      .url(baseUrl+'/#/database/'+newDatabaseName+'/_all_docs')
+      .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
       .waitForElementPresent('#new-all-docs-button', waitTime, false)
       .click('#new-all-docs-button a')
-      .waitForElementPresent('#new-all-docs-button a[href="#/database/'+newDatabaseName+'/new"]', waitTime, false)
-      .click('#new-all-docs-button a[href="#/database/'+newDatabaseName+'/new"]')
+      .waitForElementPresent('#new-all-docs-button a[href="#/database/' + newDatabaseName + '/new"]', waitTime, false)
+      .click('#new-all-docs-button a[href="#/database/' + newDatabaseName + '/new"]')
       .waitForElementPresent('#editor-container', waitTime, false)
-      .verify.urlEquals(baseUrl+'/#/database/'+ newDatabaseName+'/new')
+      .verify.urlEquals(baseUrl + '/#/database/' + newDatabaseName + '/new')
       .execute('\
         var editor = ace.edit("editor-container");\
         editor.gotoLine(2,10);\
         editor.removeWordRight();\
-        editor.insert("'+newDocumentName+'");\
+        editor.insert("' + newDocumentName + '");\
       ')
       .waitForElementPresent('#doc-editor-actions-panel .save-doc', waitTime, false)
       .click('#doc-editor-actions-panel .save-doc')
       .pause(1000)
-      .url(baseUrl+'/'+newDatabaseName+'/_all_docs')
+      .url(baseUrl + '/' + newDatabaseName + '/_all_docs')
       .waitForElementPresent('body', waitTime, false)
       .getText('body', function (result) {
         var data = result.value,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/documents/tests/nightwatch/deletesDocument.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/deletesDocument.js b/app/addons/documents/tests/nightwatch/deletesDocument.js
index 744933e..dce5b66 100644
--- a/app/addons/documents/tests/nightwatch/deletesDocument.js
+++ b/app/addons/documents/tests/nightwatch/deletesDocument.js
@@ -30,7 +30,7 @@ module.exports = {
       .click('.control-delete')
       .acceptAlert()
       .waitForElementVisible('#global-notifications .alert.alert-info', waitTime, false)
-      .url(baseUrl+'/'+newDatabaseName+'/_all_docs')
+      .url(baseUrl + '/' + newDatabaseName + '/_all_docs')
       .waitForElementPresent('pre', waitTime, false)
       .getText('pre',function (result) {
         var data = result.value,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/documents/tests/nightwatch/navigateAfterEditingDocShouldShowAConfirmationBox.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/navigateAfterEditingDocShouldShowAConfirmationBox.js b/app/addons/documents/tests/nightwatch/navigateAfterEditingDocShouldShowAConfirmationBox.js
index 2a627c5..5bd0557 100644
--- a/app/addons/documents/tests/nightwatch/navigateAfterEditingDocShouldShowAConfirmationBox.js
+++ b/app/addons/documents/tests/nightwatch/navigateAfterEditingDocShouldShowAConfirmationBox.js
@@ -24,10 +24,10 @@ module.exports = {
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
       .waitForElementPresent('#new-all-docs-button', waitTime, false)
       .click('#new-all-docs-button a')
-      .waitForElementPresent('#new-all-docs-button a[href="'+ newLink + '"]', waitTime, false)
+      .waitForElementPresent('#new-all-docs-button a[href="' + newLink + '"]', waitTime, false)
       .click('#new-all-docs-button a[href="' + newLink + '"]')
       .waitForElementPresent('.code-region', waitTime, false)
-      .verify.urlEquals(baseUrl+ '/' + newLink)
+      .verify.urlEquals(baseUrl + '/' + newLink)
 
       .keys(['.ace_variable', 'v'])
       .click('a[href="#_config"]')

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/documents/tests/nightwatch/navigateFromNewDoc.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/navigateFromNewDoc.js b/app/addons/documents/tests/nightwatch/navigateFromNewDoc.js
index 79e6ece..22d14a6 100644
--- a/app/addons/documents/tests/nightwatch/navigateFromNewDoc.js
+++ b/app/addons/documents/tests/nightwatch/navigateFromNewDoc.js
@@ -26,10 +26,10 @@ module.exports = {
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
       .waitForElementPresent('#new-all-docs-button', waitTime, false)
       .click('#new-all-docs-button a')
-      .waitForElementPresent('#new-all-docs-button a[href="'+ newLink + '"]', waitTime, false)
+      .waitForElementPresent('#new-all-docs-button a[href="' + newLink + '"]', waitTime, false)
       .click('#new-all-docs-button a[href="' + newLink + '"]')
       .waitForElementPresent('.code-region', waitTime, false)
-      .verify.urlEquals(baseUrl+ '/' + newLink)
+      .verify.urlEquals(baseUrl + '/' + newLink)
 
       // now redirect back to the all docs page and check it's loaded properly
       .click('.fonticon-left-open')

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/documents/tests/nightwatch/navigateToNewView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/navigateToNewView.js b/app/addons/documents/tests/nightwatch/navigateToNewView.js
index 4f93e94..133c259 100644
--- a/app/addons/documents/tests/nightwatch/navigateToNewView.js
+++ b/app/addons/documents/tests/nightwatch/navigateToNewView.js
@@ -27,7 +27,7 @@ module.exports = {
       .waitForElementPresent('#new-all-docs-button a[href="#/database/' + newDatabaseName + '/new_view"]', waitTime, false)
       .click('#new-all-docs-button a[href="#/database/' + newDatabaseName + '/new_view"]')
       .waitForElementPresent('.define-view', waitTime, false)
-      .verify.urlEquals(baseUrl+'/#/database/' + newDatabaseName + '/new_view')
+      .verify.urlEquals(baseUrl + '/#/database/' + newDatabaseName + '/new_view')
 
       // now redirect back to the database page and check it's loaded properly
       .click('#nav-links a[href="#/_all_dbs"]')

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/documents/views-doceditor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-doceditor.js b/app/addons/documents/views-doceditor.js
index fd57ffd..616c3a8 100644
--- a/app/addons/documents/views-doceditor.js
+++ b/app/addons/documents/views-doceditor.js
@@ -166,7 +166,7 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
       var newId = this.$('#dup-id').val(),
           isDDoc = newId.match(/^_design\//),
           removeDDocID = newId.replace(/^_design\//,''),
-          encodedID = isDDoc? '_design/'+ app.utils.safeURLName(removeDDocID):app.utils.safeURLName(newId);
+          encodedID = isDDoc? '_design/' + app.utils.safeURLName(removeDDocID) : app.utils.safeURLName(newId);
 
       this.hideModal();
       FauxtonAPI.triggerRouteEvent('duplicateDoc', encodedID);
@@ -463,7 +463,7 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
         this.editor.editor.focus();
         var session = this.editor.editor.getSession();
         var count = session.getLength();
-        this.editor.editor.gotoLine(count, session.getLine(count-1).length);
+        this.editor.editor.gotoLine(count, session.getLine(count - 1).length);
       }
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index 5f72e35..cf34afb 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -129,7 +129,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
 
       // helper template function to determine when to insert a delimiter char
       var nextCrumbHasLabel = function(crumb, index) {
-        var nextHasLabel = crumbs[index+1].name !== "";
+        var nextHasLabel = crumbs[index + 1].name !== "";
         return index < crumbs.length && crumb.name && nextHasLabel;
       };
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/addons/styletests/views.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/views.js b/app/addons/styletests/views.js
index f3e8bbb..db5497b 100644
--- a/app/addons/styletests/views.js
+++ b/app/addons/styletests/views.js
@@ -17,7 +17,7 @@ define([
 
 
 function (app, FauxtonAPI) {
-  var Views= {};
+  var Views = {};
 
   Views.tests = FauxtonAPI.View.extend({
     template: "addons/styletests/templates/theme"

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/core/routeObject.js
----------------------------------------------------------------------
diff --git a/app/core/routeObject.js b/app/core/routeObject.js
index 8132e7e..bef8f14 100644
--- a/app/core/routeObject.js
+++ b/app/core/routeObject.js
@@ -210,7 +210,7 @@ function(FauxtonAPI, Backbone) {
       events = events || this.get('events');
       _.each(events, function(method, event) {
         if (!_.isFunction(method) && !_.isFunction(this[method])) {
-          throw new Error("Invalid method: "+method);
+          throw new Error("Invalid method: " + method);
         }
         method = _.isFunction(method) ? method : this[method];
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/app/core/utils.js
----------------------------------------------------------------------
diff --git a/app/core/utils.js b/app/core/utils.js
index 3f3503e..568f0de 100644
--- a/app/core/utils.js
+++ b/app/core/utils.js
@@ -67,7 +67,7 @@ function ($, _) {
     },
 
     addWindowResize: function(fun, key){
-      onWindowResize[key]=fun;
+      onWindowResize[key] = fun;
       // You shouldn't need to call it here. Just define it at startup and each time it will loop
       // through all the functions in the hash.
       //app.initWindowResize();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/tasks/addon/template.js
----------------------------------------------------------------------
diff --git a/tasks/addon/template.js b/tasks/addon/template.js
index 6199c7b..91f95f1 100644
--- a/tasks/addon/template.js
+++ b/tasks/addon/template.js
@@ -16,7 +16,7 @@ exports.description = 'Generate a skeleton for an addon.';
 
 exports.notes = '';
 
-exports.after = "Created your addon! Don't forget to update your"+
+exports.after = "Created your addon! Don't forget to update your" +
                 " settings.json for it to be compiled and deployed";
 
 // Any existing file or directory matching this wildcard will cause a warning.

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/test/nightwatch_tests/custom-commands/auth/loginToGUI.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/auth/loginToGUI.js b/test/nightwatch_tests/custom-commands/auth/loginToGUI.js
index 153cf46..f43cfde 100644
--- a/test/nightwatch_tests/custom-commands/auth/loginToGUI.js
+++ b/test/nightwatch_tests/custom-commands/auth/loginToGUI.js
@@ -18,7 +18,7 @@ exports.command = function () {
       password = client.globals.test_settings.password;
 
   client
-    .url(baseUrl+'/#login')
+    .url(baseUrl + '/#login')
     .waitForElementPresent('a[href="#login"]', 15000, false)
     .click('a[href="#login"]')
     .waitForElementPresent('#username', 10000, false)

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/test/nightwatch_tests/custom-commands/createDatabase.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/createDatabase.js b/test/nightwatch_tests/custom-commands/createDatabase.js
index ab7efd4..7be2c18 100644
--- a/test/nightwatch_tests/custom-commands/createDatabase.js
+++ b/test/nightwatch_tests/custom-commands/createDatabase.js
@@ -27,7 +27,7 @@ CreateDatabase.prototype.command = function (databaseName) {
 
   nano.db.create(databaseName, function (err, body, header) {
     if (err) {
-      console.log('Error in nano CreateDatabase Function: '+ databaseName, err.message);
+      console.log('Error in nano CreateDatabase Function: ' + databaseName, err.message);
 
     }
     console.log('nano - created a database: ' + databaseName);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/test/nightwatch_tests/custom-commands/createDocument.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/createDocument.js b/test/nightwatch_tests/custom-commands/createDocument.js
index b7a2c47..9ef23eb 100644
--- a/test/nightwatch_tests/custom-commands/createDocument.js
+++ b/test/nightwatch_tests/custom-commands/createDocument.js
@@ -33,9 +33,9 @@ CreateDocument.prototype.command = function (documentName, databaseName, docCont
   database.insert(docContents, documentName, function (err, body, header) {
 
     if (err) {
-      console.log('Error in nano CreateDocument Function: '+documentName+', in database: '+databaseName, err.message);
+      console.log('Error in nano CreateDocument Function: ' + documentName + ', in database: ' + databaseName, err.message);
     }
-    console.log('nano  - created a doc: '+documentName+', in database: '+databaseName);
+    console.log('nano  - created a doc: ' + documentName + ', in database: ' + databaseName);
     that.emit('complete');
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/test/nightwatch_tests/custom-commands/deleteDatabase.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/deleteDatabase.js b/test/nightwatch_tests/custom-commands/deleteDatabase.js
index d65cbcb..4db5170 100644
--- a/test/nightwatch_tests/custom-commands/deleteDatabase.js
+++ b/test/nightwatch_tests/custom-commands/deleteDatabase.js
@@ -26,9 +26,9 @@ DeleteDatabase.prototype.command = function (databaseName) {
 
   nano.db.destroy(databaseName, function (err, body, header) {
     if (err) {
-      console.log('Error in nano DeleteDatabase Function: '+ databaseName, err.message);
+      console.log('Error in nano DeleteDatabase Function: ' + databaseName, err.message);
     }
-    console.log('nano - database: '+databaseName+' is deleted: ', body);
+    console.log('nano - database: ' + databaseName + ' is deleted: ', body);
     // emit the complete event
     that.emit('complete');
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/test/nightwatch_tests/custom-commands/populateDatabase.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/populateDatabase.js b/test/nightwatch_tests/custom-commands/populateDatabase.js
index 841e568..a8ed0b2 100644
--- a/test/nightwatch_tests/custom-commands/populateDatabase.js
+++ b/test/nightwatch_tests/custom-commands/populateDatabase.js
@@ -31,7 +31,7 @@ PopulateDatabase.prototype.command = function (databaseName, count) {
     function () { return i < (count ? count : 20); },
     function (cb) {
       i++;
-      var document_id = 'document_'+ i;
+      var document_id = 'document_' + i;
       database.insert({ number: i }, document_id, cb);
     },
     function (err) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/55c8b182/test/nightwatch_tests/helpers/helpers.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/helpers/helpers.js b/test/nightwatch_tests/helpers/helpers.js
index f827268..f7211d7 100644
--- a/test/nightwatch_tests/helpers/helpers.js
+++ b/test/nightwatch_tests/helpers/helpers.js
@@ -28,7 +28,7 @@ module.exports = {
     nano.db.destroy(database, function (err, body, header) {
       if (err) {
         if (err.message != 'Database does not exist.' && err.message != 'missing') {
-          console.log('Error in setting up '+database, err.message);
+          console.log('Error in setting up ' + database, err.message);
         }
       }
       // create a new database
@@ -49,7 +49,7 @@ module.exports = {
     console.log('nano cleaning up');
     nano.db.destroy(database, function (err, header, body) {
       if (err) {
-        console.log('Error in cleaning up '+database, err.message);
+        console.log('Error in cleaning up ' + database, err.message);
       }
       done();
     });


[06/11] fauxton commit: updated refs/heads/master to 9343084

Posted by ro...@apache.org.
styleguide: requireSpacesInConditionalExpression

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/ba123f41
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/ba123f41
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/ba123f41

Branch: refs/heads/master
Commit: ba123f419f151261dd3b1b16f105c49729b77fda
Parents: 3d108d2
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 22 21:52:52 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:11:51 2015 +0100

----------------------------------------------------------------------
 app/core/utils.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ba123f41/app/core/utils.js
----------------------------------------------------------------------
diff --git a/app/core/utils.js b/app/core/utils.js
index 1238240..c8faee0 100644
--- a/app/core/utils.js
+++ b/app/core/utils.js
@@ -95,7 +95,7 @@ function ($, _) {
     safeURLName: function(name){
       var testName = name || "";
       var checkforBad = testName.match(/[\$\-/,+-]/g);
-      return (checkforBad !== null)?encodeURIComponent(name):name;
+      return (checkforBad !== null) ? encodeURIComponent(name) : name;
     },
 
     // a pair of simple local storage wrapper functions. These ward against problems getting or


[08/11] fauxton commit: updated refs/heads/master to 9343084

Posted by ro...@apache.org.
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/replication/base.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/base.js b/app/addons/replication/base.js
index 08a5088..e0ae776 100644
--- a/app/addons/replication/base.js
+++ b/app/addons/replication/base.js
@@ -16,8 +16,8 @@ define([
   'addons/replication/route'
 ],
 
-function(app, FauxtonAPI, replication) {
-  replication.initialize = function() {
+function (app, FauxtonAPI, replication) {
+  replication.initialize = function () {
     FauxtonAPI.addHeaderLink({ title: 'Replication', href: '#/replication', icon: 'fonticon-replicate' });
   };
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/replication/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/resources.js b/app/addons/replication/resources.js
index 69fe1c1..8c5c584 100644
--- a/app/addons/replication/resources.js
+++ b/app/addons/replication/resources.js
@@ -28,12 +28,12 @@ function (app, FauxtonAPI) {
 
   Replication.DBList = Backbone.Collection.extend({
     model: Replication.DBModel,
-    url: function() {
+    url: function () {
       return app.host + '/_all_dbs';
     },
-    parse: function(resp) {
+    parse: function (resp) {
       // TODO: pagination!
-      return _.map(resp, function(database) {
+      return _.map(resp, function (database) {
         return {
           id: database,
           name: database
@@ -49,9 +49,9 @@ function (app, FauxtonAPI) {
     url: function () {
       return app.host + '/_active_tasks';
     },
-    parse: function(resp) {
+    parse: function (resp) {
       //only want replication tasks to return
-      return _.filter(resp, function(task) {
+      return _.filter(resp, function (task) {
         return task.type === 'replication';
       });
     }
@@ -59,7 +59,7 @@ function (app, FauxtonAPI) {
 
   Replication.Replicate = Backbone.Model.extend({
     documentation: FauxtonAPI.constants.DOC_URLS.REPLICATION,
-    url: function() {
+    url: function () {
       return window.location.origin + '/_replicate';
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/replication/route.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/route.js b/app/addons/replication/route.js
index 8ec0c73..adfc2d5 100644
--- a/app/addons/replication/route.js
+++ b/app/addons/replication/route.js
@@ -16,7 +16,7 @@ define([
   'addons/replication/resources',
   'addons/replication/views'
 ],
-function(app, FauxtonAPI, Replication, Views) {
+function (app, FauxtonAPI, Replication, Views) {
   var RepRouteObject = FauxtonAPI.RouteObject.extend({
     layout: 'one_pane',
     routes: {
@@ -30,7 +30,7 @@ function(app, FauxtonAPI, Replication, Views) {
     crumbs: [
       { "name": 'Replicate changes from: ', 'link': 'replication' }
     ],
-    defaultView: function(dbname) {
+    defaultView: function (dbname) {
       var isAdmin = FauxtonAPI.session.isAdmin();
 
       this.tasks = [];

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/replication/templates/form.html
----------------------------------------------------------------------
diff --git a/app/addons/replication/templates/form.html b/app/addons/replication/templates/form.html
index 4dc12f4..3ad2ec4 100644
--- a/app/addons/replication/templates/form.html
+++ b/app/addons/replication/templates/form.html
@@ -21,8 +21,8 @@ the License.
 
     <div class="from_local local_option">
       <select id="from_name" name="source">
-        <% _.each( databases, function( db, i ) { %>
-           <option value="<%- db.name %>" <% if(selectedDB == db.name) {%>selected<%}%> ><%- db.name %></option>
+        <% _.each( databases, function ( db, i ) { %>
+           <option value="<%- db.name %>" <% if (selectedDB == db.name) {%>selected<%}%> ><%- db.name %></option>
         <% }); %>
       </select>
     </div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/views.js b/app/addons/replication/views.js
index c072e11..bcc6b69 100644
--- a/app/addons/replication/views.js
+++ b/app/addons/replication/views.js
@@ -16,7 +16,7 @@ define([
   'addons/fauxton/components',
   'addons/replication/resources'
 ],
-function(app, FauxtonAPI, Components, Replication) {
+function (app, FauxtonAPI, Components, Replication) {
   var View = {},
     Events = {},
     pollingInfo = {
@@ -90,7 +90,7 @@ function(app, FauxtonAPI, Components, Replication) {
 
       if (targetVal === 'local') {
         $currentTarget.parents('.form_set').addClass('local');
-      }else{
+      }else {
         $currentTarget.parents('.form_set').removeClass('local');
       }
     },
@@ -129,7 +129,7 @@ function(app, FauxtonAPI, Components, Replication) {
     formValidation: function () {
       var $remote = this.$el.find('input:visible'),
           error = false;
-      _.each($remote, function(item) {
+      _.each($remote, function (item) {
         if (item.value === 'http://' || item.value === '') {
           error = true;
         }
@@ -137,7 +137,7 @@ function(app, FauxtonAPI, Components, Replication) {
       return error;
     },
 
-    serialize: function() {
+    serialize: function () {
       return {
         databases:  this.collection.toJSON(),
         selectedDB: this.selectedDB
@@ -169,7 +169,7 @@ function(app, FauxtonAPI, Components, Replication) {
       this.enableFields();
     },
 
-    updateButtonText: function(wait) {
+    updateButtonText: function (wait) {
       var $button = this.$('#replication button[type=submit]');
       if (wait) {
         $button.text('Starting replication...').attr('disabled', true);
@@ -262,7 +262,7 @@ function(app, FauxtonAPI, Components, Replication) {
     },
 
     beforeRender: function () {
-      this.collection.forEach(function(item) {
+      this.collection.forEach(function (item) {
         this.insertView(new View.replicationItem({
           model: item
         }));
@@ -307,14 +307,14 @@ function(app, FauxtonAPI, Components, Replication) {
         "cancel": true
       },
       {
-        success: function(model, xhr, options) {
+        success: function (model, xhr, options) {
           FauxtonAPI.addNotification({
             msg: 'Replication stopped.',
             type: 'success',
             clear: true
           });
         },
-        error: function(model, xhr, options) {
+        error: function (model, xhr, options) {
           var errorMessage = JSON.parse(xhr.responseText);
           FauxtonAPI.addNotification({
             msg: errorMessage.reason,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/styletests/base.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/base.js b/app/addons/styletests/base.js
index 51a095b..4d77257 100644
--- a/app/addons/styletests/base.js
+++ b/app/addons/styletests/base.js
@@ -16,9 +16,9 @@ define([
   "addons/styletests/routes"
 ],
 
-function(app, FauxtonAPI, tests) {
+function (app, FauxtonAPI, tests) {
 
-  tests.initialize = function() {
+  tests.initialize = function () {
 
     FauxtonAPI.addHeaderLink({
       title: "Tests",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/styletests/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/routes.js b/app/addons/styletests/routes.js
index 1595874..8cc6287 100644
--- a/app/addons/styletests/routes.js
+++ b/app/addons/styletests/routes.js
@@ -16,7 +16,7 @@ define([
   "addons/styletests/views"
 ],
 
-function(app, FauxtonAPI, Views) {
+function (app, FauxtonAPI, Views) {
 
   var TestRouteObject = FauxtonAPI.RouteObject.extend({
     layout: "one_pane",
@@ -25,10 +25,10 @@ function(app, FauxtonAPI, Views) {
     },
     selectedHeader: 'theme tests',
     crumbs:[],
-    apiUrl: function() {
+    apiUrl: function () {
       return false;
     },
-    initialize: function() {
+    initialize: function () {
       this.setView("#dashboard-content", new Views.tests({}));
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/verifyinstall/base.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/base.js b/app/addons/verifyinstall/base.js
index bfdb321..68e2bf9 100644
--- a/app/addons/verifyinstall/base.js
+++ b/app/addons/verifyinstall/base.js
@@ -16,7 +16,7 @@ define([
   'addons/verifyinstall/routes'
 ],
 
-function(app, FauxtonAPI, VerifyInstall) {
+function (app, FauxtonAPI, VerifyInstall) {
   VerifyInstall.initialize = function () {
     FauxtonAPI.addHeaderLink({
       title: 'Verify',

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/verifyinstall/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/routes.js b/app/addons/verifyinstall/routes.js
index 14dff0b..bc7b8a1 100644
--- a/app/addons/verifyinstall/routes.js
+++ b/app/addons/verifyinstall/routes.js
@@ -15,7 +15,7 @@ define([
   'api',
   'addons/verifyinstall/views'
 ],
-function(app, FauxtonAPI, VerifyInstall) {
+function (app, FauxtonAPI, VerifyInstall) {
 
   var VerifyRouteObject = FauxtonAPI.RouteObject.extend({
     layout: 'one_pane',

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/addons/verifyinstall/views.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/views.js b/app/addons/verifyinstall/views.js
index bc48542..1c3f9cd 100644
--- a/app/addons/verifyinstall/views.js
+++ b/app/addons/verifyinstall/views.js
@@ -15,7 +15,7 @@ define([
   'api',
   'addons/verifyinstall/resources'
 ],
-function(app, FauxtonAPI, VerifyInstall) {
+function (app, FauxtonAPI, VerifyInstall) {
 
   VerifyInstall.Main = FauxtonAPI.View.extend({
     template: 'addons/verifyinstall/templates/main',

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/app.js
----------------------------------------------------------------------
diff --git a/app/app.js b/app/app.js
index cfa81e1..6483e5a 100644
--- a/app/app.js
+++ b/app/app.js
@@ -31,7 +31,7 @@ define([
   'plugins/jquery.form'
 ],
 
-function(app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb) {
+function (app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb) {
 
   // Make sure we have a console.log
   if (_.isUndefined(console)) {
@@ -70,11 +70,11 @@ function(app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb) {
     prefix: 'app/',
 
     // Inject app/helper.js for shared functionality across all html templates
-    renderTemplate: function(template, context) {
+    renderTemplate: function (template, context) {
       return template(_.extend(Helpers, context));
     },
 
-    fetchTemplate: function(path) {
+    fetchTemplate: function (path) {
       // Initialize done for use in async-mode
       var done;
 
@@ -88,7 +88,7 @@ function(app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb) {
         // Put fetch into `async-mode`.
         done = this.async();
         // Seek out the template asynchronously.
-        return $.ajax({ url: app.root + path }).then(function(contents) {
+        return $.ajax({ url: app.root + path }).then(function (contents) {
           done(JST[path] = _.template(contents));
         });
       }
@@ -106,7 +106,7 @@ function(app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb) {
 
     // I haven't wrapped these dispatch methods in a action
     // because I don't want to require fauxton/actions in this method.
-    addHeaderLink: function(link) {
+    addHeaderLink: function (link) {
       FauxtonAPI.dispatch({
           type: 'ADD_NAVBAR_LINK',
           link: link
@@ -121,7 +121,7 @@ function(app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb) {
 
     },
 
-    removeHeaderLink: function(link) {
+    removeHeaderLink: function (link) {
       FauxtonAPI.dispatch({
           type: 'REMOVE_NAVBAR_LINK',
           link: link

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/core/api.js
----------------------------------------------------------------------
diff --git a/app/core/api.js b/app/core/api.js
index f1ca478..d925aa0 100644
--- a/app/core/api.js
+++ b/app/core/api.js
@@ -22,7 +22,7 @@ define([
   'flux'
 ],
 
-function(FauxtonAPI, Layout, Router, RouteObject, utils, Store, constants, Flux) {
+function (FauxtonAPI, Layout, Router, RouteObject, utils, Store, constants, Flux) {
   FauxtonAPI = _.extend(FauxtonAPI, {
     Layout: Layout,
     Router: Router,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/core/auth.js
----------------------------------------------------------------------
diff --git a/app/core/auth.js b/app/core/auth.js
index 19e4a8c..af2e377 100644
--- a/app/core/auth.js
+++ b/app/core/auth.js
@@ -14,7 +14,7 @@ define([
   "core/base",
   "backbone"
 ],
-function(FauxtonAPI, Backbone) {
+function (FauxtonAPI, Backbone) {
 
   // This is not exposed externally as it should not need to be accessed or overridden
   var Auth = function (options) {
@@ -26,9 +26,9 @@ function(FauxtonAPI, Backbone) {
   Auth.extend = Backbone.Model.extend;
 
   _.extend(Auth.prototype, Backbone.Events, {
-    authDeniedCb: function() {},
+    authDeniedCb: function () {},
 
-    initialize: function() {
+    initialize: function () {
       var that = this;
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/core/base.js
----------------------------------------------------------------------
diff --git a/app/core/base.js b/app/core/base.js
index 12bc342..e121847 100644
--- a/app/core/base.js
+++ b/app/core/base.js
@@ -15,7 +15,7 @@ define([
   "plugins/backbone.layoutmanager"
 ],
 
-function(Backbone, LayoutManager) {
+function (Backbone, LayoutManager) {
   var FauxtonAPI = {
     //add default objects
     router: {
@@ -31,7 +31,7 @@ function(Backbone, LayoutManager) {
     }
   };
 
-  FauxtonAPI.Deferred = function() {
+  FauxtonAPI.Deferred = function () {
     return $.Deferred();
   };
 
@@ -44,18 +44,18 @@ function(Backbone, LayoutManager) {
   };
 
   FauxtonAPI.addonExtensions = {
-    initialize: function() {},
+    initialize: function () {},
     RouteObjects: {},
     Views: {}
   };
 
-  FauxtonAPI.addon = function(extra) {
+  FauxtonAPI.addon = function (extra) {
     return _.extend(_.clone(FauxtonAPI.addonExtensions), extra);
   };
 
   FauxtonAPI.View = Backbone.View.extend({
     // This should return an array of promises, an empty array, or null
-    establish: function() {
+    establish: function () {
       return null;
     },
     loaderClassname: 'loader',

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/core/layout.js
----------------------------------------------------------------------
diff --git a/app/core/layout.js b/app/core/layout.js
index fe6e53b..14d1518 100644
--- a/app/core/layout.js
+++ b/app/core/layout.js
@@ -13,7 +13,7 @@
 define([
   "backbone",
   "plugins/backbone.layoutmanager"
-], function(Backbone) {
+], function (Backbone) {
 
   // A wrapper of the main Backbone.layoutmanager
   // Allows the main layout of the page to be changed by any plugin.
@@ -39,20 +39,20 @@ define([
       return this.layout.render();
     },
 
-    setTemplate: function(template) {
+    setTemplate: function (template) {
       if (template.prefix) {
         this.layout.template = template.prefix + template.name;
-      } else{
+      } else {
         this.layout.template = "templates/layouts/" + template;
       }
       // If we're changing layouts all bets are off, so kill off all the
       // existing views in the layout.
-      _.each(this.layoutViews, function(view) {view.removeView();});
+      _.each(this.layoutViews, function (view) {view.removeView();});
       this.layoutViews = {};
       return this.render().promise();
     },
 
-    setView: function(selector, view, keep) {
+    setView: function (selector, view, keep) {
       this.layout.setView(selector, view, false);
 
       if (!keep) {
@@ -64,7 +64,7 @@ define([
       return view;
     },
 
-    renderView: function(selector) {
+    renderView: function (selector) {
       var view = this.layoutViews[selector];
       if (!view) {
         return false;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/core/routeObject.js
----------------------------------------------------------------------
diff --git a/app/core/routeObject.js b/app/core/routeObject.js
index 03a9a0b..6dae4a4 100644
--- a/app/core/routeObject.js
+++ b/app/core/routeObject.js
@@ -14,9 +14,9 @@ define([
   "core/base",
   "backbone"
 ],
-function(FauxtonAPI, Backbone) {
+function (FauxtonAPI, Backbone) {
 
-  var RouteObject = function(options) {
+  var RouteObject = function (options) {
     this._options = options;
 
     this._configure(options || {});
@@ -77,14 +77,14 @@ function(FauxtonAPI, Backbone) {
     disableLoader: false,
     loaderClassname: 'loader',
     renderedState: false,
-    establish: function() {},
-    route: function() {},
+    establish: function () {},
+    route: function () {},
     roles: [],
     _promises: [],
-    initialize: function() {}
+    initialize: function () {}
   }, {
 
-    renderWith: function(route, masterLayout, args) {
+    renderWith: function (route, masterLayout, args) {
 
       // set the options for this render
       var options = {
@@ -112,7 +112,7 @@ function(FauxtonAPI, Backbone) {
       });
     },
 
-    setTemplateOnFullRender: function(masterLayout) {
+    setTemplateOnFullRender: function (masterLayout) {
 
       var promise = $.Deferred();
 
@@ -127,12 +127,12 @@ function(FauxtonAPI, Backbone) {
       return promise;
     },
 
-    callEstablish: function(establishPromise) {
+    callEstablish: function (establishPromise) {
       this.addPromise(establishPromise);
       return FauxtonAPI.when(establishPromise);
     },
 
-    renderAllViews: function(options, resp) {
+    renderAllViews: function (options, resp) {
       var routeObject = this,
           renderView = _.bind(this.renderView, this, routeObject, options);
 
@@ -142,7 +142,7 @@ function(FauxtonAPI, Backbone) {
       return FauxtonAPI.when(promises);
     },
 
-    renderView: function(routeObject, options, view, selector) {
+    renderView: function (routeObject, options, view, selector) {
       var viewInfo = {
         view: view,
         selector: selector,
@@ -161,7 +161,7 @@ function(FauxtonAPI, Backbone) {
       return this.callEstablish(view.establish()).then(renderViewOnLayout, this.establishError);
     },
 
-    renderViewOnLayout: function(viewInfo, resp, xhr) {
+    renderViewOnLayout: function (viewInfo, resp, xhr) {
       var masterLayout = viewInfo.masterLayout,
           triggerBroadcast = _.bind(this.triggerBroadcast, this);
 
@@ -175,7 +175,7 @@ function(FauxtonAPI, Backbone) {
       return promise;
     },
 
-    establishError: function(resp) {
+    establishError: function (resp) {
       if (!resp || !resp.responseText) { return; }
       FauxtonAPI.addNotification({
             msg: 'An Error occurred: ' + JSON.parse(resp.responseText).reason,
@@ -190,7 +190,7 @@ function(FauxtonAPI, Backbone) {
       this.triggerBroadcast('renderComplete');
     },
 
-    setRenderedState: function(bool) {
+    setRenderedState: function (bool) {
       this.renderedState = bool;
     },
 
@@ -202,14 +202,14 @@ function(FauxtonAPI, Backbone) {
       broadcaster.trigger.apply(broadcaster, args);
     },
 
-    get: function(key) {
+    get: function (key) {
       return _.isFunction(this[key]) ? this[key]() : this[key];
     },
 
-    addEvents: function(events) {
+    addEvents: function (events) {
       events = events || this.get('events');
-      _.each(events, function(method, event) {
-        if (!_.isFunction(method) && !_.isFunction(this[method])) {
+      _.each(events, function (method, event) {
+        if (!_.isFunction(method) && !_.isFunction (this[method])) {
           throw new Error("Invalid method: " + method);
         }
         method = _.isFunction(method) ? method : this[method];
@@ -218,22 +218,22 @@ function(FauxtonAPI, Backbone) {
       }, this);
     },
 
-    _configure: function(options) {
-      _.each(_.intersection(_.keys(options), routeObjectOptions), function(key) {
+    _configure: function (options) {
+      _.each(_.intersection(_.keys(options), routeObjectOptions), function (key) {
         this[key] = options[key];
       }, this);
     },
 
-    getView: function(selector) {
+    getView: function (selector) {
       return this.views[selector];
     },
 
-    setView: function(selector, view) {
+    setView: function (selector, view) {
       this.views[selector] = view;
       return view;
     },
 
-    getViews: function() {
+    getViews: function () {
       return this.views;
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/core/router.js
----------------------------------------------------------------------
diff --git a/app/core/router.js b/app/core/router.js
index 08a78a6..f6143b2 100644
--- a/app/core/router.js
+++ b/app/core/router.js
@@ -16,7 +16,7 @@ define([
        "backbone"
 ],
 
-function(FauxtonAPI, Auth, Backbone) {
+function (FauxtonAPI, Auth, Backbone) {
 
   var beforeUnloads = {};
 
@@ -46,13 +46,13 @@ function(FauxtonAPI, Auth, Backbone) {
       }
     },
 
-    addModuleRouteObject: function(RouteObject) {
+    addModuleRouteObject: function (RouteObject) {
       var that = this;
       var masterLayout = FauxtonAPI.masterLayout,
       routeUrls = RouteObject.prototype.getRouteUrls();
 
-      _.each(routeUrls, function(route) {
-        this.route(route, route.toString(), function() {
+      _.each(routeUrls, function (route) {
+        this.route(route, route.toString(), function () {
           var args = Array.prototype.slice.call(arguments),
           roles = RouteObject.prototype.getRouteRoles(route),
           authPromise = FauxtonAPI.auth.checkAccess(roles);
@@ -75,8 +75,8 @@ function(FauxtonAPI, Auth, Backbone) {
       }, this);
     },
 
-    setModuleRoutes: function(addons) {
-      _.each(addons, function(module) {
+    setModuleRoutes: function (addons) {
+      _.each(addons, function (module) {
         if (module) {
           module.initialize();
           // This is pure routes the addon provides
@@ -87,7 +87,7 @@ function(FauxtonAPI, Auth, Backbone) {
       }, this);
     },
 
-    initialize: function(addons) {
+    initialize: function (addons) {
       this.addons = addons;
       this.auth = FauxtonAPI.auth = new Auth();
       // NOTE: This must be below creation of the layout
@@ -107,7 +107,7 @@ function(FauxtonAPI, Auth, Backbone) {
       }, this);
     },
 
-    triggerRouteEvent: function(event, args) {
+    triggerRouteEvent: function (event, args) {
       if (this.activeRouteObject) {
         var eventArgs = [event].concat(args);
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/core/store.js
----------------------------------------------------------------------
diff --git a/app/core/store.js b/app/core/store.js
index 90d5851..6614372 100644
--- a/app/core/store.js
+++ b/app/core/store.js
@@ -13,7 +13,7 @@
 define([
   "backbone"
 ],
-function(Backbone) {
+function (Backbone) {
 
   var Store = function () {
     this.initialize.apply(this, arguments);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/core/utils.js
----------------------------------------------------------------------
diff --git a/app/core/utils.js b/app/core/utils.js
index 7029c45..dbc1155 100644
--- a/app/core/utils.js
+++ b/app/core/utils.js
@@ -30,7 +30,7 @@ function ($, _) {
   var utils = {
 
     // Thanks to: http://stackoverflow.com/a/2880929
-    getParams: function(queryString) {
+    getParams: function (queryString) {
       if (queryString) {
         // I think this could be combined into one if
         if (queryString.substring(0, 1) === "?") {
@@ -58,7 +58,7 @@ function ($, _) {
     },
 
     // this takes the current URL and replaces all ?x=x with whatever new params are passed
-    replaceQueryParams: function(params) {
+    replaceQueryParams: function (params) {
       var fragment = window.location.hash.replace(/\?.*$/, "");
       if (!_.isEmpty(params)) {
         fragment = fragment + "?" + $.param(params);
@@ -66,21 +66,21 @@ function ($, _) {
       return fragment;
     },
 
-    addWindowResize: function(fun, key) {
+    addWindowResize: function (fun, key) {
       onWindowResize[key] = fun;
       // You shouldn't need to call it here. Just define it at startup and each time it will loop
       // through all the functions in the hash.
       //app.initWindowResize();
     },
 
-    removeWindowResize: function(key) {
+    removeWindowResize: function (key) {
       delete onWindowResize[key];
       utils.initWindowResize();
     },
 
-    initWindowResize: function() {
+    initWindowResize: function () {
       //when calling this it should be overriding what was called previously
-      window.onresize = function(e) {
+      window.onresize = function (e) {
         // could do this instead of the above for loop
         _.each(onWindowResize, function (fn) {
           fn();
@@ -88,11 +88,11 @@ function ($, _) {
       };
     },
 
-    removeSpecialCharacters: function(name) {
+    removeSpecialCharacters: function (name) {
       return name.replace(/[^\w\s]/gi, "");
     },
 
-    safeURLName: function(name) {
+    safeURLName: function (name) {
       var testName = name || "";
       var checkforBad = testName.match(/[\$\-/,+-]/g);
       return (checkforBad !== null) ? encodeURIComponent(name) : name;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/helpers.js
----------------------------------------------------------------------
diff --git a/app/helpers.js b/app/helpers.js
index a400786..478ca89 100644
--- a/app/helpers.js
+++ b/app/helpers.js
@@ -24,7 +24,7 @@ define([
   'moment'
 ],
 
-function(constants, utils, d3, moment) {
+function (constants, utils, d3, moment) {
 
   var Helpers = {};
 
@@ -32,7 +32,7 @@ function(constants, utils, d3, moment) {
 
   Helpers.safeURL = utils.safeURLName;
 
-  Helpers.imageUrl = function(path) {
+  Helpers.imageUrl = function (path) {
     // TODO: add dynamic path for different deploy targets
     return path;
   };
@@ -42,7 +42,7 @@ function(constants, utils, d3, moment) {
   };
 
   // File size pretty printing, taken from futon.format.js
-  Helpers.formatSize = function(size) {
+  Helpers.formatSize = function (size) {
       var jump = 512;
       if (size < jump) return size + " bytes";
       var units = ["KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/initialize.js.underscore
----------------------------------------------------------------------
diff --git a/app/initialize.js.underscore b/app/initialize.js.underscore
index 245bf55..c0af5fb 100644
--- a/app/initialize.js.underscore
+++ b/app/initialize.js.underscore
@@ -17,7 +17,7 @@
 
 
 define([],
-function() {
+function () {
   // Provide a global location to place configuration settings and module
   // creation.
   var app = {
@@ -29,6 +29,6 @@ function() {
     zeroClipboardPath: "<%= zeroClipboardPath %>"
   };
 
-  return app; 
+  return app;
 });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/load_addons.js.underscore
----------------------------------------------------------------------
diff --git a/app/load_addons.js.underscore b/app/load_addons.js.underscore
index 9686ad7..e6a49f7 100644
--- a/app/load_addons.js.underscore
+++ b/app/load_addons.js.underscore
@@ -18,7 +18,7 @@
 define([
   <%= '"' + deps.join('","') + '"' %>
 ],
-function() {
+function () {
   var LoadAddons = {
     addons: arguments
   };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/app/main.js
----------------------------------------------------------------------
diff --git a/app/main.js b/app/main.js
index 7799a13..d5d903c 100644
--- a/app/main.js
+++ b/app/main.js
@@ -17,7 +17,7 @@ require([
   "load_addons"
 ],
 
-function(app, FauxtonAPI, LoadAddons) {
+function (app, FauxtonAPI, LoadAddons) {
 
   app.addons = LoadAddons.addons;
   FauxtonAPI.router = app.router = new FauxtonAPI.Router(app.addons);
@@ -29,7 +29,7 @@ function(app, FauxtonAPI, LoadAddons) {
   // All navigation that is relative should be passed through the navigate
   // method, to be processed by the router. If the link has a `data-bypass`
   // attribute, bypass the delegation completely.
-  $(document).on("click", "a:not([data-bypass])", function(evt) {
+  $(document).on("click", "a:not([data-bypass])", function (evt) {
 
     // Get the absolute anchor href.
     var href = { prop: $(this).prop("href"), attr: $(this).attr("href") };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/tasks/addon/root/base.js.underscore
----------------------------------------------------------------------
diff --git a/tasks/addon/root/base.js.underscore b/tasks/addon/root/base.js.underscore
index d002cd5..7ec70a4 100644
--- a/tasks/addon/root/base.js.underscore
+++ b/tasks/addon/root/base.js.underscore
@@ -16,6 +16,6 @@ define([
   "addons/{%= name.toLowerCase() %}/routes"
 ],
 
-function(app, FauxtonAPI, {%= name %}) {
+function (app, FauxtonAPI, {%= name %}) {
   return {%= name %};
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/tasks/addon/root/routes.js.underscore
----------------------------------------------------------------------
diff --git a/tasks/addon/root/routes.js.underscore b/tasks/addon/root/routes.js.underscore
index cd9394d..0fa3c6f 100644
--- a/tasks/addon/root/routes.js.underscore
+++ b/tasks/addon/root/routes.js.underscore
@@ -15,7 +15,7 @@ define([
   "api",
   "addons/{%= name.toLowerCase() %}/resources"
 ],
-function(app, FauxtonAPI, {%= name %}) {
+function (app, FauxtonAPI, {%= name %}) {
   var {%= name.substr(0, 1).toUpperCase() + name.substr(1)%}RouteObject = FauxtonAPI.RouteObject.extend({
     layout: "with_sidebar",
 
@@ -27,7 +27,7 @@ function(app, FauxtonAPI, {%= name %}) {
 
     roles: [],
 
-    apiUrl: function() {
+    apiUrl: function () {
       return ["insert url here..."];
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/tasks/addon/template.js
----------------------------------------------------------------------
diff --git a/tasks/addon/template.js b/tasks/addon/template.js
index 89354e6..fd296ed 100644
--- a/tasks/addon/template.js
+++ b/tasks/addon/template.js
@@ -23,7 +23,7 @@ exports.after = "Created your addon! Don't forget to update your" +
 // exports.warnOn = '*';
 
 // The actual init template.
-exports.template = function(grunt, init, done) {
+exports.template = function (grunt, init, done) {
 
   // destpath
   init.process(

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index a61ccf4..743c8ef 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -10,11 +10,11 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-module.exports = function(grunt) {
+module.exports = function (grunt) {
   var _ = grunt.util._,
       fs = require('fs');
 
-  grunt.registerMultiTask('template', 'generates an html file from a specified template', function() {
+  grunt.registerMultiTask('template', 'generates an html file from a specified template', function () {
     var data = this.data,
         _ = grunt.util._,
         tmpl = _.template(grunt.file.read(data.src), null, data.variables);
@@ -22,7 +22,7 @@ module.exports = function(grunt) {
     grunt.file.write(data.dest, tmpl(data.variables));
   });
 
-  grunt.registerMultiTask('get_deps', 'Fetch external dependencies', function(version) {
+  grunt.registerMultiTask('get_deps', 'Fetch external dependencies', function (version) {
     grunt.log.writeln("Fetching external dependencies");
 
     var done = this.async(),
@@ -33,20 +33,20 @@ module.exports = function(grunt) {
         _ = grunt.util._;
 
     // This should probably be a helper, though they seem to have been removed
-    var fetch = function(deps, command) {
+    var fetch = function (deps, command) {
       var child_process = require('child_process');
       var async = require('async');
-      async.forEach(deps, function(dep, cb) {
+      async.forEach(deps, function (dep, cb) {
         var path = target + dep.name;
         var location = dep.url || dep.path;
         grunt.log.writeln("Fetching: " + dep.name + " (" + location + ")");
 
-        child_process.exec(command(dep, path), function(error, stdout, stderr) {
+        child_process.exec(command(dep, path), function (error, stdout, stderr) {
           grunt.log.writeln(stderr);
           grunt.log.writeln(stdout);
           cb(error);
         });
-      }, function(error) {
+      }, function (error) {
         if (error) {
           grunt.log.writeln("ERROR: " + error.message);
           return false;
@@ -56,15 +56,15 @@ module.exports = function(grunt) {
       });
     };
 
-    var remoteDeps = _.filter(settings.deps, function(dep) { return !! dep.url; });
+    var remoteDeps = _.filter(settings.deps, function (dep) { return !! dep.url; });
     grunt.log.writeln(remoteDeps.length + " remote dependencies");
-    var remote = fetch(remoteDeps, function(dep, destination) {
+    var remote = fetch(remoteDeps, function (dep, destination) {
       return "git clone " + dep.url + " " + destination;
     });
 
-    var localDeps = _.filter(settings.deps, function(dep) { return !! dep.path; });
+    var localDeps = _.filter(settings.deps, function (dep) { return !! dep.path; });
     grunt.log.writeln(localDeps.length + " local dependencies");
-    var local = fetch(localDeps, function(dep, destination) {
+    var local = fetch(localDeps, function (dep, destination) {
       // TODO: Windows
       var command = "cp -r " + dep.path + " " + destination;
       grunt.log.writeln(command);
@@ -75,14 +75,14 @@ module.exports = function(grunt) {
 
   });
 
-  grunt.registerMultiTask('gen_load_addons', 'Generate the load_addons.js file', function() {
+  grunt.registerMultiTask('gen_load_addons', 'Generate the load_addons.js file', function () {
     var data = this.data,
         _ = grunt.util._,
         settingsFile = fs.existsSync(data.src) ? data.src : "settings.json.default",
         settings = grunt.file.readJSON(settingsFile),
         template = "app/load_addons.js.underscore",
         dest = "app/load_addons.js",
-        deps = _.map(settings.deps, function(dep) {
+        deps = _.map(settings.deps, function (dep) {
           return "addons/" + dep.name + "/base";
         });
 
@@ -90,7 +90,7 @@ module.exports = function(grunt) {
     grunt.file.write(dest, tmpl({deps: deps}));
   });
 
-  grunt.registerMultiTask('gen_initialize', 'Generate the app.js file', function() {
+  grunt.registerMultiTask('gen_initialize', 'Generate the app.js file', function () {
     var _ = grunt.util._,
       settings = this.data,
       template = "app/initialize.js.underscore",
@@ -108,7 +108,7 @@ module.exports = function(grunt) {
     grunt.file.write(dest, tmpl(app));
   });
 
-  grunt.registerMultiTask('mochaSetup', 'Generate a config.js and runner.html for tests', function() {
+  grunt.registerMultiTask('mochaSetup', 'Generate a config.js and runner.html for tests', function () {
     var data = this.data,
         configInfo,
         _ = grunt.util._,
@@ -213,7 +213,7 @@ module.exports = function(grunt) {
   function _getNightwatchTests (settings) {
     var addonBlacklist = (_.has(settings.nightwatch, 'addonBlacklist')) ? settings.nightwatch.addonBlacklist : [];
 
-    return _.filter(settings.deps, function(addon) {
+    return _.filter(settings.deps, function (addon) {
 
       // if we've explicitly been told to ignore this addon's test, ignore 'em!
       if (_.contains(addonBlacklist, addon.name)) {
@@ -228,7 +228,7 @@ module.exports = function(grunt) {
       // see if the addon has any tests
       return fs.existsSync(fileLocation);
 
-    }).map(function(addon) {
+    }).map(function (addon) {
       return 'app/addons/' + addon.name + '/tests/nightwatch';
     });
   }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/tasks/helper.js
----------------------------------------------------------------------
diff --git a/tasks/helper.js b/tasks/helper.js
index b3a0007..e0b82bb 100644
--- a/tasks/helper.js
+++ b/tasks/helper.js
@@ -13,7 +13,7 @@
 var fs = require('fs'),
     path = require('path');
 
-exports.init = function(grunt) {
+exports.init = function (grunt) {
   var _ = grunt.util._,
       platform = process.platform;
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/test/nightwatch_tests/custom-commands/clickWhenVisible.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/clickWhenVisible.js b/test/nightwatch_tests/custom-commands/clickWhenVisible.js
index 9f7c3a7..ee96eca 100644
--- a/test/nightwatch_tests/custom-commands/clickWhenVisible.js
+++ b/test/nightwatch_tests/custom-commands/clickWhenVisible.js
@@ -12,7 +12,7 @@
 
 exports.command = function (element, waitTime) {
 
-  if(waitTime === undefined){
+  if (waitTime === undefined) {
     waitTime = 10000;
   }
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c54822ab/test/nightwatch_tests/custom-commands/deleteDocument.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/deleteDocument.js b/test/nightwatch_tests/custom-commands/deleteDocument.js
index c398e9b..29ecac4 100644
--- a/test/nightwatch_tests/custom-commands/deleteDocument.js
+++ b/test/nightwatch_tests/custom-commands/deleteDocument.js
@@ -16,8 +16,8 @@ DeleteDocument.prototype.command = function (databaseName, documentName) {
       database = nano.use(databaseName),
       documentRev;
 
-  database.get(documentName, function(err, body) {
-    if (!err){
+  database.get(documentName, function (err, body) {
+    if (!err) {
       documentRev = body._rev;
 
       database.destroy(documentName, documentRev, function (err, body, header) {


[02/11] fauxton commit: updated refs/heads/master to 9343084

Posted by ro...@apache.org.
styleguide: 2 spaces intendation

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/7f441fa5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/7f441fa5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/7f441fa5

Branch: refs/heads/master
Commit: 7f441fa51e8c3f817885984030b6dcb7b254d82c
Parents: 5fb57a6
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 22 18:31:27 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:11:40 2015 +0100

----------------------------------------------------------------------
 Gruntfile.js                                    | 10 +++---
 app/addons/auth/resources.js                    |  8 ++---
 app/addons/cors/components.react.jsx            |  4 +--
 app/addons/cors/stores.js                       |  4 +--
 app/addons/databases/base.js                    |  2 +-
 app/addons/databases/resources.js               |  2 +-
 app/addons/databases/views.js                   | 10 +++---
 app/addons/documents/changes/stores.js          |  8 ++---
 app/addons/documents/header/header.stores.js    |  4 +--
 app/addons/documents/index-editor/stores.js     |  2 +-
 app/addons/documents/pagination/stores.js       | 14 ++++----
 app/addons/documents/resources.js               |  2 +-
 app/addons/documents/shared-resources.js        |  2 +-
 app/addons/documents/shared-views.js            | 28 +++++++--------
 .../tests/nightwatch/paginateAllDocs.js         |  2 +-
 .../documents/tests/nightwatch/paginateView.js  |  2 +-
 .../documents/tests/views-advancedoptsSpec.js   | 14 ++++----
 app/addons/documents/views-doceditor.js         |  2 +-
 app/addons/documents/views.js                   | 24 ++++++-------
 app/addons/fauxton/base.js                      |  8 ++---
 app/addons/fauxton/components.js                | 28 +++++++--------
 app/addons/fauxton/stores.js                    |  2 +-
 app/addons/fauxton/tests/baseSpec.js            |  7 ++--
 app/addons/plugins/routes.js                    | 38 ++++++++++----------
 app/addons/replication/base.js                  |  2 +-
 app/addons/styletests/base.js                   | 18 +++++-----
 app/addons/styletests/routes.js                 | 22 ++++++------
 app/addons/verifyinstall/base.js                | 10 +++---
 app/addons/verifyinstall/resources.js           |  2 +-
 app/addons/verifyinstall/views.js               |  6 ++--
 app/core/layout.js                              |  2 +-
 app/core/routeObject.js                         |  2 +-
 tasks/fauxton.js                                | 14 ++++----
 test/nightwatch_tests/helpers/helpers.js        |  2 +-
 34 files changed, 154 insertions(+), 153 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index be5dc97..089d00a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -405,11 +405,11 @@ module.exports = function(grunt) {
     },
 
     shell: {
-        'build-jsx': {
-            command: 'node ./node_modules/react-tools/bin/jsx -x jsx app/addons/ app/addons/',
-            stdout: true,
-            failOnError: true
-        }
+      'build-jsx': {
+          command: 'node ./node_modules/react-tools/bin/jsx -x jsx app/addons/ app/addons/',
+          stdout: true,
+          failOnError: true
+      }
     },
 
     exec: {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/auth/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/auth/resources.js b/app/addons/auth/resources.js
index ff8ffc8..b879d31 100644
--- a/app/addons/auth/resources.js
+++ b/app/addons/auth/resources.js
@@ -157,7 +157,7 @@ function (app, FauxtonAPI, CouchdbSession) {
         if (login) {
           return that.login(username, password);
         } else {
-         return that.fetchUser({forceFetch: true});
+          return that.fetchUser({forceFetch: true});
         }
       });
     },
@@ -176,7 +176,7 @@ function (app, FauxtonAPI, CouchdbSession) {
         dataType: "json",
         data: {name: username, password: password}
       }).then(function () {
-         return that.fetchUser({forceFetch: true});
+        return that.fetchUser({forceFetch: true});
       });
     },
 
@@ -190,7 +190,7 @@ function (app, FauxtonAPI, CouchdbSession) {
         username : "_",
         password : "_"
       }).then(function () {
-       return that.fetchUser({forceFetch: true });
+        return that.fetchUser({forceFetch: true });
       });
     },
 
@@ -203,7 +203,7 @@ function (app, FauxtonAPI, CouchdbSession) {
            info = this.get('info'),
            userCtx = this.get('userCtx');
 
-       var admin = new Admin({
+      var admin = new Admin({
         name: userCtx.name,
         value: password
       });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/cors/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/cors/components.react.jsx b/app/addons/cors/components.react.jsx
index 65d7cfc..357810c 100644
--- a/app/addons/cors/components.react.jsx
+++ b/app/addons/cors/components.react.jsx
@@ -71,7 +71,7 @@ define([
 
     onKeyUp: function (e) {
       if (e.keyCode === 13) {   //enter key
-       return this.updateOrigin(e);
+        return this.updateOrigin(e);
       }
     },
 
@@ -160,7 +160,7 @@ define([
 
     onKeyUp: function (e) {
       if (e.keyCode == 13) {   //enter key
-       return this.addOrigin(e);
+        return this.addOrigin(e);
       }
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/cors/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/cors/stores.js b/app/addons/cors/stores.js
index dc70cbd..3e6ce16 100644
--- a/app/addons/cors/stores.js
+++ b/app/addons/cors/stores.js
@@ -25,7 +25,7 @@ define([
     },
 
     saving: function () {
-        this._savingStatus = 'Saving';
+      this._savingStatus = 'Saving';
     },
 
     savingDone: function () {
@@ -145,7 +145,7 @@ define([
         break;
 
         default:
-          return;
+        return;
       }
     }
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/databases/base.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/base.js b/app/addons/databases/base.js
index 06c872e..546bd94 100644
--- a/app/addons/databases/base.js
+++ b/app/addons/databases/base.js
@@ -52,7 +52,7 @@ function(app, FauxtonAPI, Databases, Views) {
     },
 
     apiurl: function (id, query) {
-        return window.location.origin + '/' + id + '/_changes' + query;
+      return window.location.origin + '/' + id + '/_changes' + query;
     }
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/databases/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/resources.js b/app/addons/databases/resources.js
index 17113d4..c49aa47 100644
--- a/app/addons/databases/resources.js
+++ b/app/addons/databases/resources.js
@@ -105,7 +105,7 @@ function(app, FauxtonAPI, Documents) {
         query = "?" + $.param(this.params);
       }
 
-     if (!context) { context = 'server';}
+      if (!context) { context = 'server';}
 
       return FauxtonAPI.urls('changes', context, this.database.safeID(), query);
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/databases/views.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/views.js b/app/addons/databases/views.js
index d3eb5cb..591e9a8 100644
--- a/app/addons/databases/views.js
+++ b/app/addons/databases/views.js
@@ -148,11 +148,11 @@ function(app, Components, FauxtonAPI, Databases) {
         dbname = selectedName;
       }
       if (dbname && this.collection.where({ id: app.utils.safeURLName(dbname) }).length > 0) {
-          // TODO: switch to using a model, or Databases.databaseUrl()
-          // Neither of which are in scope right now
-          // var db = new Database.Model({id: dbname});
-          var url = FauxtonAPI.urls('allDocs', 'app', app.utils.safeURLName(dbname));
-          FauxtonAPI.navigate(url);
+        // TODO: switch to using a model, or Databases.databaseUrl()
+        // Neither of which are in scope right now
+        // var db = new Database.Model({id: dbname});
+        var url = FauxtonAPI.urls('allDocs', 'app', app.utils.safeURLName(dbname));
+        FauxtonAPI.navigate(url);
       } else {
         FauxtonAPI.addNotification({
           msg: 'Database does not exist.',

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/changes/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/changes/stores.js b/app/addons/documents/changes/stores.js
index 2e8f279..301e8c0 100644
--- a/app/addons/documents/changes/stores.js
+++ b/app/addons/documents/changes/stores.js
@@ -107,19 +107,19 @@ define([
         case ActionTypes.SET_CHANGES:
           this.setChanges(action.options);
           this.triggerChange();
-          break;
+        break;
         case ActionTypes.TOGGLE_CHANGES_TAB_VISIBILITY:
           this.toggleTabVisibility();
           this.triggerChange();
-          break;
+        break;
         case ActionTypes.ADD_CHANGES_FILTER_ITEM:
           this.addFilter(action.filter);
           this.triggerChange();
-          break;
+        break;
         case ActionTypes.REMOVE_CHANGES_FILTER_ITEM:
           this.removeFilter(action.filter);
           this.triggerChange();
-          break;
+        break;
       }
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/header/header.stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/header/header.stores.js b/app/addons/documents/header/header.stores.js
index ec40d7e..4085b0e 100644
--- a/app/addons/documents/header/header.stores.js
+++ b/app/addons/documents/header/header.stores.js
@@ -79,7 +79,7 @@ function (FauxtonAPI, ActionTypes) {
         break;
 
         default:
-          return;
+        return;
       }
     }
 
@@ -129,7 +129,7 @@ function (FauxtonAPI, ActionTypes) {
         break;
 
         default:
-          return;
+        return;
       }
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/index-editor/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-editor/stores.js b/app/addons/documents/index-editor/stores.js
index 198a440..d96783b 100644
--- a/app/addons/documents/index-editor/stores.js
+++ b/app/addons/documents/index-editor/stores.js
@@ -200,7 +200,7 @@ function(FauxtonAPI, ActionTypes) {
         break;
 
         default:
-          return;
+        return;
         // do nothing
       }
     }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/pagination/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/pagination/stores.js b/app/addons/documents/pagination/stores.js
index d37c66b..3802d7c 100644
--- a/app/addons/documents/pagination/stores.js
+++ b/app/addons/documents/pagination/stores.js
@@ -145,29 +145,29 @@ define([
         case ActionTypes.NEW_PAGINATION:
           this.newPagination(action.collection);
           this.triggerChange();
-          break;
+        break;
         case ActionTypes.SET_PAGINATION_DOCUMENT_LIMIT:
           this.setDocumentLimit(action.docLimit);
           this.triggerChange();
-          break;
+        break;
         case ActionTypes.PAGINATION_COLLECTION_RESET:
           this.triggerChange();
-          break;
+        break;
         case ActionTypes.PAGINATE_NEXT:
           this.paginateNext();
           this.triggerChange();
-          break;
+        break;
         case ActionTypes.PAGINATE_PREVIOUS:
           this.paginatePrevious();
           this.triggerChange();
-          break;
+        break;
         case ActionTypes.PER_PAGE_CHANGE:
           this.reset();
           this.setPerPage(action.perPage);
           this.triggerChange();
-          break;
+        break;
         default:
-          return;
+        return;
       }
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/resources.js b/app/addons/documents/resources.js
index d2e460d..c07c758 100644
--- a/app/addons/documents/resources.js
+++ b/app/addons/documents/resources.js
@@ -282,7 +282,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       min = Math.floor(sec / 60.0);
       sec = (sec % 60.0).toString();
       if (sec.length < 2) {
-         sec = "0" + sec;
+        sec = "0" + sec;
       }
 
       h = (Math.floor(min / 60.0)).toString();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/shared-resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-resources.js b/app/addons/documents/shared-resources.js
index 130bab6..11e6b04 100644
--- a/app/addons/documents/shared-resources.js
+++ b/app/addons/documents/shared-resources.js
@@ -278,7 +278,7 @@ define([
 
     updateSeq: function() {
       if (!this.viewMeta) {
-          return false;
+        return false;
       }
       return this.viewMeta.update_seq || false;
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/shared-views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-views.js b/app/addons/documents/shared-views.js
index e775ffa..c3d145d 100644
--- a/app/addons/documents/shared-views.js
+++ b/app/addons/documents/shared-views.js
@@ -81,15 +81,15 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
         });
 
         return menuLinks;
-     }, [{
-          title: 'New Doc',
-          url: newUrlPrefix + '/new',
-          icon: 'fonticon-plus-circled'
-        },{
-          title: 'New View',
-          url: newUrlPrefix + '/new_view',
-          icon: 'fonticon-plus-circled'
-        }]);
+      }, [{
+        title: 'New Doc',
+        url: newUrlPrefix + '/new',
+        icon: 'fonticon-plus-circled'
+      },{
+        title: 'New View',
+        url: newUrlPrefix + '/new_view',
+        icon: 'fonticon-plus-circled'
+      }]);
     },
 
     beforeRender: function(manage) {
@@ -208,11 +208,11 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
         });
 
         return menuLinks;
-     }, [{
-      title: 'New View',
-      url: '#' + FauxtonAPI.urls('new', 'addView', databaseName, docSafe),
-      icon: 'fonticon-plus-circled'
-     }]);
+      }, [{
+        title: 'New View',
+        url: '#' + FauxtonAPI.urls('new', 'addView', databaseName, docSafe),
+        icon: 'fonticon-plus-circled'
+      }]);
 
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/tests/nightwatch/paginateAllDocs.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/paginateAllDocs.js b/app/addons/documents/tests/nightwatch/paginateAllDocs.js
index ffadfd0..5774034 100644
--- a/app/addons/documents/tests/nightwatch/paginateAllDocs.js
+++ b/app/addons/documents/tests/nightwatch/paginateAllDocs.js
@@ -31,7 +31,7 @@ module.exports = {
       .execute(function () {
         return $('.doc-row').length;
       }, function (result) {
-          client.assert.equal(result.value, 10);
+        client.assert.equal(result.value, 10);
       })
       .end();
   },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/tests/nightwatch/paginateView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/paginateView.js b/app/addons/documents/tests/nightwatch/paginateView.js
index ba57e89..a711267 100644
--- a/app/addons/documents/tests/nightwatch/paginateView.js
+++ b/app/addons/documents/tests/nightwatch/paginateView.js
@@ -31,7 +31,7 @@ module.exports = {
       .execute(function () {
         return $('.doc-row').length;
       }, function (result) {
-          client.assert.equal(result.value, 10);
+        client.assert.equal(result.value, 10);
       })
       .end();
   },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/tests/views-advancedoptsSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/views-advancedoptsSpec.js b/app/addons/documents/tests/views-advancedoptsSpec.js
index fe9bbe5..48a29cb 100644
--- a/app/addons/documents/tests/views-advancedoptsSpec.js
+++ b/app/addons/documents/tests/views-advancedoptsSpec.js
@@ -19,14 +19,14 @@ define([
 
   describe('Documents QueryOptions', function () {
     var view;
-      beforeEach(function () {
-        viewSandbox = new ViewSandbox();
-        viewSandbox.renderView(view);
-      });
+    beforeEach(function () {
+      viewSandbox = new ViewSandbox();
+      viewSandbox.renderView(view);
+    });
 
-      afterEach(function () {
-        viewSandbox.remove();
-      });
+    afterEach(function () {
+      viewSandbox.remove();
+    });
   });
 });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/views-doceditor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-doceditor.js b/app/addons/documents/views-doceditor.js
index 396994d..fd57ffd 100644
--- a/app/addons/documents/views-doceditor.js
+++ b/app/addons/documents/views-doceditor.js
@@ -377,7 +377,7 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
           goBack();
         }
         deferred.reject();
-     });
+      });
 
       return deferred;
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index fefe254..3e8b8fb 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -367,16 +367,16 @@ function (app, FauxtonAPI, Components, Documents,
       return this.collection.fetch({reset: true}).then(function () {
         PaginationActions.collectionReset();
       }, function (model, xhr, options) {
-          // TODO: handle error requests that slip through
-          // This should just throw a notification, not break the page
-          FauxtonAPI.addNotification({
-            msg: "Bad Request",
-            type: "error",
-            clear:  true
-          });
-
-          //now redirect back to alldocs
-          FauxtonAPI.navigate(model.database.url("index") + "?limit=100");
+        // TODO: handle error requests that slip through
+        // This should just throw a notification, not break the page
+        FauxtonAPI.addNotification({
+          msg: "Bad Request",
+          type: "error",
+          clear:  true
+        });
+
+        //now redirect back to alldocs
+        FauxtonAPI.navigate(model.database.url("index") + "?limit=100");
       });
     },
 
@@ -535,8 +535,8 @@ function (app, FauxtonAPI, Components, Documents,
     },
 
     afterRender: function () {
-     this.typeAhead = new Components.DocSearchTypeahead({el: '#jump-to-doc-id', database: this.database});
-     this.typeAhead.render();
+      this.typeAhead = new Components.DocSearchTypeahead({el: '#jump-to-doc-id', database: this.database});
+      this.typeAhead.render();
     }
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/fauxton/base.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/base.js b/app/addons/fauxton/base.js
index 781aea7..01cf6f5 100644
--- a/app/addons/fauxton/base.js
+++ b/app/addons/fauxton/base.js
@@ -128,16 +128,16 @@ function(app, FauxtonAPI, Components, ReactComponents, Actions, ZeroClipboard) {
       switch (this.type) {
         case 'error':
           icon = 'fonticon-attention-circled';
-          break;
+        break;
         case 'info':
           icon = 'fonticon-info-circled';
-          break;
+        break;
         case 'success':
           icon = 'fonticon-ok-circled';
-          break;
+        break;
         default:
           icon = 'fonticon-info-circled';
-          break;
+        break;
       }
 
       return {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index cf0edaa..5f72e35 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -675,7 +675,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
     },
 
     getLines: function(){
-     return this.editor.getSession().getDocument().getLength();
+      return this.editor.getSession().getDocument().getLength();
     },
 
     addCommands: function () {
@@ -726,10 +726,10 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
     },
 
     hadValidCode: function () {
-     var errors = this.getAnnotations();
-     // By default CouchDB view functions don't pass lint
-     return _.every(errors, function(error) {
-      return this.isIgnorableError(error.raw);
+      var errors = this.getAnnotations();
+      // By default CouchDB view functions don't pass lint
+      return _.every(errors, function(error) {
+        return this.isIgnorableError(error.raw);
       },this);
     },
 
@@ -946,18 +946,18 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
         speed: 1, // Rounds per second
         trail: 10, // Afterglow percentage
         shadow: false // Whether to render a shadow
-     };
+      };
 
-     if (routeObjectSpinner) { return; }
+      if (routeObjectSpinner) { return; }
 
-     if (!$('.spinner').length) {
-       $('<div class="spinner"></div>')
-        .appendTo('#app-container');
-     }
+      if (!$('.spinner').length) {
+        $('<div class="spinner"></div>')
+          .appendTo('#app-container');
+      }
 
-     routeObjectSpinner = new Spinner(opts).spin();
-     $('.spinner').append(routeObjectSpinner.el);
-   }
+      routeObjectSpinner = new Spinner(opts).spin();
+      $('.spinner').append(routeObjectSpinner.el);
+    }
   });
 
   var removeRouteObjectSpinner = function () {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/fauxton/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/stores.js b/app/addons/fauxton/stores.js
index 6662b57..04b7be4 100644
--- a/app/addons/fauxton/stores.js
+++ b/app/addons/fauxton/stores.js
@@ -175,7 +175,7 @@ function(app, FauxtonAPI, ActionTypes) {
         break;
 
         default:
-          return;
+        return;
         // do nothing
       }
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/fauxton/tests/baseSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/tests/baseSpec.js b/app/addons/fauxton/tests/baseSpec.js
index 6a04eee..63b6669 100644
--- a/app/addons/fauxton/tests/baseSpec.js
+++ b/app/addons/fauxton/tests/baseSpec.js
@@ -79,7 +79,7 @@ define([
 
   });
 
-describe('Fauxton Notifications', function () {
+  describe('Fauxton Notifications', function () {
 
     it('should escape by default', function () {
       window.fauxton_xss_test_escaped = true;
@@ -107,14 +107,15 @@ describe('Fauxton Notifications', function () {
       });
     });
 
-    it('should render escaped if the escape value is not explicitly false,' +
-        'e.g. was forgotten in a direct call', function () {
+    it('should render escaped if the escape value is not explicitly false, ' +
+    'e.g. was forgotten in a direct call', function () {
 
       window.fauxton_xss_test2_escaped = true;
       var view = new Base.Notification({
         msg: '<script>window.fauxton_xss_test2_escaped = false;</script>',
         selector: 'body'
       }).render();
+
       view.$el.remove();
       assert.ok(window.fauxton_xss_test2_escaped);
       delete window.fauxton_xss_test2_escaped;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/plugins/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/plugins/routes.js b/app/addons/plugins/routes.js
index 24d47f0..7eb3a11 100644
--- a/app/addons/plugins/routes.js
+++ b/app/addons/plugins/routes.js
@@ -16,32 +16,32 @@ define([
   "addons/plugins/resources"
 ],
 function(app, FauxtonAPI, plugins) {
-      var  PluginsRouteObject = FauxtonAPI.RouteObject.extend({
-        layout: "one_pane",
+  var  PluginsRouteObject = FauxtonAPI.RouteObject.extend({
+    layout: "one_pane",
 
-        crumbs: [
-          {"name": "Plugins","link": "_plugins"}
-        ],
+    crumbs: [
+      {"name": "Plugins","link": "_plugins"}
+    ],
 
-        routes: {
-           "_plugins": "pluginsRoute"
-        },
+    routes: {
+       "_plugins": "pluginsRoute"
+    },
 
-        selectedHeader: "Plugins",
+    selectedHeader: "Plugins",
 
-        roles: ["_admin"],
+    roles: ["_admin"],
 
-        apiUrl:'plugins',
+    apiUrl:'plugins',
 
-        initialize: function () {
-            //put common views used on all your routes here (eg:  sidebars )
-        },
+    initialize: function () {
+        //put common views used on all your routes here (eg:  sidebars )
+    },
 
-        pluginsRoute: function () {
-          this.setView("#dashboard-content", new plugins.Hello({}));
-        }
-      });
+    pluginsRoute: function () {
+      this.setView("#dashboard-content", new plugins.Hello({}));
+    }
+  });
 
-      plugins.RouteObjects = [PluginsRouteObject];
+  plugins.RouteObjects = [PluginsRouteObject];
   return plugins;
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/replication/base.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/base.js b/app/addons/replication/base.js
index 5e0c717..08a5088 100644
--- a/app/addons/replication/base.js
+++ b/app/addons/replication/base.js
@@ -17,7 +17,7 @@ define([
 ],
 
 function(app, FauxtonAPI, replication) {
-	replication.initialize = function() {
+  replication.initialize = function() {
     FauxtonAPI.addHeaderLink({ title: 'Replication', href: '#/replication', icon: 'fonticon-replicate' });
   };
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/styletests/base.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/base.js b/app/addons/styletests/base.js
index f350912..51a095b 100644
--- a/app/addons/styletests/base.js
+++ b/app/addons/styletests/base.js
@@ -18,16 +18,16 @@ define([
 
 function(app, FauxtonAPI, tests) {
 
-	tests.initialize = function() {
+  tests.initialize = function() {
 
-		FauxtonAPI.addHeaderLink({
-			title: "Tests",
-			href: '#/tests',
-			bottomNav: true,
-			icon: "fonticon-wrench"
-		});
+    FauxtonAPI.addHeaderLink({
+      title: "Tests",
+      href: '#/tests',
+      bottomNav: true,
+      icon: "fonticon-wrench"
+    });
 
-	};
+  };
 
-	return tests;
+  return tests;
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/styletests/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/routes.js b/app/addons/styletests/routes.js
index d6940f1..5ccbf0f 100644
--- a/app/addons/styletests/routes.js
+++ b/app/addons/styletests/routes.js
@@ -18,23 +18,23 @@ define([
 
 function(app, FauxtonAPI, Views) {
 
-	var TestRouteObject = FauxtonAPI.RouteObject.extend({
-		layout: "one_pane",
-		routes: {
-			"tests": "initialize"
-		},
-		selectedHeader: 'theme tests',
-		crumbs:[],
+  var TestRouteObject = FauxtonAPI.RouteObject.extend({
+    layout: "one_pane",
+    routes: {
+      "tests": "initialize"
+    },
+    selectedHeader: 'theme tests',
+    crumbs:[],
     apiUrl: function(){
       return false;
     },
     initialize: function(){
-			this.setView("#dashboard-content", new Views.tests({}));
+      this.setView("#dashboard-content", new Views.tests({}));
     }
-	});
+  });
 
-	Views.RouteObjects = [TestRouteObject];
+  Views.RouteObjects = [TestRouteObject];
 
-	return Views;
+  return Views;
 
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/verifyinstall/base.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/base.js b/app/addons/verifyinstall/base.js
index a64d44a..bfdb321 100644
--- a/app/addons/verifyinstall/base.js
+++ b/app/addons/verifyinstall/base.js
@@ -19,11 +19,11 @@ define([
 function(app, FauxtonAPI, VerifyInstall) {
   VerifyInstall.initialize = function () {
     FauxtonAPI.addHeaderLink({
-        title: 'Verify',
-        href: '#verifyinstall',
-        icon: 'fonticon-ok-circled',
-        bottomNav: true
-      });
+      title: 'Verify',
+      href: '#verifyinstall',
+      icon: 'fonticon-ok-circled',
+      bottomNav: true
+    });
   };
 
   return VerifyInstall;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/verifyinstall/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/resources.js b/app/addons/verifyinstall/resources.js
index 8adbc03..a422ee7 100644
--- a/app/addons/verifyinstall/resources.js
+++ b/app/addons/verifyinstall/resources.js
@@ -42,7 +42,7 @@ function (app, FauxtonAPI, Databases, Documents) {
     },
 
     destroyDoc: function () {
-     return doc.destroy();
+      return doc.destroy();
     },
 
     updateDoc: function () {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/verifyinstall/views.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/views.js b/app/addons/verifyinstall/views.js
index d22681c..a7e9b9a 100644
--- a/app/addons/verifyinstall/views.js
+++ b/app/addons/verifyinstall/views.js
@@ -108,9 +108,9 @@ function(app, FauxtonAPI, VerifyInstall) {
         return testProcess.testReplicate();
       }, formatError('replicate'))
       .then(function () {
-          setPass('replicate');
-          complete();
-          testProcess.removeDBs();
+        setPass('replicate');
+        complete();
+        testProcess.removeDBs();
       }, formatError('replicate'));
 
       this.enableButton();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/core/layout.js
----------------------------------------------------------------------
diff --git a/app/core/layout.js b/app/core/layout.js
index ff709cb..e6f1040 100644
--- a/app/core/layout.js
+++ b/app/core/layout.js
@@ -78,7 +78,7 @@ define([
 
       if (!view) {
         return false;
-        }
+      }
 
       this.layout.removeView(selector);
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/core/routeObject.js
----------------------------------------------------------------------
diff --git a/app/core/routeObject.js b/app/core/routeObject.js
index 664c579..8132e7e 100644
--- a/app/core/routeObject.js
+++ b/app/core/routeObject.js
@@ -261,7 +261,7 @@ function(FauxtonAPI, Backbone) {
       }
 
       _.each(promise, function (p) {
-          this._promises.push(p);
+        this._promises.push(p);
       }, this);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index 1fab584..5b427ee 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -92,11 +92,11 @@ module.exports = function(grunt) {
 
   grunt.registerMultiTask('gen_initialize', 'Generate the app.js file', function() {
     var _ = grunt.util._,
-        settings = this.data,
-        template = "app/initialize.js.underscore",
-        dest = "app/initialize.js"
-        tmpl = _.template(grunt.file.read(template)),
-        app = {};
+      settings = this.data,
+      template = "app/initialize.js.underscore",
+      dest = "app/initialize.js",
+      tmpl = _.template(grunt.file.read(template)),
+      app = {};
 
 
     _.defaults(app, settings.app, {
@@ -114,8 +114,8 @@ module.exports = function(grunt) {
         _ = grunt.util._,
         configTemplateSrc = data.template;
 
-   var fileSrc = grunt.option('file') || data.files.src;
-   var testFiles =  grunt.file.expand(fileSrc);
+    var fileSrc = grunt.option('file') || data.files.src;
+    var testFiles =  grunt.file.expand(fileSrc);
 
     var configTemplate = _.template(grunt.file.read(configTemplateSrc));
     // a bit of a nasty hack to read our current config.js and get the info so we can change it

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/test/nightwatch_tests/helpers/helpers.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/helpers/helpers.js b/test/nightwatch_tests/helpers/helpers.js
index 0fd6a95..f827268 100644
--- a/test/nightwatch_tests/helpers/helpers.js
+++ b/test/nightwatch_tests/helpers/helpers.js
@@ -34,7 +34,7 @@ module.exports = {
       // create a new database
       nano.db.create(database, function (err, body, header) {
         if (err) {
-         console.log('Error in setting up ' + database, err.message);
+          console.log('Error in setting up ' + database, err.message);
         }
         nano.db.create('_replicator', function (err, body, header) {
           done();


[11/11] fauxton commit: updated refs/heads/master to 9343084

Posted by ro...@apache.org.
add style check to gruntfile

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/9343084a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/9343084a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/9343084a

Branch: refs/heads/master
Commit: 9343084ace991386fab014529efdfdc67e10f389
Parents: ae16ad9
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Mon Mar 23 02:30:10 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:12:07 2015 +0100

----------------------------------------------------------------------
 Gruntfile.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9343084a/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 1bbcd94..781d97d 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -409,6 +409,10 @@ module.exports = function (grunt) {
           command: 'node ./node_modules/react-tools/bin/jsx -x jsx app/addons/ app/addons/',
           stdout: true,
           failOnError: true
+      },
+
+      'stylecheck': {
+        command: 'npm run stylecheck',
       }
     },
 
@@ -508,7 +512,7 @@ module.exports = function (grunt) {
    */
   // clean out previous build artifacts and lint
   grunt.registerTask('lint', ['clean', 'jshint']);
-  grunt.registerTask('test', ['jsx', 'lint', 'dependencies', 'gen_initialize:development', 'test_inline']);
+  grunt.registerTask('test', ['jsx', 'lint', 'shell:stylecheck', 'dependencies', 'gen_initialize:development', 'test_inline']);
   // lighter weight test task for use inside dev/watch
   grunt.registerTask('test_inline', ['mochaSetup', 'jst', 'concat:test_config_js', 'mocha_phantomjs']);
   // Fetch dependencies (from git or local dir), lint them and make load_addons
@@ -528,9 +532,9 @@ module.exports = function (grunt) {
 
   // build a debug release
   grunt.registerTask('debug', ['lint', 'dependencies', "gen_initialize:development", 'jsx', 'concat:requirejs', 'less', 'concat:index_css', 'template:development', 'copy:debug']);
-  grunt.registerTask('debugDev', ['clean', 'dependencies', "gen_initialize:development", 'jsx', 'jshint', 'less', 'concat:index_css', 'template:development', 'copy:debug']);
+  grunt.registerTask('debugDev', ['clean', 'dependencies', "gen_initialize:development", 'jsx', 'jshint', 'shell:stylecheck', 'less', 'concat:index_css', 'template:development', 'copy:debug']);
 
-  grunt.registerTask('watchRun', ['clean:watch', 'dependencies', 'jshint']);
+  grunt.registerTask('watchRun', ['clean:watch', 'dependencies', 'jshint', 'shell:stylecheck']);
 
   // build a release
   grunt.registerTask('release_commons_prefix', ['clean', 'dependencies']);


[07/11] fauxton commit: updated refs/heads/master to 9343084

Posted by ro...@apache.org.
styleguide: requireSpaceBeforeBlockStatements

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/e3425b03
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/e3425b03
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/e3425b03

Branch: refs/heads/master
Commit: e3425b03f59e0b3382731953057b5bf5a959972b
Parents: ba123f4
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 22 21:57:55 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:11:54 2015 +0100

----------------------------------------------------------------------
 Gruntfile.js                                    | 18 ++++++------
 app/addons/activetasks/views.js                 |  4 +--
 app/addons/config/views.js                      |  4 +--
 app/addons/databases/base.js                    |  2 +-
 app/addons/databases/resources.js               |  8 +++---
 app/addons/documents/index-editor/stores.js     |  2 +-
 .../pagination/tests/paginationStoreSpec.js     |  4 +--
 app/addons/documents/resources.js               | 14 ++++-----
 app/addons/documents/shared-resources.js        | 10 +++----
 app/addons/documents/shared-views.js            | 14 ++++-----
 .../tests/nightwatch/editDocumentsFromView.js   |  2 +-
 app/addons/documents/tests/storesSpec.js        |  2 +-
 app/addons/documents/views-doceditor.js         |  4 +--
 app/addons/documents/views-queryoptions.js      |  4 +--
 app/addons/documents/views.js                   |  2 +-
 app/addons/fauxton/components.js                | 30 ++++++++++----------
 app/addons/fauxton/stores.js                    |  4 +--
 app/addons/fauxton/templates/menu_dropdown.html |  2 +-
 .../permissions/assets/less/permissions.less    |  2 +-
 app/addons/replication/resources.js             |  6 ++--
 app/addons/replication/route.js                 |  2 +-
 app/addons/replication/templates/form.html      |  4 +--
 app/addons/replication/views.js                 |  4 +--
 app/addons/styletests/routes.js                 |  4 +--
 app/core/layout.js                              |  4 +--
 app/core/routeObject.js                         |  8 +++---
 app/core/router.js                              |  2 +-
 app/core/utils.js                               | 10 +++----
 tasks/addon/template.js                         |  2 +-
 tasks/fauxton.js                                | 10 +++----
 30 files changed, 94 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 98a46a6..22997d1 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -41,9 +41,9 @@ module.exports = function(grunt) {
 
   var cleanableAddons =  function () {
     var theListToClean = [];
-    helper.processAddons(function(addon){
+    helper.processAddons(function(addon) {
       // Only clean addons that are included from a local dir
-      if (addon.path){
+      if (addon.path) {
         theListToClean.push("app/addons/" + addon.name);
       }
     });
@@ -51,14 +51,14 @@ module.exports = function(grunt) {
     return theListToClean;
   }();
 
-  var cleanable = function(){
+  var cleanable = function() {
     // Whitelist files and directories to be cleaned
     // You'll always want to clean these two directories
     // Now find the external addons you have and add them for cleaning up
     return _.union(["dist/", "app/load_addons.js"], cleanableAddons);
   }();
 
-  var assets = function(){
+  var assets = function() {
     // Base assets
     var theAssets = {
       less:{
@@ -73,11 +73,11 @@ module.exports = function(grunt) {
       // fauxton.css should load first
       css: ["assets/css/*.css", "dist/debug/css/fauxton.css"]
     };
-    helper.processAddons(function(addon){
+    helper.processAddons(function(addon) {
       // Less files from addons
       var root = addon.path || "app/addons/" + addon.name;
       var lessPath = root + "/assets/less";
-      if(fs.existsSync(lessPath)){
+      if(fs.existsSync(lessPath)) {
         // .less files exist for this addon
         theAssets.less.paths.push(lessPath);
         theAssets.less.files["dist/debug/css/" + addon.name + ".css"] =
@@ -87,18 +87,18 @@ module.exports = function(grunt) {
       // Images
       root = addon.path || "app/addons/" + addon.name;
       var imgPath = root + "/assets/img";
-      if(fs.existsSync(imgPath)){
+      if(fs.existsSync(imgPath)) {
         theAssets.img.push(imgPath + "/**");
       }
       var fontsPath = root + "/assets/fonts";
-      if(fs.existsSync(fontsPath)){
+      if(fs.existsSync(fontsPath)) {
         theAssets.fonts.push(fontsPath + "/**");
       }
     });
     return theAssets;
   }();
 
-  var templateSettings = function(){
+  var templateSettings = function() {
     var defaultSettings = {
      "development": {
         "src": "assets/index.underscore",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/activetasks/views.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/views.js b/app/addons/activetasks/views.js
index bd3e30a..053e252 100644
--- a/app/addons/activetasks/views.js
+++ b/app/addons/activetasks/views.js
@@ -137,7 +137,7 @@ function (app, FauxtonAPI, ActiveTasks) {
       this.$('.task-tabs').find('li').eq(0).addClass('active');
     },
 
-    changePollInterval: function(e){
+    changePollInterval: function(e) {
       var range = this.$(e.currentTarget).val();
       this.$('label[for="pollingRange"] span').text(range);
       pollingInfo.rate = range;
@@ -149,7 +149,7 @@ function (app, FauxtonAPI, ActiveTasks) {
       clearInterval(pollingInfo.intervalId);
     },
 
-    requestByType: function(e){
+    requestByType: function(e) {
       var currentTarget = e.currentTarget,
           filter = this.$(currentTarget).attr('data-type');
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/config/views.js
----------------------------------------------------------------------
diff --git a/app/addons/config/views.js b/app/addons/config/views.js
index a234810..f04aec8 100644
--- a/app/addons/config/views.js
+++ b/app/addons/config/views.js
@@ -111,7 +111,7 @@ function(app, FauxtonAPI, Config, Components) {
   Views.Table = FauxtonAPI.View.extend({
     template: "addons/config/templates/dashboard",
 
-    initialize: function(){
+    initialize: function() {
       this.listenTo(FauxtonAPI.Events, "config:newSection", this.render);
       this.listenTo(FauxtonAPI.Events, "config:rerender", this.render);
     },
@@ -257,7 +257,7 @@ function(app, FauxtonAPI, Config, Components) {
       this.$('li').removeClass('active');
       this.$('a[data-type-select="' + this.selectedTab + '"]').parent("li").addClass('active');
     },
-    afterRender: function(){
+    afterRender: function() {
       this.setSelectedTab(this.selectedTab);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/databases/base.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/base.js b/app/addons/databases/base.js
index 1be1ddf..e5aafd6 100644
--- a/app/addons/databases/base.js
+++ b/app/addons/databases/base.js
@@ -57,7 +57,7 @@ function(app, FauxtonAPI, Databases, Views) {
   });
 
   FauxtonAPI.registerUrls('allDBs', {
-    app: function(){
+    app: function() {
       return '_all_dbs' ;
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/databases/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/resources.js b/app/addons/databases/resources.js
index 89c1c47..39e05a3 100644
--- a/app/addons/databases/resources.js
+++ b/app/addons/databases/resources.js
@@ -44,7 +44,7 @@ function(app, FauxtonAPI, Documents) {
       return this.allDocs;
     },
 
-    isNew: function(){
+    isNew: function() {
       // Databases are never new, to make Backbone do a PUT
       return false;
     },
@@ -70,7 +70,7 @@ function(app, FauxtonAPI, Documents) {
         return app.host + "/" + this.safeID();
       }
     },
-    safeName: function(){
+    safeName: function() {
       return app.utils.safeURLName(this.get("name"));
     },
     safeID: function() {
@@ -96,7 +96,7 @@ function(app, FauxtonAPI, Documents) {
       this.database = options.database;
       this.params = options.params;
     },
-    documentation: function(){
+    documentation: function() {
       return FauxtonAPI.constants.DOC_URLS.CHANGES;
     },
     url: function (context) {
@@ -149,7 +149,7 @@ function(app, FauxtonAPI, Documents) {
     },
 
     dataSize: function () {
-      if (this.get("other")){
+      if (this.get("other")) {
         return this.get("other").data_size;
       } else if (this.get('data_size')) {
         return this.get('data_size');

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/index-editor/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-editor/stores.js b/app/addons/documents/index-editor/stores.js
index d96783b..bfcdf29 100644
--- a/app/addons/documents/index-editor/stores.js
+++ b/app/addons/documents/index-editor/stores.js
@@ -21,7 +21,7 @@ function(FauxtonAPI, ActionTypes) {
   Stores.IndexEditorStore = FauxtonAPI.Store.extend({
 
     defaultMap: 'function(doc) {\n  emit(doc._id, 1);\n}',
-    defaultReduce: 'function(keys, values, rereduce){\n  if (rereduce){\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}',
+    defaultReduce: 'function(keys, values, rereduce) {\n  if (rereduce) {\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}',
 
     editIndex: function (options) {
       this._database = options.database;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/pagination/tests/paginationStoreSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/pagination/tests/paginationStoreSpec.js b/app/addons/documents/pagination/tests/paginationStoreSpec.js
index 0c45c88..2230af5 100644
--- a/app/addons/documents/pagination/tests/paginationStoreSpec.js
+++ b/app/addons/documents/pagination/tests/paginationStoreSpec.js
@@ -194,13 +194,13 @@ define([
         assert.equal(store.getPerPage(), 20);
       });
 
-      it('uses localstorage when available', function (){
+      it('uses localstorage when available', function () {
         window.localStorage.setItem('fauxton:perpage', 44);
         store.initPerPage();
         assert.equal(store.getPerPage(), 44);
       });
 
-      it('uses doc limit when its less than perPage', function (){
+      it('uses doc limit when its less than perPage', function () {
         window.localStorage.setItem('fauxton:perpage', 100);
         store._docLimit = 6;
         store.initPerPage();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/resources.js b/app/addons/documents/resources.js
index 025c4ea..18bb213 100644
--- a/app/addons/documents/resources.js
+++ b/app/addons/documents/resources.js
@@ -47,7 +47,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
   Documents.DdocInfo = FauxtonAPI.Model.extend({
     idAttribute: "_id",
-    documentation: function(){
+    documentation: function() {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
     initialize: function (_attrs, options) {
@@ -177,7 +177,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
   Documents.IndexCollection = PagingCollection.extend({
     model: Documents.Doc,
-    documentation: function(){
+    documentation: function() {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
     initialize: function(_models, options) {
@@ -259,7 +259,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       return PagingCollection.prototype.parse.apply(this, arguments);
     },
 
-    buildAllDocs: function(){
+    buildAllDocs: function() {
       this.fetch();
     },
 
@@ -270,7 +270,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       return PagingCollection.prototype.fetch.call(this);
     },
 
-    allDocs: function(){
+    allDocs: function() {
       return this.models;
     },
 
@@ -311,7 +311,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
   Documents.PouchIndexCollection = PagingCollection.extend({
     model: Documents.ViewRow,
-    documentation: function(){
+    documentation: function() {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
     initialize: function(_models, options) {
@@ -368,11 +368,11 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       return this.viewMeta.update_seq || false;
     },
 
-    buildAllDocs: function(){
+    buildAllDocs: function() {
       this.fetch();
     },
 
-    allDocs: function(){
+    allDocs: function() {
       return this.models;
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/shared-resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-resources.js b/app/addons/documents/shared-resources.js
index 6299e2c..930c600 100644
--- a/app/addons/documents/shared-resources.js
+++ b/app/addons/documents/shared-resources.js
@@ -23,7 +23,7 @@ define([
 
   Documents.Doc = FauxtonAPI.Model.extend({
     idAttribute: "_id",
-    documentation: function(){
+    documentation: function() {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
     url: function(context) {
@@ -61,7 +61,7 @@ define([
       return this.docType() != "reduction";
     },
 
-    isFromView: function(){
+    isFromView: function() {
       return !this.id;
     },
 
@@ -155,7 +155,7 @@ define([
     // treated separately. For instance, we could default into the
     // json editor for docs, or into a ddoc specific page.
     safeID: function() {
-      if (this.isDdoc()){
+      if (this.isDdoc()) {
         var ddoc = this.id.replace(/^_design\//, "");
         return "_design/" + app.utils.safeURLName(ddoc);
       }else{
@@ -288,11 +288,11 @@ define([
 
       // remove any query errors that may return without doc info
       // important for when querying keys on all docs
-      var cleanRows = _.filter(rows, function(row){
+      var cleanRows = _.filter(rows, function(row) {
         return row.value;
       });
 
-      resp.rows = _.map(cleanRows, function(row){
+      resp.rows = _.map(cleanRows, function(row) {
         return {
           _id: row.id,
           _rev: row.value.rev,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/shared-views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-views.js b/app/addons/documents/shared-views.js
index 6f614bd..f4595f8 100644
--- a/app/addons/documents/shared-views.js
+++ b/app/addons/documents/shared-views.js
@@ -118,7 +118,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       this.designDocList = [];
 
       this.collection.each(function(design) {
-        if (design.has('doc')){
+        if (design.has('doc')) {
           design.collection = this.collection;
           var view = this.insertView(new Views.DdocSidenav({
             model: design,
@@ -143,7 +143,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       this.$('li').removeClass('active');
       $selectedTab.parent().addClass('active');
 
-      if ($selectedTab.parents(".accordion-body").length !== 0){
+      if ($selectedTab.parents(".accordion-body").length !== 0) {
         $selectedTab
         .parents(".accordion-body")
         .addClass("in")
@@ -163,10 +163,10 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       "click .js-collapse-toggle": "toggleArrow"
     },
 
-    toggleArrow:  function(e){
+    toggleArrow:  function(e) {
       this.$(e.currentTarget).toggleClass("down");
     },
-    buildIndexList: function(designDocs, info){
+    buildIndexList: function(designDocs, info) {
       var design = this.model.id.replace(/^_design\//, "");
       var databaseId = this.model.database.id;
 
@@ -181,7 +181,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       }));
     },
 
-    serialize: function(){
+    serialize: function() {
       var ddocName = this.model.id.replace(/^_design\//, ""),
           docSafe = app.utils.safeURLName(ddocName),
           databaseName = this.collection.database.safeID();
@@ -220,7 +220,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       var ddocDocs = this.model.get("doc"),
           sidebarListTypes = FauxtonAPI.getExtensions('sidebar:list');
 
-      if (!ddocDocs){ return; }
+      if (!ddocDocs) { return; }
 
       this.buildIndexList(ddocDocs, {
         selector: "views",
@@ -252,7 +252,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
     template: "addons/documents/templates/index_menu_item",
     tagName: 'li',
 
-    initialize: function(options){
+    initialize: function(options) {
       this.index = options.index;
       this.ddoc = options.ddoc;
       this.database = options.database;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/editDocumentsFromView.js b/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
index bc8a214..6aa2c37 100644
--- a/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
+++ b/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
@@ -19,7 +19,7 @@ module.exports = {
         ddocContents = {
           "views": {
             "evens": {
-              "map": "function (doc) { if (doc.number%2 === 0){ emit(doc._id, doc.number); } }",
+              "map": "function (doc) { if (doc.number%2 === 0) { emit(doc._id, doc.number); } }",
               "reduce" : "_count"
             }
           },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/tests/storesSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/storesSpec.js b/app/addons/documents/tests/storesSpec.js
index 89adfaa..492213c 100644
--- a/app/addons/documents/tests/storesSpec.js
+++ b/app/addons/documents/tests/storesSpec.js
@@ -207,7 +207,7 @@ define([
             type: ActionTypes.SELECT_REDUCE_CHANGE,
             reduceSelectedOption: 'CUSTOM'
           });
-          assert.equal(store.getReduce(), 'function(keys, values, rereduce){\n  if (rereduce){\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}');
+          assert.equal(store.getReduce(), 'function(keys, values, rereduce) {\n  if (rereduce) {\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}');
         });
       });
     });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/views-doceditor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-doceditor.js b/app/addons/documents/views-doceditor.js
index f091a7d..9cc767e 100644
--- a/app/addons/documents/views-doceditor.js
+++ b/app/addons/documents/views-doceditor.js
@@ -582,8 +582,8 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
     afterRender: function () {
       var that = this;
       this.$('.modal').on('hide', function (e) {
-        if(that.subEditor.edited){
-          if(!confirm("Close without saving changes?")){
+        if(that.subEditor.edited) {
+          if(!confirm("Close without saving changes?")) {
             e.preventDefault();
             return;
           }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/views-queryoptions.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-queryoptions.js b/app/addons/documents/views-queryoptions.js
index 2271882..c9d1894 100644
--- a/app/addons/documents/views-queryoptions.js
+++ b/app/addons/documents/views-queryoptions.js
@@ -307,7 +307,7 @@ define([
         var $clickedEl = $(e.currentTarget);
         var $keyFieldsWrapper = this.$(".js-query-keys-wrapper");
 
-        if ($clickedEl.hasClass("active")){
+        if ($clickedEl.hasClass("active")) {
           $clickedEl.removeClass("active");
           $keyFieldsWrapper.addClass("hide");
         } else {
@@ -333,7 +333,7 @@ define([
         this.$('[name="keys"]').removeAttr("disabled");
       },
 
-      showBetweenKeysSection: function (){
+      showBetweenKeysSection: function () {
         this.$("#js-showStartEnd").show();
         this.$('[name="startkey"],[name="endkey"],[name="inclusive_end"]').removeAttr("disabled");
         this.$('.js-disabled-message').hide();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 323a5c8..b7a2257 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -555,7 +555,7 @@ function (app, FauxtonAPI, Components, Documents,
       return this.model.fetch();
     },
 
-    afterRender: function(){
+    afterRender: function() {
       this.startRefreshInterval();
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index e532ff6..0348296 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -73,7 +73,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       }
     },
 
-    beforeRender: function(){
+    beforeRender: function() {
       this.setUpCrumbs();
       this.setUpDropDownMenu();
 
@@ -82,14 +82,14 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       }
     },
 
-    setUpCrumbs: function(){
+    setUpCrumbs: function() {
       this.breadcrumbs = this.insertView("#header-breadcrumbs", new Components.Breadcrumbs({
         crumbs: this.crumbs
       }));
     },
 
-    setUpDropDownMenu: function(){
-      if (this.dropdownMenuLinks){
+    setUpDropDownMenu: function() {
+      if (this.dropdownMenuLinks) {
         this.dropdown = this.insertView("#header-dropdown-menu", new Components.MenuDropDown({
           icon: 'fonticon-cog',
           links: this.dropdownMenuLinks,
@@ -437,7 +437,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
     },
 
     showModal: function () {
-      if (this._showModal){ this._showModal();}
+      if (this._showModal) { this._showModal();}
       this.clear_error_msg();
       this.$('.modal').modal();
 
@@ -464,7 +464,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
     },
 
     serialize: function () {
-      if (this.model){
+      if (this.model) {
         return this.model.toJSON();
       }
       return {};
@@ -674,7 +674,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       return Math.floor(this.availableEditorHeight  / singleLine);
     },
 
-    getLines: function(){
+    getLines: function() {
       return this.editor.getSession().getDocument().getLength();
     },
 
@@ -802,12 +802,12 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
   Components.MenuDropDown = FauxtonAPI.View.extend({
     template: "addons/fauxton/templates/menu_dropdown",
     className: "dropdown",
-    initialize: function(options){
+    initialize: function(options) {
       this.links = options.links;
       this.icon = options.icon || "fonticon-plus-circled";
       this.setUpEvents();
     },
-    setUpEvents: function(){
+    setUpEvents: function() {
       this.events = {};
       _.each(this.links, function (parentLink) {
         _.each(parentLink.links, function (link) {
@@ -816,16 +816,16 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
         }, this);
       }, this);
     },
-    triggerEvent: function(e){
+    triggerEvent: function(e) {
       e.preventDefault();
       var eventTrigger = $(e.currentTarget).attr('triggerEvent');
       FauxtonAPI.Events.trigger(eventTrigger);
     },
-    update: function(links){
+    update: function(links) {
       this.links = links;
       this.render();
     },
-    serialize: function(){
+    serialize: function() {
       return {
         links: this.links,
         icon: this.icon
@@ -936,7 +936,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
   var routeObjectSpinner;
 
   FauxtonAPI.RouteObject.on('beforeEstablish', function (routeObject) {
-    if (!routeObject.disableLoader){
+    if (!routeObject.disableLoader) {
       var opts = {
         lines: 16, // The number of lines to draw
         length: 8, // The length of each line
@@ -971,7 +971,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
   var removeViewSpinner = function (selector) {
     var viewSpinner = viewSpinners[selector];
 
-    if (viewSpinner){
+    if (viewSpinner) {
       viewSpinner.stop();
       $(selector).find('.spinner').remove();
       delete viewSpinners[selector];
@@ -982,7 +982,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
   FauxtonAPI.RouteObject.on('beforeRender', function (routeObject, view, selector) {
     removeRouteObjectSpinner();
 
-    if (!view.disableLoader){
+    if (!view.disableLoader) {
       var opts = {
         lines: 16, // The number of lines to draw
         length: 8, // The length of each line

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/fauxton/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/stores.js b/app/addons/fauxton/stores.js
index 04b7be4..5211d9e 100644
--- a/app/addons/fauxton/stores.js
+++ b/app/addons/fauxton/stores.js
@@ -41,9 +41,9 @@ function(app, FauxtonAPI, ActionTypes) {
     },
 
     addLink: function (link) {
-      if (link.top && !link.bottomNav){
+      if (link.top && !link.bottomNav) {
         this.navLinks.unshift(link);
-      } else if (link.top && link.bottomNav){
+      } else if (link.top && link.bottomNav) {
         this.bottomNavLinks.unshift(link);
       } else if (link.bottomNav) {
         this.bottomNavLinks.push(link);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/fauxton/templates/menu_dropdown.html
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/templates/menu_dropdown.html b/app/addons/fauxton/templates/menu_dropdown.html
index 3881a34..1fc3b16 100644
--- a/app/addons/fauxton/templates/menu_dropdown.html
+++ b/app/addons/fauxton/templates/menu_dropdown.html
@@ -21,7 +21,7 @@ the License.
     <% _.each(linkSection.links, function (link) { %>
       <li>
         <a
-          <% if (link.trigger){ %> data-bypass="true" triggerEvent="<%-link.trigger%>" <%}%>
+          <% if (link.trigger) { %> data-bypass="true" triggerEvent="<%-link.trigger%>" <%}%>
           <% if (link.icon) { %>
           class="icon <%- link.icon %>"
           <% } %>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/permissions/assets/less/permissions.less
----------------------------------------------------------------------
diff --git a/app/addons/permissions/assets/less/permissions.less b/app/addons/permissions/assets/less/permissions.less
index 3c52906..fdf1b31 100644
--- a/app/addons/permissions/assets/less/permissions.less
+++ b/app/addons/permissions/assets/less/permissions.less
@@ -20,7 +20,7 @@
     &:first-child {
       border-top: 1px solid #E3E3E3;
     }
-    &:nth-child(odd){
+    &:nth-child(odd) {
       border-left: 3px solid red;
     }
   }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/replication/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/resources.js b/app/addons/replication/resources.js
index dc74650..69fe1c1 100644
--- a/app/addons/replication/resources.js
+++ b/app/addons/replication/resources.js
@@ -49,9 +49,9 @@ function (app, FauxtonAPI) {
     url: function () {
       return app.host + '/_active_tasks';
     },
-    parse: function(resp){
+    parse: function(resp) {
       //only want replication tasks to return
-      return _.filter(resp, function(task){
+      return _.filter(resp, function(task) {
         return task.type === 'replication';
       });
     }
@@ -59,7 +59,7 @@ function (app, FauxtonAPI) {
 
   Replication.Replicate = Backbone.Model.extend({
     documentation: FauxtonAPI.constants.DOC_URLS.REPLICATION,
-    url: function(){
+    url: function() {
       return window.location.origin + '/_replicate';
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/replication/route.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/route.js b/app/addons/replication/route.js
index a40f0b8..8ec0c73 100644
--- a/app/addons/replication/route.js
+++ b/app/addons/replication/route.js
@@ -30,7 +30,7 @@ function(app, FauxtonAPI, Replication, Views) {
     crumbs: [
       { "name": 'Replicate changes from: ', 'link': 'replication' }
     ],
-    defaultView: function(dbname){
+    defaultView: function(dbname) {
       var isAdmin = FauxtonAPI.session.isAdmin();
 
       this.tasks = [];

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/replication/templates/form.html
----------------------------------------------------------------------
diff --git a/app/addons/replication/templates/form.html b/app/addons/replication/templates/form.html
index 60de499..4dc12f4 100644
--- a/app/addons/replication/templates/form.html
+++ b/app/addons/replication/templates/form.html
@@ -21,8 +21,8 @@ the License.
 
     <div class="from_local local_option">
       <select id="from_name" name="source">
-        <% _.each( databases, function( db, i ){ %>
-           <option value="<%- db.name %>" <% if(selectedDB == db.name){%>selected<%}%> ><%- db.name %></option>
+        <% _.each( databases, function( db, i ) { %>
+           <option value="<%- db.name %>" <% if(selectedDB == db.name) {%>selected<%}%> ><%- db.name %></option>
         <% }); %>
       </select>
     </div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/views.js b/app/addons/replication/views.js
index 8e98812..c072e11 100644
--- a/app/addons/replication/views.js
+++ b/app/addons/replication/views.js
@@ -137,7 +137,7 @@ function(app, FauxtonAPI, Components, Replication) {
       return error;
     },
 
-    serialize: function(){
+    serialize: function() {
       return {
         databases:  this.collection.toJSON(),
         selectedDB: this.selectedDB
@@ -169,7 +169,7 @@ function(app, FauxtonAPI, Components, Replication) {
       this.enableFields();
     },
 
-    updateButtonText: function(wait){
+    updateButtonText: function(wait) {
       var $button = this.$('#replication button[type=submit]');
       if (wait) {
         $button.text('Starting replication...').attr('disabled', true);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/styletests/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/routes.js b/app/addons/styletests/routes.js
index 5ccbf0f..1595874 100644
--- a/app/addons/styletests/routes.js
+++ b/app/addons/styletests/routes.js
@@ -25,10 +25,10 @@ function(app, FauxtonAPI, Views) {
     },
     selectedHeader: 'theme tests',
     crumbs:[],
-    apiUrl: function(){
+    apiUrl: function() {
       return false;
     },
-    initialize: function(){
+    initialize: function() {
       this.setView("#dashboard-content", new Views.tests({}));
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/core/layout.js
----------------------------------------------------------------------
diff --git a/app/core/layout.js b/app/core/layout.js
index e6f1040..fe6e53b 100644
--- a/app/core/layout.js
+++ b/app/core/layout.js
@@ -40,14 +40,14 @@ define([
     },
 
     setTemplate: function(template) {
-      if (template.prefix){
+      if (template.prefix) {
         this.layout.template = template.prefix + template.name;
       } else{
         this.layout.template = "templates/layouts/" + template;
       }
       // If we're changing layouts all bets are off, so kill off all the
       // existing views in the layout.
-      _.each(this.layoutViews, function(view){view.removeView();});
+      _.each(this.layoutViews, function(view) {view.removeView();});
       this.layoutViews = {};
       return this.render().promise();
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/core/routeObject.js
----------------------------------------------------------------------
diff --git a/app/core/routeObject.js b/app/core/routeObject.js
index a1c3865..03a9a0b 100644
--- a/app/core/routeObject.js
+++ b/app/core/routeObject.js
@@ -112,7 +112,7 @@ function(FauxtonAPI, Backbone) {
       });
     },
 
-    setTemplateOnFullRender: function(masterLayout){
+    setTemplateOnFullRender: function(masterLayout) {
 
       var promise = $.Deferred();
 
@@ -161,7 +161,7 @@ function(FauxtonAPI, Backbone) {
       return this.callEstablish(view.establish()).then(renderViewOnLayout, this.establishError);
     },
 
-    renderViewOnLayout: function(viewInfo, resp, xhr){
+    renderViewOnLayout: function(viewInfo, resp, xhr) {
       var masterLayout = viewInfo.masterLayout,
           triggerBroadcast = _.bind(this.triggerBroadcast, this);
 
@@ -175,7 +175,7 @@ function(FauxtonAPI, Backbone) {
       return promise;
     },
 
-    establishError: function(resp){
+    establishError: function(resp) {
       if (!resp || !resp.responseText) { return; }
       FauxtonAPI.addNotification({
             msg: 'An Error occurred: ' + JSON.parse(resp.responseText).reason,
@@ -190,7 +190,7 @@ function(FauxtonAPI, Backbone) {
       this.triggerBroadcast('renderComplete');
     },
 
-    setRenderedState: function(bool){
+    setRenderedState: function(bool) {
       this.renderedState = bool;
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/core/router.js
----------------------------------------------------------------------
diff --git a/app/core/router.js b/app/core/router.js
index 6d15a6c..08a78a6 100644
--- a/app/core/router.js
+++ b/app/core/router.js
@@ -77,7 +77,7 @@ function(FauxtonAPI, Auth, Backbone) {
 
     setModuleRoutes: function(addons) {
       _.each(addons, function(module) {
-        if (module){
+        if (module) {
           module.initialize();
           // This is pure routes the addon provides
           if (module.RouteObjects) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/core/utils.js
----------------------------------------------------------------------
diff --git a/app/core/utils.js b/app/core/utils.js
index c8faee0..7029c45 100644
--- a/app/core/utils.js
+++ b/app/core/utils.js
@@ -66,19 +66,19 @@ function ($, _) {
       return fragment;
     },
 
-    addWindowResize: function(fun, key){
+    addWindowResize: function(fun, key) {
       onWindowResize[key] = fun;
       // You shouldn't need to call it here. Just define it at startup and each time it will loop
       // through all the functions in the hash.
       //app.initWindowResize();
     },
 
-    removeWindowResize: function(key){
+    removeWindowResize: function(key) {
       delete onWindowResize[key];
       utils.initWindowResize();
     },
 
-    initWindowResize: function(){
+    initWindowResize: function() {
       //when calling this it should be overriding what was called previously
       window.onresize = function(e) {
         // could do this instead of the above for loop
@@ -88,11 +88,11 @@ function ($, _) {
       };
     },
 
-    removeSpecialCharacters: function(name){
+    removeSpecialCharacters: function(name) {
       return name.replace(/[^\w\s]/gi, "");
     },
 
-    safeURLName: function(name){
+    safeURLName: function(name) {
       var testName = name || "";
       var checkforBad = testName.match(/[\$\-/,+-]/g);
       return (checkforBad !== null) ? encodeURIComponent(name) : name;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/tasks/addon/template.js
----------------------------------------------------------------------
diff --git a/tasks/addon/template.js b/tasks/addon/template.js
index 91f95f1..89354e6 100644
--- a/tasks/addon/template.js
+++ b/tasks/addon/template.js
@@ -54,7 +54,7 @@ exports.template = function(grunt, init, done) {
       init.copyAndProcess(files, props);
 
       // Make the assets dir if requested
-      if (props.assets == "y"){
+      if (props.assets == "y") {
         var asspath = props.path + "/" + props.name.toLowerCase() + "/assets";
         grunt.file.mkdir(asspath);
         grunt.log.writeln("Created " + asspath);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index 0393b8e..a61ccf4 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -14,7 +14,7 @@ module.exports = function(grunt) {
   var _ = grunt.util._,
       fs = require('fs');
 
-  grunt.registerMultiTask('template', 'generates an html file from a specified template', function(){
+  grunt.registerMultiTask('template', 'generates an html file from a specified template', function() {
     var data = this.data,
         _ = grunt.util._,
         tmpl = _.template(grunt.file.read(data.src), null, data.variables);
@@ -33,7 +33,7 @@ module.exports = function(grunt) {
         _ = grunt.util._;
 
     // This should probably be a helper, though they seem to have been removed
-    var fetch = function(deps, command){
+    var fetch = function(deps, command) {
       var child_process = require('child_process');
       var async = require('async');
       async.forEach(deps, function(dep, cb) {
@@ -58,13 +58,13 @@ module.exports = function(grunt) {
 
     var remoteDeps = _.filter(settings.deps, function(dep) { return !! dep.url; });
     grunt.log.writeln(remoteDeps.length + " remote dependencies");
-    var remote = fetch(remoteDeps, function(dep, destination){
+    var remote = fetch(remoteDeps, function(dep, destination) {
       return "git clone " + dep.url + " " + destination;
     });
 
     var localDeps = _.filter(settings.deps, function(dep) { return !! dep.path; });
     grunt.log.writeln(localDeps.length + " local dependencies");
-    var local = fetch(localDeps, function(dep, destination){
+    var local = fetch(localDeps, function(dep, destination) {
       // TODO: Windows
       var command = "cp -r " + dep.path + " " + destination;
       grunt.log.writeln(command);
@@ -108,7 +108,7 @@ module.exports = function(grunt) {
     grunt.file.write(dest, tmpl(app));
   });
 
-  grunt.registerMultiTask('mochaSetup', 'Generate a config.js and runner.html for tests', function(){
+  grunt.registerMultiTask('mochaSetup', 'Generate a config.js and runner.html for tests', function() {
     var data = this.data,
         configInfo,
         _ = grunt.util._,


[05/11] fauxton commit: updated refs/heads/master to 9343084

Posted by ro...@apache.org.
styleguide: requireSpaceAfterBinaryOperators

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/3d108d27
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/3d108d27
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/3d108d27

Branch: refs/heads/master
Commit: 3d108d27308dbab6d3c72e818f8f53c830faab81
Parents: 55c8b18
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 22 21:50:44 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:11:49 2015 +0100

----------------------------------------------------------------------
 Gruntfile.js                                    | 18 ++++-----
 app/addons/activetasks/tests/viewsSpec.js       |  2 +-
 app/addons/auth/base.js                         |  2 +-
 app/addons/auth/resources.js                    |  2 +-
 app/addons/compaction/resources.js              |  2 +-
 app/addons/cors/tests/componentsSpec.react.jsx  |  6 +--
 app/addons/documents/base.js                    |  2 +-
 app/addons/documents/pagination/stores.js       |  2 +-
 app/addons/documents/resources.js               | 10 ++---
 app/addons/documents/routes-doc-editor.js       |  2 +-
 app/addons/documents/routes-index-editor.js     |  2 +-
 app/addons/documents/shared-resources.js        |  6 +--
 app/addons/documents/shared-views.js            | 16 ++++----
 .../tests/nightwatch/deletesDocument.js         |  2 +-
 .../tests/nightwatch/editDocumentsFromView.js   |  2 +-
 app/addons/documents/tests/resourcesSpec.js     | 42 ++++++++++----------
 app/addons/documents/views-doceditor.js         |  8 ++--
 app/addons/documents/views.js                   |  4 +-
 app/addons/fauxton/components.js                |  6 +--
 app/addons/permissions/tests/viewsSpec.js       |  3 +-
 app/addons/plugins/routes.js                    |  2 +-
 app/addons/replication/views.js                 |  4 +-
 app/addons/verifyinstall/resources.js           |  2 +-
 app/addons/verifyinstall/views.js               |  2 +-
 app/core/base.js                                |  2 +-
 app/core/routeObject.js                         |  2 +-
 app/core/tests/routeObjectSpec.js               |  6 +--
 app/core/utils.js                               |  4 +-
 tasks/couchserver.js                            | 14 +++----
 tasks/fauxton.js                                |  4 +-
 30 files changed, 91 insertions(+), 90 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 97228ea..98a46a6 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -67,7 +67,7 @@ module.exports = function(grunt) {
           "dist/debug/css/fauxton.css": "assets/less/fauxton.less"
         }
       },
-      fonts: ["assets/fonts/*.eot", "assets/fonts/*.svg", "assets/fonts/*.ttf", "assets/fonts/*.woff",],
+      fonts: ["assets/fonts/*.eot", "assets/fonts/*.svg", "assets/fonts/*.ttf", "assets/fonts/*.woff"],
       img: ["assets/img/**"],
       // used in concat:index_css to keep file ordering intact
       // fauxton.css should load first
@@ -277,16 +277,16 @@ module.exports = function(grunt) {
 
     watch: {
       js: {
-        files: helper.watchFiles(['.js'], ["./app/**/*.js", '!./app/load_addons.js',"./assets/**/*.js", "./test/**/*.js"]),
+        files: helper.watchFiles(['.js'], ["./app/**/*.js", '!./app/load_addons.js', "./assets/**/*.js", "./test/**/*.js"]),
         tasks: ['watchRun'],
       },
       jsx: {
-        files: helper.watchFiles(['.jsx'], ["./app/**/*.jsx", '!./app/load_addons.jsx',"./assets/**/*.jsx", "./test/**/*.jsx"]),
+        files: helper.watchFiles(['.jsx'], ["./app/**/*.jsx", '!./app/load_addons.jsx', "./assets/**/*.jsx", "./test/**/*.jsx"]),
         tasks: ['watchRun'],
       },
       style: {
-        files: helper.watchFiles(['.less','.css'],["./app/**/*.css","./app/**/*.less","./assets/**/*.css", "./assets/**/*.less"]),
-        tasks: ['clean:watch', 'dependencies','less', 'concat:index_css'],
+        files: helper.watchFiles(['.less', '.css'], ["./app/**/*.css", "./app/**/*.less", "./assets/**/*.css", "./assets/**/*.less"]),
+        tasks: ['clean:watch', 'dependencies', 'less', 'concat:index_css'],
       },
       html: {
         // the index.html is added in as a dummy file incase there is no
@@ -510,7 +510,7 @@ module.exports = function(grunt) {
   grunt.registerTask('lint', ['clean', 'jshint']);
   grunt.registerTask('test', ['jsx', 'lint', 'dependencies', 'gen_initialize:development', 'test_inline']);
   // lighter weight test task for use inside dev/watch
-  grunt.registerTask('test_inline', ['mochaSetup','jst', 'concat:test_config_js','mocha_phantomjs']);
+  grunt.registerTask('test_inline', ['mochaSetup', 'jst', 'concat:test_config_js', 'mocha_phantomjs']);
   // Fetch dependencies (from git or local dir), lint them and make load_addons
   grunt.registerTask('dependencies', ['get_deps', 'gen_load_addons:default']);
 
@@ -527,13 +527,13 @@ module.exports = function(grunt) {
   grunt.registerTask('dev', ['debugDev', 'couchserver']);
 
   // build a debug release
-  grunt.registerTask('debug', ['lint', 'dependencies', "gen_initialize:development", 'jsx', 'concat:requirejs','less', 'concat:index_css', 'template:development', 'copy:debug']);
-  grunt.registerTask('debugDev', ['clean', 'dependencies', "gen_initialize:development",'jsx', 'jshint','less', 'concat:index_css', 'template:development', 'copy:debug']);
+  grunt.registerTask('debug', ['lint', 'dependencies', "gen_initialize:development", 'jsx', 'concat:requirejs', 'less', 'concat:index_css', 'template:development', 'copy:debug']);
+  grunt.registerTask('debugDev', ['clean', 'dependencies', "gen_initialize:development", 'jsx', 'jshint', 'less', 'concat:index_css', 'template:development', 'copy:debug']);
 
   grunt.registerTask('watchRun', ['clean:watch', 'dependencies', 'jshint']);
 
   // build a release
-  grunt.registerTask('release_commons_prefix', ['clean' ,'dependencies']);
+  grunt.registerTask('release_commons_prefix', ['clean', 'dependencies']);
   grunt.registerTask('release_commons_suffix', ['jshint', 'shell:build-jsx', 'build', 'copy:dist', 'copy:ace', 'copy:zeroclip']);
 
   grunt.registerTask('release', ['release_commons_prefix', 'gen_initialize:release', 'release_commons_suffix']);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/activetasks/tests/viewsSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/tests/viewsSpec.js b/app/addons/activetasks/tests/viewsSpec.js
index 1048095..6f28f5b 100644
--- a/app/addons/activetasks/tests/viewsSpec.js
+++ b/app/addons/activetasks/tests/viewsSpec.js
@@ -47,7 +47,7 @@ define([
 
       it("Should clearInterval", function () {
         var $range = tabMenu.$('#pollingRange');
-        var clearIntervalMock = sinon.spy(window,'clearInterval');
+        var clearIntervalMock = sinon.spy(window, 'clearInterval');
         $range.trigger('input');
 
         assert.ok(clearIntervalMock.calledOnce);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/auth/base.js
----------------------------------------------------------------------
diff --git a/app/addons/auth/base.js b/app/addons/auth/base.js
index 5aacdd3..d1f6d65 100644
--- a/app/addons/auth/base.js
+++ b/app/addons/auth/base.js
@@ -96,7 +96,7 @@ function(app, FauxtonAPI, Auth) {
     };
 
     var authDenied = function () {
-      var url = window.location.hash.replace('#','');
+      var url = window.location.hash.replace('#', '');
       FauxtonAPI.navigate('/login?urlback=' + url, {replace: true});
     };
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/auth/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/auth/resources.js b/app/addons/auth/resources.js
index b879d31..b8fc9b0 100644
--- a/app/addons/auth/resources.js
+++ b/app/addons/auth/resources.js
@@ -342,7 +342,7 @@ function (app, FauxtonAPI, CouchdbSession) {
     setTab: function (selectedTab) {
       this.selectedTab = selectedTab;
       this.$('.active').removeClass('active');
-      var $tab = this.$('a[data-select="' + selectedTab +'"]');
+      var $tab = this.$('a[data-select="' + selectedTab + '"]');
       $tab.parent().addClass('active');
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/compaction/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/compaction/resources.js b/app/addons/compaction/resources.js
index 6633677..a982a17 100644
--- a/app/addons/compaction/resources.js
+++ b/app/addons/compaction/resources.js
@@ -38,7 +38,7 @@ function (app, FauxtonAPI) {
   Compaction.compactView = function (db, designDoc) {
     // /some_database/_compact/designname
     return $.ajax({
-      url: db.url() + '/_compact/' + designDoc.replace('_design/','') ,
+      url: db.url() + '/_compact/' + designDoc.replace('_design/', '') ,
       contentType: 'application/json',
       type: 'POST'
     });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/cors/tests/componentsSpec.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/cors/tests/componentsSpec.react.jsx b/app/addons/cors/tests/componentsSpec.react.jsx
index 20d84c3..d71f355 100644
--- a/app/addons/cors/tests/componentsSpec.react.jsx
+++ b/app/addons/cors/tests/componentsSpec.react.jsx
@@ -103,20 +103,20 @@ define([
 
       it('calls validates each domain', function () {
         var spy = sinon.spy(Resources, 'validateCORSDomain');
-        TestUtils.Simulate.change($(inputEl.getDOMNode()).find('input')[0],{target: {value: newOrigin}});
+        TestUtils.Simulate.change($(inputEl.getDOMNode()).find('input')[0], {target: {value: newOrigin}});
         TestUtils.Simulate.click($(inputEl.getDOMNode()).find('.btn')[0]);
         assert.ok(spy.calledWith(newOrigin));
       });
 
       it('calls addOrigin on add click with valid domain', function () {
-        TestUtils.Simulate.change($(inputEl.getDOMNode()).find('input')[0],{target: {value: newOrigin}});
+        TestUtils.Simulate.change($(inputEl.getDOMNode()).find('input')[0], {target: {value: newOrigin}});
         TestUtils.Simulate.click($(inputEl.getDOMNode()).find('.btn')[0]);
         assert.ok(addOrigin.calledWith(newOrigin));
       });
 
       it('shows notification if origin is not valid', function () {
         var spy = sinon.spy(FauxtonAPI, 'addNotification');
-        TestUtils.Simulate.change($(inputEl.getDOMNode()).find('input')[0],{target: {value: 'badOrigin'}});
+        TestUtils.Simulate.change($(inputEl.getDOMNode()).find('input')[0], {target: {value: 'badOrigin'}});
         TestUtils.Simulate.click($(inputEl.getDOMNode()).find('.btn')[0]);
         assert.ok(spy.calledOnce);
       });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/base.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/base.js b/app/addons/documents/base.js
index 5c74fa2..bbdd90f 100644
--- a/app/addons/documents/base.js
+++ b/app/addons/documents/base.js
@@ -61,7 +61,7 @@ function(app, FauxtonAPI, Documents) {
     },
 
     showNewlySavedView: function (database, designDocs, viewName) {
-      return '/database/' + database +'/' + designDocs + '/_view/' + viewName;
+      return '/database/' + database + '/' + designDocs + '/_view/' + viewName;
     },
 
     fragment: function (database, designDocs, viewName) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/pagination/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/pagination/stores.js b/app/addons/documents/pagination/stores.js
index 3802d7c..f63f766 100644
--- a/app/addons/documents/pagination/stores.js
+++ b/app/addons/documents/pagination/stores.js
@@ -14,7 +14,7 @@ define([
   'app',
   'api',
   'addons/documents/pagination/actiontypes'
-],function (app, FauxtonAPI, ActionTypes) {
+], function (app, FauxtonAPI, ActionTypes) {
 
   var Stores = {};
   var maxDocLimit = 10000;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/resources.js b/app/addons/documents/resources.js
index cc44fc4..025c4ea 100644
--- a/app/addons/documents/resources.js
+++ b/app/addons/documents/resources.js
@@ -67,7 +67,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
     // treated separately. For instance, we could default into the
     // json editor for docs, or into a ddoc specific page.
     safeID: function() {
-      var ddoc = this.id.replace(/^_design\//,"");
+      var ddoc = this.id.replace(/^_design\//, "");
       return "_design/" + app.utils.safeURLName(ddoc);
     }
   });
@@ -186,7 +186,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
       this.idxType = "_view";
       this.view = options.view;
-      this.design = options.design.replace('_design/','');
+      this.design = options.design.replace('_design/', '');
       this.perPageLimit = options.perPageLimit || 20;
 
       if (!this.params.limit) {
@@ -318,7 +318,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       this.database = options.database;
       this.rows = options.rows;
       this.view = options.view;
-      this.design = options.design.replace('_design/','');
+      this.design = options.design.replace('_design/', '');
       this.params = _.extend({limit: 20, reduce: false}, options.params);
       this.idxType = "_view";
 
@@ -383,7 +383,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
         title: 'Replicate Database',
         icon: 'fonticon-replicate',
         url: FauxtonAPI.urls('replication', 'app', database.get('id'))
-      },{
+      }, {
         title: 'Delete',
         icon: 'fonticon-trash',
         trigger: 'database:delete'
@@ -404,7 +404,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       title: 'New Doc',
       url: newUrlPrefix + '/new',
       icon: 'fonticon-plus-circled'
-    },{
+    }, {
       title: 'New View',
       url: newUrlPrefix + '/new_view',
       icon: 'fonticon-plus-circled'

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/routes-doc-editor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-doc-editor.js b/app/addons/documents/routes-doc-editor.js
index 384f0ab..296d665 100644
--- a/app/addons/documents/routes-doc-editor.js
+++ b/app/addons/documents/routes-doc-editor.js
@@ -120,7 +120,7 @@ function(app, FauxtonAPI, Helpers, Documents, DocEditor, Databases) {
       var databaseName = options[0];
 
       this.database = this.database || new Databases.Model({id: databaseName});
-      this.doc = new Documents.NewDoc(null,{
+      this.doc = new Documents.NewDoc(null, {
         database: this.database
       });
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/routes-index-editor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-index-editor.js b/app/addons/documents/routes-index-editor.js
index af51646..4905f3a 100644
--- a/app/addons/documents/routes-index-editor.js
+++ b/app/addons/documents/routes-index-editor.js
@@ -82,7 +82,7 @@ function (app, FauxtonAPI, Helpers, BaseRoute, Documents, Index,
         ]
       }));
 
-      viewName = viewName.replace(/\?.*$/,'');
+      viewName = viewName.replace(/\?.*$/, '');
 
       this.footer = this.setView('#footer', new Documents.Views.Footer());
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/shared-resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-resources.js b/app/addons/documents/shared-resources.js
index a3cba90..6299e2c 100644
--- a/app/addons/documents/shared-resources.js
+++ b/app/addons/documents/shared-resources.js
@@ -156,7 +156,7 @@ define([
     // json editor for docs, or into a ddoc specific page.
     safeID: function() {
       if (this.isDdoc()){
-        var ddoc = this.id.replace(/^_design\//,"");
+        var ddoc = this.id.replace(/^_design\//, "");
         return "_design/" + app.utils.safeURLName(ddoc);
       }else{
         return app.utils.safeURLName(this.id);
@@ -221,7 +221,7 @@ define([
       this.database = options.database;
       this.params = _.clone(options.params);
 
-      this.on("remove",this.decrementTotalRows , this);
+      this.on("remove", this.decrementTotalRows, this);
       this.perPageLimit = options.perPageLimit || 20;
 
       if (!this.params.limit) {
@@ -271,7 +271,7 @@ define([
 
     decrementTotalRows: function () {
       if (this.viewMeta.total_rows) {
-        this.viewMeta.total_rows = this.viewMeta.total_rows -1;
+        this.viewMeta.total_rows = this.viewMeta.total_rows - 1;
         this.trigger('totalRows:decrement');
       }
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/shared-views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-views.js b/app/addons/documents/shared-views.js
index c3d145d..6f614bd 100644
--- a/app/addons/documents/shared-views.js
+++ b/app/addons/documents/shared-views.js
@@ -70,7 +70,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       var database = this.collection.database,
           addLinks = FauxtonAPI.getExtensions('sidebar:links'),
           databaseName = database.id,
-          newUrlPrefix = '#' + FauxtonAPI.urls('databaseBaseURL','app', databaseName);
+          newUrlPrefix = '#' + FauxtonAPI.urls('databaseBaseURL', 'app', databaseName);
 
       return _.reduce(addLinks, function (menuLinks, link) {
 
@@ -85,7 +85,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
         title: 'New Doc',
         url: newUrlPrefix + '/new',
         icon: 'fonticon-plus-circled'
-      },{
+      }, {
         title: 'New View',
         url: newUrlPrefix + '/new_view',
         icon: 'fonticon-plus-circled'
@@ -127,7 +127,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
 
           this.designDocList.push(view);
         }
-      },this);
+      }, this);
     },
 
     afterRender: function () {
@@ -167,7 +167,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       this.$(e.currentTarget).toggleClass("down");
     },
     buildIndexList: function(designDocs, info){
-      var design = this.model.id.replace(/^_design\//,"");
+      var design = this.model.id.replace(/^_design\//, "");
       var databaseId = this.model.database.id;
 
       if (_.isUndefined(designDocs[info.selector])) { return; }
@@ -182,7 +182,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
     },
 
     serialize: function(){
-      var ddocName = this.model.id.replace(/^_design\//,""),
+      var ddocName = this.model.id.replace(/^_design\//, ""),
           docSafe = app.utils.safeURLName(ddocName),
           databaseName = this.collection.database.safeID();
 
@@ -194,10 +194,10 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
     },
 
     getSidebarLinks: function () {  //these are for each Design doc '+' links
-      var ddocName = this.model.id.replace(/^_design\//,""),
+      var ddocName = this.model.id.replace(/^_design\//, ""),
           docSafe = app.utils.safeURLName(ddocName),
           databaseName = this.collection.database.id,
-          newUrlPrefix = FauxtonAPI.urls('databaseBaseURL','app', databaseName);
+          newUrlPrefix = FauxtonAPI.urls('databaseBaseURL', 'app', databaseName);
 
 
       return _.reduce(FauxtonAPI.getExtensions('sidebar:links'), function (menuLinks, link) {
@@ -229,7 +229,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
 
       _.each(sidebarListTypes, function (info) {
         this.buildIndexList(ddocDocs, info);
-      },this);
+      }, this);
 
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/tests/nightwatch/deletesDocument.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/deletesDocument.js b/app/addons/documents/tests/nightwatch/deletesDocument.js
index dce5b66..1f46bc1 100644
--- a/app/addons/documents/tests/nightwatch/deletesDocument.js
+++ b/app/addons/documents/tests/nightwatch/deletesDocument.js
@@ -32,7 +32,7 @@ module.exports = {
       .waitForElementVisible('#global-notifications .alert.alert-info', waitTime, false)
       .url(baseUrl + '/' + newDatabaseName + '/_all_docs')
       .waitForElementPresent('pre', waitTime, false)
-      .getText('pre',function (result) {
+      .getText('pre', function (result) {
         var data = result.value,
             createdDocumentNotPresent = data.indexOf(newDocumentName);
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/editDocumentsFromView.js b/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
index e05d270..bc8a214 100644
--- a/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
+++ b/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
@@ -41,7 +41,7 @@ module.exports = {
 
       //navigated to editor
       .waitForElementVisible('#editor-container', waitTime, false)
-      .verify.urlContains('#/database/' + newDatabaseName +'/document_10');
+      .verify.urlContains('#/database/' + newDatabaseName + '/document_10');
   },
 
   'Edit is not allowed for Map Views where reduce is checked' : function (client) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/tests/resourcesSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/resourcesSpec.js b/app/addons/documents/tests/resourcesSpec.js
index 2de4080..1b467c9 100644
--- a/app/addons/documents/tests/resourcesSpec.js
+++ b/app/addons/documents/tests/resourcesSpec.js
@@ -91,7 +91,7 @@ define([
   describe('QueryParams', function() {
     describe('parse', function() {
       it('should not parse arbitrary parameters', function() {
-        var params = {"foo":"[1]]"};
+        var params = {"foo": "[1]]"};
         var result = Models.QueryParams.parse(params);
 
         assert.deepEqual(result, params);
@@ -105,8 +105,8 @@ define([
         var result = Models.QueryParams.parse(params);
 
         assert.deepEqual(result, {
-          "startkey":["a","b"],
-          "endkey":["c","d"]
+          "startkey": ["a", "b"],
+          "endkey": ["c", "d"]
         });
       });
 
@@ -116,7 +116,7 @@ define([
         };
         var result = Models.QueryParams.parse(params);
 
-        assert.deepEqual(result, {"key":[1,2]});
+        assert.deepEqual(result, {"key": [1, 2]});
       });
 
       it('does not modify input', function() {
@@ -132,7 +132,7 @@ define([
 
     describe('stringify', function() {
       it('should not stringify arbitrary parameters', function() {
-        var params = {"foo":[1,2,3]};
+        var params = {"foo": [1, 2, 3]};
         var result = Models.QueryParams.stringify(params);
 
         assert.deepEqual(result, params);
@@ -140,8 +140,8 @@ define([
 
       it('stringifies startkey, endkey', function() {
         var params = {
-          "startkey":["a","b"],
-          "endkey":["c","d"]
+          "startkey": ["a", "b"],
+          "endkey": ["c", "d"]
         };
 
         var result = Models.QueryParams.stringify(params);
@@ -153,14 +153,14 @@ define([
       });
 
       it('stringifies key', function() {
-        var params = {"key":["a","b"]};
+        var params = {"key":[ "a", "b"]};
         var result = Models.QueryParams.stringify(params);
 
-        assert.deepEqual(result, { "key":"[\"a\",\"b\"]" });
+        assert.deepEqual(result, { "key": "[\"a\",\"b\"]" });
       });
 
       it('does not modify input', function() {
-        var params = {"key":["a","b"]};
+        var params = {"key": ["a", "b"]};
         var clone = _.clone(params);
         var result = Models.QueryParams.stringify(params);
 
@@ -169,8 +169,8 @@ define([
 
       it('is symmetrical with parse', function() {
         var params = {
-          "startkey":["a","b"],
-          "endkey":["c","d"],
+          "startkey": ["a", "b"],
+          "endkey": ["c", "d"],
           "foo": "[1,2]",
           "bar": "abc"
         };
@@ -221,8 +221,8 @@ define([
 
     it("clears the memory if no errors happened", function () {
       collection.handleResponse([
-        {"ok":true,"id":"1","rev":"10-72cd2edbcc0d197ce96188a229a7af01"},
-        {"ok":true,"id":"2","rev":"6-da537822b9672a4b2f42adb1be04a5b1"}
+        {"ok": true, "id": "1", "rev": "10-72cd2edbcc0d197ce96188a229a7af01"},
+        {"ok": true, "id": "2", "rev": "6-da537822b9672a4b2f42adb1be04a5b1"}
       ]);
 
       assert.equal(collection.length, 1);
@@ -234,8 +234,8 @@ define([
       });
 
       collection.handleResponse([
-        {"ok":true,"id":"Deferred","rev":"10-72cd2edbcc0d197ce96188a229a7af01"},
-        {"ok":true,"id":"DeskSet","rev":"6-da537822b9672a4b2f42adb1be04a5b1"}
+        {"ok": true, "id": "Deferred", "rev":"10-72cd2edbcc0d197ce96188a229a7af01"},
+        {"ok": true, "id": "DeskSet", "rev":"6-da537822b9672a4b2f42adb1be04a5b1"}
       ]);
     });
 
@@ -244,16 +244,16 @@ define([
         assert.deepEqual(ids, ['Deferred']);
       });
       collection.handleResponse([
-        {"error":"confclict","id":"Deferred","rev":"10-72cd2edbcc0d197ce96188a229a7af01"},
-        {"ok":true,"id":"DeskSet","rev":"6-da537822b9672a4b2f42adb1be04a5b1"}
+        {"error": "confclict", "id": "Deferred", "rev":"10-72cd2edbcc0d197ce96188a229a7af01"},
+        {"ok": true, "id": "DeskSet", "rev": "6-da537822b9672a4b2f42adb1be04a5b1"}
       ]);
     });
 
     it("removes successfull deleted from the collection but keeps one with errors", function () {
       collection.handleResponse([
-        {"error":"confclict","id":"1","rev":"10-72cd2edbcc0d197ce96188a229a7af01"},
-        {"ok":true,"id":"2","rev":"6-da537822b9672a4b2f42adb1be04a5b1"},
-        {"error":"conflict","id":"3","rev":"6-da537822b9672a4b2f42adb1be04a5b1"}
+        {"error": "confclict", "id": "1", "rev": "10-72cd2edbcc0d197ce96188a229a7af01"},
+        {"ok": true, "id":"2", "rev": "6-da537822b9672a4b2f42adb1be04a5b1"},
+        {"error": "conflict", "id":"3", "rev": "6-da537822b9672a4b2f42adb1be04a5b1"}
       ]);
       assert.ok(collection.get('1'));
       assert.ok(collection.get('3'));

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/views-doceditor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-doceditor.js b/app/addons/documents/views-doceditor.js
index 616c3a8..f091a7d 100644
--- a/app/addons/documents/views-doceditor.js
+++ b/app/addons/documents/views-doceditor.js
@@ -165,8 +165,8 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
       event.preventDefault();
       var newId = this.$('#dup-id').val(),
           isDDoc = newId.match(/^_design\//),
-          removeDDocID = newId.replace(/^_design\//,''),
-          encodedID = isDDoc? '_design/' + app.utils.safeURLName(removeDDocID) : app.utils.safeURLName(newId);
+          removeDDocID = newId.replace(/^_design\//, ''),
+          encodedID = isDDoc ? '_design/' + app.utils.safeURLName(removeDDocID) : app.utils.safeURLName(newId);
 
       this.hideModal();
       FauxtonAPI.triggerRouteEvent('duplicateDoc', encodedID);
@@ -178,7 +178,7 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
       this.clear_error_msg();
       this.$('.modal').modal();
       // hack to get modal visible
-      $('.modal-backdrop').css('z-index',1025);
+      $('.modal-backdrop').css('z-index', 1025);
     },
 
     showModal: function () {
@@ -493,7 +493,7 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
       var selEnd = this.editor.getSelectionEnd().row;
 
       // one JS(ON) string can't span more than one line - we edit one string, so ensure we don't select several lines
-      if (selStart >=0 && selEnd >= 0 && selStart === selEnd && this.editor.isRowExpanded(selStart)) {
+      if (selStart >= 0 && selEnd >= 0 && selStart === selEnd && this.editor.isRowExpanded(selStart)) {
         var editLine = this.editor.getLine(selStart),
             editMatch = editLine.match(/^([ \t]*)(["|'][a-zA-Z0-9_]*["|']: )?(["|'].*["|'],?[ \t]*)$/);
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 3e8b8fb..323a5c8 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -107,7 +107,7 @@ function (app, FauxtonAPI, Components, Documents,
 
     selectAllMenu: function(e) {
       FauxtonAPI.triggerRouteEvent("toggleSelectHeader");
-      FauxtonAPI.Events.trigger("documents:showSelectAll",this.selectVisible);
+      FauxtonAPI.Events.trigger("documents:showSelectAll", this.selectVisible);
     },
 
     // updates the API bar when the route changes
@@ -531,7 +531,7 @@ function (app, FauxtonAPI, Components, Documents,
     jumpToDoc: function (event) {
       event.preventDefault();
       var docId = this.$('#jump-to-doc-id').val().trim();
-      FauxtonAPI.navigate('/database/' + app.utils.safeURLName(this.database.id) +'/' + app.utils.safeURLName(docId), {trigger: true});
+      FauxtonAPI.navigate('/database/' + app.utils.safeURLName(this.database.id) + '/' + app.utils.safeURLName(docId), {trigger: true});
     },
 
     afterRender: function () {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index cf34afb..e532ff6 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -14,8 +14,8 @@ define('ace_configuration', ["app", "ace/ace"], function (app, ace) {
   var path = app.host + app.root + 'js/ace';
   var config = require("ace/config");
   config.set("packaged", true);
-  config.set("workerPath",path);
-  config.set("modePath",path);
+  config.set("workerPath", path);
+  config.set("modePath", path);
   config.set("themePath", path);
   return ace;
 });
@@ -730,7 +730,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       // By default CouchDB view functions don't pass lint
       return _.every(errors, function(error) {
         return this.isIgnorableError(error.raw);
-      },this);
+      }, this);
     },
 
     // List of JSHINT errors to ignore

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/permissions/tests/viewsSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/permissions/tests/viewsSpec.js b/app/addons/permissions/tests/viewsSpec.js
index 68e79ff..c0d0b9b 100644
--- a/app/addons/permissions/tests/viewsSpec.js
+++ b/app/addons/permissions/tests/viewsSpec.js
@@ -49,7 +49,8 @@ define([
 
         assert.ok(saveMock.calledOnce);
         var args = saveMock.args;
-        assert.deepEqual(args[0][0], {"admins":{"names":["_user"],"roles":[]},"members":{"names":[],"roles":[]}});
+        assert.deepEqual(args[0][0],
+          {"admins": {"names": ["_user"], "roles":[]}, "members": {"names":[], "roles":[]}});
       });
 
       it('Should save model', function () {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/plugins/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/plugins/routes.js b/app/addons/plugins/routes.js
index 7eb3a11..5077c53 100644
--- a/app/addons/plugins/routes.js
+++ b/app/addons/plugins/routes.js
@@ -20,7 +20,7 @@ function(app, FauxtonAPI, plugins) {
     layout: "one_pane",
 
     crumbs: [
-      {"name": "Plugins","link": "_plugins"}
+      {"name": "Plugins", "link": "_plugins"}
     ],
 
     routes: {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/views.js b/app/addons/replication/views.js
index dbb226d..8e98812 100644
--- a/app/addons/replication/views.js
+++ b/app/addons/replication/views.js
@@ -77,11 +77,11 @@ function(app, FauxtonAPI, Components, Replication) {
     },
 
     enableFields: function () {
-      this.$el.find('input','select').attr('disabled', false);
+      this.$el.find('input', 'select').attr('disabled', false);
     },
 
     disableFields: function () {
-      this.$el.find('input:hidden','select:hidden').attr('disabled', true);
+      this.$el.find('input:hidden', 'select:hidden').attr('disabled', true);
     },
 
     showFields: function (e) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/verifyinstall/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/resources.js b/app/addons/verifyinstall/resources.js
index a422ee7..b7f9469 100644
--- a/app/addons/verifyinstall/resources.js
+++ b/app/addons/verifyinstall/resources.js
@@ -113,7 +113,7 @@ function (app, FauxtonAPI, Databases, Documents) {
             reduce: '_sum'
           }
         }
-      },{
+      }, {
         database: db
       });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/addons/verifyinstall/views.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/views.js b/app/addons/verifyinstall/views.js
index a7e9b9a..bc48542 100644
--- a/app/addons/verifyinstall/views.js
+++ b/app/addons/verifyinstall/views.js
@@ -52,7 +52,7 @@ function(app, FauxtonAPI, VerifyInstall) {
     },
 
     disableButton: function () {
-      this.$('#start').attr('disabled','disabled').text('Verifying');
+      this.$('#start').attr('disabled', 'disabled').text('Verifying');
     },
 
     formatError: function (id) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/core/base.js
----------------------------------------------------------------------
diff --git a/app/core/base.js b/app/core/base.js
index 73f0a4c..12bc342 100644
--- a/app/core/base.js
+++ b/app/core/base.js
@@ -120,7 +120,7 @@ function(Backbone, LayoutManager) {
     var views = extensions[name];
     if (!views) { return; }
 
-    var _cb = arguments[arguments.length -1];
+    var _cb = arguments[arguments.length - 1];
     if (_.isObject(view) && !cb) {
       _cb = function (item) { return _.isEqual(item, view);};
     }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/core/routeObject.js
----------------------------------------------------------------------
diff --git a/app/core/routeObject.js b/app/core/routeObject.js
index bef8f14..a1c3865 100644
--- a/app/core/routeObject.js
+++ b/app/core/routeObject.js
@@ -198,7 +198,7 @@ function(FauxtonAPI, Backbone) {
       var args = Array.prototype.slice.call(arguments);
       this.trigger.apply(this, args);
 
-      args.splice(0,1, eventName, this);
+      args.splice(0, 1, eventName, this);
       broadcaster.trigger.apply(broadcaster, args);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/core/tests/routeObjectSpec.js
----------------------------------------------------------------------
diff --git a/app/core/tests/routeObjectSpec.js b/app/core/tests/routeObjectSpec.js
index 83367dd..b454d14 100644
--- a/app/core/tests/routeObjectSpec.js
+++ b/app/core/tests/routeObjectSpec.js
@@ -73,7 +73,7 @@ define([
 
 
       it("Should call establish of routeObject", function () {
-        var establishSpy = sinon.spy(testRouteObject,"establish");
+        var establishSpy = sinon.spy(testRouteObject, "establish");
 
         testRouteObject.renderWith('the-route', mockLayout, 'args');
         assert.ok(establishSpy.calledOnce, 'Calls establish');
@@ -81,7 +81,7 @@ define([
 
       it("Should render views", function () {
         var view = new FauxtonAPI.View(),
-            getViewsSpy = sinon.stub(testRouteObject,"getViews"),
+            getViewsSpy = sinon.stub(testRouteObject, "getViews"),
             viewSpy = sinon.stub(view, "establish");
 
         view.hasRendered = false;
@@ -99,7 +99,7 @@ define([
 
       it("Should not re-render a view", function () {
         var view = new FauxtonAPI.View(),
-            getViewsSpy = sinon.stub(testRouteObject,"getViews"),
+            getViewsSpy = sinon.stub(testRouteObject, "getViews"),
             viewSpy = sinon.stub(view, "establish");
 
         view.hasRendered = true;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/app/core/utils.js
----------------------------------------------------------------------
diff --git a/app/core/utils.js b/app/core/utils.js
index 568f0de..1238240 100644
--- a/app/core/utils.js
+++ b/app/core/utils.js
@@ -33,7 +33,7 @@ function ($, _) {
     getParams: function(queryString) {
       if (queryString) {
         // I think this could be combined into one if
-        if (queryString.substring(0,1) === "?") {
+        if (queryString.substring(0, 1) === "?") {
           queryString = queryString.substring(1);
         } else if (queryString.indexOf('?') > -1) {
           queryString = queryString.split('?')[1];
@@ -89,7 +89,7 @@ function ($, _) {
     },
 
     removeSpecialCharacters: function(name){
-      return name.replace(/[^\w\s]/gi,"");
+      return name.replace(/[^\w\s]/gi, "");
     },
 
     safeURLName: function(name){

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/tasks/couchserver.js
----------------------------------------------------------------------
diff --git a/tasks/couchserver.js b/tasks/couchserver.js
index d9b8845..d79e556 100644
--- a/tasks/couchserver.js
+++ b/tasks/couchserver.js
@@ -41,7 +41,7 @@ module.exports = function (grunt) {
     var proxy = httpProxy.createServer(proxy_settings);
 
     http.createServer(function (req, res) {
-      var url = req.url.replace('app/',''),
+      var url = req.url.replace('app/', ''),
           accept = req.headers.accept.split(','),
           filePath;
 
@@ -52,21 +52,21 @@ module.exports = function (grunt) {
       }
 
       if (!!url.match(/^\/addons\/.*\/assets\/js/)) {
-        filePath = path.join(app_dir, url.replace('/_utils/fauxton/',''));
+        filePath = path.join(app_dir, url.replace('/_utils/fauxton/', ''));
       } else if (!!url.match(/assets/)) {
         // serve any javascript or css files from here assets dir
         url = url.replace(/\?.*/, '');
-        filePath = path.join('./',url);
+        filePath = path.join('./', url);
       } else if (!!url.match(/mocha|\/test\/core\/|test\.config/)) {
-        filePath = path.join('./test', url.replace('/test/',''));
+        filePath = path.join('./test', url.replace('/test/', ''));
       } else if (!!url.match(/fonts/)) {
-        filePath = path.join(dist_dir,url.split('?v=')[0]);
+        filePath = path.join(dist_dir, url.split('?v=')[0]);
       } else if (!!url.match(/\.css|img/)) {
         url = url.replace(/\?.*/, '');
-        filePath = path.join(dist_dir,url);
+        filePath = path.join(dist_dir, url);
       } else if (!!url.match(/\.js$|\.html$/)) {
         // server js from app directory
-        filePath = path.join(app_dir, url.replace('/_utils/fauxton/',''));
+        filePath = path.join(app_dir, url.replace('/_utils/fauxton/', ''));
       } else if (!!url.match(/ZeroClipboard/)) {
         filePath = "./assets/js/plugins/zeroclipboard/ZeroClipboard.swf"
       } else if (!!url.match(/testrunner/)) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3d108d27/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index 5b427ee..0393b8e 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -108,7 +108,7 @@ module.exports = function(grunt) {
     grunt.file.write(dest, tmpl(app));
   });
 
-  grunt.registerMultiTask('mochaSetup','Generate a config.js and runner.html for tests', function(){
+  grunt.registerMultiTask('mochaSetup', 'Generate a config.js and runner.html for tests', function(){
     var data = this.data,
         configInfo,
         _ = grunt.util._,
@@ -131,7 +131,7 @@ module.exports = function(grunt) {
       }
     };
 
-    eval(grunt.file.read(data.config) +'');
+    eval(grunt.file.read(data.config) + '');
 
     grunt.file.write('./test/test.config.js', configTemplate({configInfo: configInfo, testFiles: testFiles}));
   });