You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by de...@apache.org on 2014/03/18 16:09:56 UTC

[01/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Repository: couchdb
Updated Branches:
  refs/heads/2129-config-edit-name 9e1280d3a -> 673100c64 (forced update)


Fauxton: highlight databases with more deleted docs than existing

Fixes COUCHDB-2110


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

Branch: refs/heads/2129-config-edit-name
Commit: b8accb4eb7c46e3888416afc4aff407487f2f21c
Parents: a17bf86
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Fri Mar 14 20:45:31 2014 +0100
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Fri Mar 14 20:45:43 2014 +0100

----------------------------------------------------------------------
 src/fauxton/app/addons/databases/resources.js   |  8 ++++
 .../app/addons/databases/templates/item.html    |  8 +++-
 .../app/addons/databases/tests/resourcesSpec.js | 39 ++++++++++++++++++++
 src/fauxton/app/addons/databases/views.js       |  1 +
 4 files changed, 55 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/b8accb4e/src/fauxton/app/addons/databases/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/databases/resources.js b/src/fauxton/app/addons/databases/resources.js
index 80cd533..f8aab96 100644
--- a/src/fauxton/app/addons/databases/resources.js
+++ b/src/fauxton/app/addons/databases/resources.js
@@ -123,6 +123,14 @@ function(app, FauxtonAPI, Documents) {
       return this.get("doc_count");
     },
 
+    numDeletedDocs: function() {
+      return this.get("doc_del_count");
+    },
+
+    isGraveYard: function() {
+      return this.numDeletedDocs() > this.numDocs();
+    },
+
     updateSeq: function(full) {
       var updateSeq = this.get("update_seq");
       if (full || (typeof(updateSeq) === 'number')) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/b8accb4e/src/fauxton/app/addons/databases/templates/item.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/databases/templates/item.html b/src/fauxton/app/addons/databases/templates/item.html
index 549f421..304ab78 100644
--- a/src/fauxton/app/addons/databases/templates/item.html
+++ b/src/fauxton/app/addons/databases/templates/item.html
@@ -16,7 +16,13 @@ the License.
   <a href="#/database/<%=encoded%>/_all_docs"><%= database.get("name") %></a>
 </td>
 <td><%= database.status.humanSize() %></td>
-<td><%= database.status.numDocs() %></td>
+<td>
+  <%= database.status.numDocs() %>
+  <% if (database.status.isGraveYard()) { %>
+    <i class="js-db-graveyard icon icon-exclamation-sign" data-toggle="tooltip"
+      title="This database has just <%= database.status.numDocs() %> docs and <%= database.status.numDeletedDocs() %> deleted docs"></i>
+  <% } %>
+</td>
 <td><%= database.status.updateSeq() %></td>
 <td>
   <a class="db-actions btn fonticon-replicate set-replication-start" title="Replicate <%= database.get("name") %>" href="#/replication/new/<%=encoded%>"></a>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/b8accb4e/src/fauxton/app/addons/databases/tests/resourcesSpec.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/databases/tests/resourcesSpec.js b/src/fauxton/app/addons/databases/tests/resourcesSpec.js
new file mode 100644
index 0000000..8e3fee4
--- /dev/null
+++ b/src/fauxton/app/addons/databases/tests/resourcesSpec.js
@@ -0,0 +1,39 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+define([
+      'api',
+      'addons/databases/resources',
+      'addons/databases/views',
+      'testUtils'
+], function (FauxtonAPI, Resources, Views, testUtils) {
+  var assert = testUtils.assert,
+      ViewSandbox = testUtils.ViewSandbox;
+
+  describe("Databases: List", function () {
+
+    describe("List items", function () {
+
+      it("detects graveyards", function () {
+        var modelWithGraveYard = new Resources.Status({
+          doc_count: 5,
+          doc_del_count: 6
+        });
+        var modelWithoutGraveYard = new Resources.Status({
+          doc_count: 6,
+          doc_del_count: 5
+        });
+        assert.ok(modelWithGraveYard.isGraveYard());
+        assert.ok(!modelWithoutGraveYard.isGraveYard());
+      });
+    });
+  });
+});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/b8accb4e/src/fauxton/app/addons/databases/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/databases/views.js b/src/fauxton/app/addons/databases/views.js
index ef52b2f..d632486 100644
--- a/src/fauxton/app/addons/databases/views.js
+++ b/src/fauxton/app/addons/databases/views.js
@@ -137,6 +137,7 @@ function(app, Components, FauxtonAPI, Databases) {
         }
       });
       this.dbSearchTypeahead.render();
+      this.$el.find(".js-db-graveyard").tooltip();
     },
 
     selectAll: function(evt){


[02/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
Fix missing file in Makefile.am

This closes #183

Signed-off-by: Alexander Shorin <kx...@apache.org>


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

Branch: refs/heads/2129-config-edit-name
Commit: 510070c0979b72a111ba865a421a221250fc9350
Parents: b8accb4
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sat Mar 15 16:00:22 2014 +0100
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sat Mar 15 19:47:02 2014 +0400

----------------------------------------------------------------------
 src/Makefile.am | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/510070c0/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 89a6afd..43afcf5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -147,6 +147,7 @@ FAUXTON_FILES = \
     fauxton/app/addons/databases/resources.js \
     fauxton/app/addons/databases/routes.js \
     fauxton/app/addons/databases/views.js \
+    fauxton/app/addons/databases/tests/resourcesSpec.js \
     fauxton/app/addons/documents/base.js \
     fauxton/app/addons/documents/resources.js \
     fauxton/app/addons/documents/routes.js \


[06/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
spell checking my-first-couchdb-plugin's README


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

Branch: refs/heads/2129-config-edit-name
Commit: 1db70b8c8037deb3ab64a4e43e4a7c5f80f7038e
Parents: 13010ed
Author: Mariano Guerra <lu...@gmail.com>
Authored: Mon Mar 17 13:43:20 2014 +0100
Committer: Mariano Guerra <lu...@gmail.com>
Committed: Mon Mar 17 13:43:20 2014 +0100

----------------------------------------------------------------------
 src/my-first-couchdb-plugin/README.md | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/1db70b8c/src/my-first-couchdb-plugin/README.md
----------------------------------------------------------------------
diff --git a/src/my-first-couchdb-plugin/README.md b/src/my-first-couchdb-plugin/README.md
index 814ef3b..37c0a75 100644
--- a/src/my-first-couchdb-plugin/README.md
+++ b/src/my-first-couchdb-plugin/README.md
@@ -2,7 +2,7 @@
 
 A practical guide to developing CouchDB plugins.
 
-*NOTE: This is incomplete, barely tested, works only with the 1867-feature-plugin branch of Apache CouchDB and expects that you understand some Erlang. This is mostly for early review, but if you are daring, you can learn someting already :)*
+*NOTE: This is incomplete, barely tested, works only with the 1867-feature-plugin branch of Apache CouchDB and expects that you understand some Erlang. This is mostly for early review, but if you are daring, you can learn something already :)*
 
 
 ## Preparation
@@ -84,7 +84,7 @@ Note: from now on you can just type `make dev`, it will run `make` for you inter
 
 * * *
 
-That is all that is needed to get started building a CouchDB plugin. The rest of this guide will explain how to hook into the various parts of CouchDB that allow you to do all sorts of fun things. That means you can write different types of plugins, once that handle HTTP requests, others that operate on database changes, and yet others that provide a deamon that does useful things for us.
+That is all that is needed to get started building a CouchDB plugin. The rest of this guide will explain how to hook into the various parts of CouchDB that allow you to do all sorts of fun things. That means you can write different types of plugins, ones that handle HTTP requests, others that operate on database changes, and yet others that provide a daemon that does useful things for us.
 
 * * *
 
@@ -111,9 +111,9 @@ That’s the easy part. The hard part is publishing the plugin. And since this i
 
 Our module above is not very useful on its own. You can call it when you are in the Erlang command prompt for your local CouchDB, but CouchDB itself doesn’t know what to do with it and you can’t do anything with it from CouchDB’s HTTP API. Let’s fix that!
 
-CouchDB’s main API is HTTP and thus we can expect to have a lot of infrastructure to work with. Luckily, it is mostly straigtforward to get into and we don’t need to learn a whole lot before can get started, and learn more as we go along.
+CouchDB’s main API is HTTP and thus we can expect to have a lot of infrastructure to work with. Luckily, it is mostly straightforward to get into and we don’t need to learn a whole lot before can get started, and learn more as we go along.
 
-Before ge get goint, let’s create another file that handles all our HTTP handler code. Create `src/my_first_couchdb_plugin_httpd.erl` and put in the following contents:
+Before we get going, let’s create another file that handles all our HTTP handler code. Create `src/my_first_couchdb_plugin_httpd.erl` and put in the following contents:
 
     -module(my_first_couchdb_plugin_httpd).
 
@@ -142,11 +142,11 @@ Now we have a function that can handle HTTP requests, but we haven’t told Couc
 
 To do this, we need to take a little detour into the CouchDB configuration system, as CouchDB’s HTTP routing is fully dynamic and configurable at runtime.
 
-To get an idea, open this file in CouchDB source directory: `etc/couchdb/default.ini.tpl.in`, don’t mind the triple file extensions, this is essentialy an `.ini` file. Now scroll down to the section `[httpd_global_handlers]`. You will find a list of API endpoints with mapping to the code in CouchDB that handles it. for example:
+To get an idea, open this file in CouchDB source directory: `etc/couchdb/default.ini.tpl.in`, don’t mind the triple file extensions, this is essentially an `.ini` file. Now scroll down to the section `[httpd_global_handlers]`. You will find a list of API endpoints with mapping to the code in CouchDB that handles it. for example:
 
     _utils = {couch_httpd_misc_handlers, handle_utils_dir_req, "%localdatadir%/www"}
 
-This means that `/_utils` is handled by the erlang module `couch_httpd_misc_handlers` and its function `handle_utils_dir_req` and it takes one additinal argument that is the document root for Futon.
+This means that `/_utils` is handled by the erlang module `couch_httpd_misc_handlers` and its function `handle_utils_dir_req` and it takes one additional argument that is the document root for Futon.
 
 Another example:
 
@@ -154,7 +154,7 @@ Another example:
 
 This means that `/_all_dbs`, the API endpoint that allows you to list all databases in CouchDB is handled by, again, `couch_httpd_misc_handlers` but this time its function `handle_all_dbs_req`, which does not take an additional argument.
 
-Say we want to make our `handle_req` function answer under the enpoint `/_my_plugin` (you want to start with an underscore here, as CouchDB will consider all other characters as real database names), we would add something like this:
+Say we want to make our `handle_req` function answer under the endpoint `/_my_plugin` (you want to start with an underscore here, as CouchDB will consider all other characters as real database names), we would add something like this:
 
     _my_plugin = {my_first_couchdb_plugin, handle_req}
 


[03/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
fix build

add CONTRIBUTING.md to Makefile.am and license.skip
remove duplicate file from Makefile.am

This closes #184

Signed-off-by: Alexander Shorin <kx...@apache.org>


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

Branch: refs/heads/2129-config-edit-name
Commit: c81f2d470d73051617e0395f771c9f364e3f2e47
Parents: 510070c
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 16 15:35:35 2014 +0100
Committer: Alexander Shorin <kx...@apache.org>
Committed: Mon Mar 17 00:29:31 2014 +0400

----------------------------------------------------------------------
 license.skip    | 1 +
 src/Makefile.am | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c81f2d47/license.skip
----------------------------------------------------------------------
diff --git a/license.skip b/license.skip
index 984d869..56b48bd 100644
--- a/license.skip
+++ b/license.skip
@@ -140,6 +140,7 @@
 ^src/fauxton/readme.md
 ^src/fauxton/writing_addons.md
 ^src/fauxton/TODO.md
+^src/fauxton/CONTRIBUTING.md
 ^src/fauxton/settings.json.*
 ^src/fauxton/test/test.config.underscore
 ^src/fauxton/test/mocha/chai.js

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c81f2d47/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 43afcf5..f610a31 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -70,7 +70,6 @@ FAUXTON_FILES = \
     fauxton/app/addons/config/resources.js \
     fauxton/app/addons/config/views.js \
     fauxton/app/addons/config/routes.js \
-    fauxton/app/addons/config/views.js \
     fauxton/app/addons/config/templates/modal.html \
     fauxton/app/addons/config/templates/dashboard.html \
     fauxton/app/addons/config/templates/item.html \
@@ -346,4 +345,5 @@ FAUXTON_FILES = \
     fauxton/test/runner.html \
     fauxton/test/test.config.underscore \
     fauxton/TODO.md \
+    fauxton/CONTRIBUTING.md \
     fauxton/writing_addons.md


[12/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
Edit Config name with validation.


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

Branch: refs/heads/2129-config-edit-name
Commit: 673100c64f728619a9cc226c1510072a32acce1c
Parents: 6f23ad4
Author: suelockwood <de...@apache.org>
Authored: Mon Mar 17 15:13:25 2014 -0400
Committer: suelockwood <de...@apache.org>
Committed: Tue Mar 18 11:09:43 2014 -0400

----------------------------------------------------------------------
 .../app/addons/config/assets/less/config.less   |  3 ++
 .../app/addons/config/templates/item.html       | 13 ++++-
 src/fauxton/app/addons/config/views.js          | 51 +++++++++++++++-----
 3 files changed, 53 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/673100c6/src/fauxton/app/addons/config/assets/less/config.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/config/assets/less/config.less b/src/fauxton/app/addons/config/assets/less/config.less
index 2807708..24bbab8 100644
--- a/src/fauxton/app/addons/config/assets/less/config.less
+++ b/src/fauxton/app/addons/config/assets/less/config.less
@@ -39,6 +39,9 @@ table.config {
   tr {
     th, td {
       vertical-align: middle;
+      .btn.btn-small {
+        padding: 10px 3px;
+      }
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/673100c6/src/fauxton/app/addons/config/templates/item.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/config/templates/item.html b/src/fauxton/app/addons/config/templates/item.html
index 108fa58..8af9a50 100644
--- a/src/fauxton/app/addons/config/templates/item.html
+++ b/src/fauxton/app/addons/config/templates/item.html
@@ -17,13 +17,22 @@ the License.
 <% } else { %>
 <td></td>
 <% } %>
-<td > <%= option.name %> </td>
+<td class="js-edit-value"> 
+  <div class="js-show-value">
+    <%= option.name %>
+  </div>
+  <div class="js-edit-value-form js-hidden">
+    <input class="js-value-input" type="text" name="name" value="<%- option.name %>" />
+    <button class="js-save-value btn btn-success fonticon-circle-check btn-small"> </button>
+    <button class="js-cancel-value btn btn-small fonticon-circle-x"> </button>
+  </div>
+</td>
 <td class="js-edit-value">
   <div class="js-show-value">
     <%= option.value %>
   </div>
   <div class="js-edit-value-form js-hidden">
-    <input class="js-value-input" type="text" value="<%- option.value %>" />
+    <input class="js-value-input" type="text" name="value" value="<%- option.value %>" />
     <button class="js-save-value btn btn-success fonticon-circle-check btn-small"> </button>
     <button class="js-cancel-value btn btn-small fonticon-circle-x"> </button>
   </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/673100c6/src/fauxton/app/addons/config/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/config/views.js b/src/fauxton/app/addons/config/views.js
index 0468cd1..8453d90 100644
--- a/src/fauxton/app/addons/config/views.js
+++ b/src/fauxton/app/addons/config/views.js
@@ -44,39 +44,64 @@ function(app, FauxtonAPI, Config, Components) {
       this.remove();
     },
 
+    uniqueName: function(name){
+      var section = _.findWhere(this.collection.toJSON(), {"section":this.model.get("section")});
+      
+      return _.findWhere(section.options, {name: name});
+    },
+
     editValue: function (event) {
-      this.$(".js-show-value").addClass("js-hidden");
-      this.$(".js-edit-value-form").removeClass("js-hidden");
-      this.$(".js-value-input").focus();
+      this.$(event.currentTarget).find(".js-show-value").addClass("js-hidden");
+      this.$(event.currentTarget).find(".js-edit-value-form").removeClass("js-hidden");
+      this.$(event.currentTarget).find(".js-value-input").focus();
     },
 
     processKeyEvents: function (event) {
       // Enter key
       if (event.keyCode === 13) {
-        return this.saveAndRender();
+        return this.saveAndRender(event);
       }
       // Esc key
       if (event.keyCode === 27) {
-        return this.discardValue();
+        return this.discardValue(event);
       }
     },
 
     discardValue: function (event) {
-      this.$(".js-edit-value-form").addClass("js-hidden");
-      this.$(".js-show-value").removeClass("js-hidden");
+      this.$(event.currentTarget).parents('td').find(".js-edit-value-form").addClass("js-hidden");
+      this.$(event.currentTarget).parents('td').find(".js-show-value").removeClass("js-hidden");
     },
 
     cancelEdit: function (event) {
-      this.discardValue();
+      this.discardValue(event);
     },
 
     serialize: function () {
       return {option: this.model.toJSON()};
     },
-
-    saveAndRender: function () {
-      this.model.save({value: this.$(".js-value-input").val()});
-      this.render();
+    saveAndRender: function (event) {
+      var options = {};
+        $input = this.$(event.currentTarget).parents('td').find(".js-value-input");
+        options[$input.attr('name')] = $input.val();
+
+        if ($input.attr('name')==='name'){
+          if (this.uniqueName($input.val())){
+            this.error = FauxtonAPI.addNotification({
+                msg: "This config already exists, enter a unique name",
+                type: "error",
+                clear: true
+            });
+          } else {
+            var newModel = this.model.clone();
+              newModel.save(options);
+              this.model.destroy();
+              this.model = newModel;
+              this.render();
+          }
+        } else {
+        this.model.save(options);
+        this.render();
+        }
     }
 
   });
@@ -103,10 +128,12 @@ function(app, FauxtonAPI, Config, Components) {
                     }));
 
       this.modal.render();
+      var collection = this.collection;
 
       this.collection.each(function(config) {
         _.each(config.get("options"), function (option, index) {
           this.insertView("table.config tbody", new Views.TableRow({
+            collection: collection,
             model: new Config.OptionModel({
               section: config.get("section"),
               name: option.name,


[09/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
update clone command to clone from github repo

since this already works on main couchdb.


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

Branch: refs/heads/2129-config-edit-name
Commit: 266020fe541e46150f0fecd9df0ef3ab629be341
Parents: 868e171
Author: Mariano Guerra <lu...@gmail.com>
Authored: Mon Mar 17 13:52:14 2014 +0100
Committer: Mariano Guerra <lu...@gmail.com>
Committed: Mon Mar 17 13:52:14 2014 +0100

----------------------------------------------------------------------
 src/my-first-couchdb-plugin/README.md | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/266020fe/src/my-first-couchdb-plugin/README.md
----------------------------------------------------------------------
diff --git a/src/my-first-couchdb-plugin/README.md b/src/my-first-couchdb-plugin/README.md
index 8bef13c..3c25eec 100644
--- a/src/my-first-couchdb-plugin/README.md
+++ b/src/my-first-couchdb-plugin/README.md
@@ -8,9 +8,8 @@ A practical guide to developing CouchDB plugins.
 
 To get started, you need to install CouchDB from source, grab the CouchDB sources:
 
-    git clone https://git-wip-us.apache.org/repos/asf/couchdb.git
+    git clone https://github.com/apache/couchdb.git
     cd couchdb
-    git checkout -b 1867-feature-plugin origin/1867-feature-plugins
 
 Follow the instructions in `couchdb/INSTALL.Unix` and `couchdb/DEVELOPERS` to get a development environment going.
 


[08/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
update opening note


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

Branch: refs/heads/2129-config-edit-name
Commit: 868e17114cff46db38791c5abb382e465722ccbd
Parents: 1db70b8
Author: Mariano Guerra <lu...@gmail.com>
Authored: Mon Mar 17 13:51:15 2014 +0100
Committer: Mariano Guerra <lu...@gmail.com>
Committed: Mon Mar 17 13:51:15 2014 +0100

----------------------------------------------------------------------
 src/my-first-couchdb-plugin/README.md | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/868e1711/src/my-first-couchdb-plugin/README.md
----------------------------------------------------------------------
diff --git a/src/my-first-couchdb-plugin/README.md b/src/my-first-couchdb-plugin/README.md
index 37c0a75..8bef13c 100644
--- a/src/my-first-couchdb-plugin/README.md
+++ b/src/my-first-couchdb-plugin/README.md
@@ -2,8 +2,7 @@
 
 A practical guide to developing CouchDB plugins.
 
-*NOTE: This is incomplete, barely tested, works only with the 1867-feature-plugin branch of Apache CouchDB and expects that you understand some Erlang. This is mostly for early review, but if you are daring, you can learn something already :)*
-
+*NOTE: this feature is considered beta, possibly subject to change and expects that you understand some Erlang.
 
 ## Preparation
 


[04/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
Fauxton: remove caching


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

Branch: refs/heads/2129-config-edit-name
Commit: 13010ed264582f235825a26a1907952479156163
Parents: c81f2d4
Author: Garren Smith <ga...@gmail.com>
Authored: Fri Mar 14 15:54:27 2014 -0400
Committer: suelockwood <de...@apache.org>
Committed: Mon Mar 17 08:23:56 2014 -0400

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js                        |   2 +-
 src/fauxton/app/config.js                       |   3 +-
 src/fauxton/app/core/base.js                    |  45 +--
 src/fauxton/app/core/couchdbSession.js          |   1 -
 .../assets/js/plugins/backbone.fetch-cache.js   | 311 -------------------
 src/fauxton/tasks/couchserver.js                |   4 +-
 6 files changed, 18 insertions(+), 348 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/13010ed2/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 348fa45..49c082e 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -170,7 +170,7 @@ module.exports = function(grunt) {
     // override inside main.js needs to test for them so as to not accidentally
     // route. Settings expr true so we can do `migtBeNullObject && mightBeNullObject.coolFunction()`
     jshint: {
-      all: ['app/**/*.js', 'Gruntfile.js', "test/core/*.js"],
+      all: ['app/**/*.js', 'Gruntfile.js', "!app/**/assets/js/*.js"],
       options: {
         scripturl: true,
         evil: true,

http://git-wip-us.apache.org/repos/asf/couchdb/blob/13010ed2/src/fauxton/app/config.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/config.js b/src/fauxton/app/config.js
index a5d764f..98be9c6 100644
--- a/src/fauxton/app/config.js
+++ b/src/fauxton/app/config.js
@@ -30,8 +30,7 @@ require.config({
     spin: "../assets/js/libs/spin.min",
     d3: "../assets/js/libs/d3",
     "nv.d3": "../assets/js/libs/nv.d3",
-    "ace":"../assets/js/libs/ace",
-    "backbone.fetch-cache": "../assets/js/plugins/backbone.fetch-cache"
+    "ace":"../assets/js/libs/ace"
   },
 
   baseUrl: '/',

http://git-wip-us.apache.org/repos/asf/couchdb/blob/13010ed2/src/fauxton/app/core/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/core/base.js b/src/fauxton/app/core/base.js
index 7cacf39..15499b3 100644
--- a/src/fauxton/app/core/base.js
+++ b/src/fauxton/app/core/base.js
@@ -12,11 +12,10 @@
 
 define([
   "backbone",
-  "plugins/backbone.layoutmanager",
-  "backbone.fetch-cache"
+  "plugins/backbone.layoutmanager"
 ],
 
-function(Backbone, LayoutManager, BackboneCache) {
+function(Backbone, LayoutManager) {
   var FauxtonAPI = {
     //add default objects
     router: {
@@ -68,44 +67,26 @@ function(Backbone, LayoutManager, BackboneCache) {
     }
   });
 
-
-  FauxtonAPI.Model = Backbone.Model.extend({
-
-  });
-
-  FauxtonAPI.Collection = Backbone.Collection.extend({
-
-  });
-
   var caching = {
-    fetchOnce: function (opts) {
-      var options = _.defaults(opts || {}, this.cache, {cache: true});
+    fetchOnce: function (opt) {
+      var options = _.extend({}, opt);
 
-      if (opts && !opts.cache) {
-        delete options.cache;
+      if (!this._deferred || this._deferred.state() === "rejected" || options.forceFetch ) {
+        this._deferred = this.fetch();
       }
 
-      if (!options.prefill) {
-        return this.fetch(options);
-      }
-
-      //With Prefill, the Caching with resolve with whatever is in the cache for that model/collection
-      //and at the sametime it will fetch from the server the latest. 
-      var promise = FauxtonAPI.Deferred(),
-          fetchPromise = this.fetch(options);
-
-      fetchPromise.progress(promise.resolveWith); // Fires when the cache hit happens
-      fetchPromise.then(promise.resolveWith); // Fires after the AJAX call
-      promise.fail(fetchPromise.abort);
-
-      return promise;
+      return this._deferred;
     }
   };
 
-  _.each([FauxtonAPI.Collection, FauxtonAPI.Model], function (ctor) {
+  FauxtonAPI.Model = Backbone.Model.extend({ });
+
+  FauxtonAPI.Collection = Backbone.Collection.extend({ });
+
+  _.each([FauxtonAPI.Model, FauxtonAPI.Collection], function (ctor) {
     _.extend(ctor.prototype, caching);
   });
-
+  
   var extensions = _.extend({}, Backbone.Events);
   // Can look at a remove function later.
   FauxtonAPI.registerExtension = function (name, view) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/13010ed2/src/fauxton/app/core/couchdbSession.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/core/couchdbSession.js b/src/fauxton/app/core/couchdbSession.js
index 747ef3e..7482db9 100644
--- a/src/fauxton/app/core/couchdbSession.js
+++ b/src/fauxton/app/core/couchdbSession.js
@@ -35,7 +35,6 @@ function (FauxtonAPI) {
 
         if (options.forceFetch) {
           fetch = _.bind(this.fetch, this);
-          Backbone.fetchCache.clearItem(_.result(this, 'url'));
         }
 
         return fetch(opt).then(function () {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/13010ed2/src/fauxton/assets/js/plugins/backbone.fetch-cache.js
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/js/plugins/backbone.fetch-cache.js b/src/fauxton/assets/js/plugins/backbone.fetch-cache.js
deleted file mode 100644
index 4aa7676..0000000
--- a/src/fauxton/assets/js/plugins/backbone.fetch-cache.js
+++ /dev/null
@@ -1,311 +0,0 @@
-/*!
-  backbone.fetch-cache v1.3.0
-  by Andy Appleton - https://github.com/mrappleton/backbone-fetch-cache.git
- */
-
-// AMD wrapper from https://github.com/umdjs/umd/blob/master/amdWebGlobal.js
-
-(function (root, factory) {
-  if (typeof define === 'function' && define.amd) {
-    // AMD. Register as an anonymous module and set browser global
-    define(['underscore', 'backbone', 'jquery'], function (_, Backbone, $) {
-      return (root.Backbone = factory(_, Backbone, $));
-    });
-  } else {
-    // Browser globals
-    root.Backbone = factory(root._, root.Backbone, root.jQuery);
-  }
-}(this, function (_, Backbone, $) {
-
-  // Setup
-  var superMethods = {
-    modelFetch: Backbone.Model.prototype.fetch,
-    modelSync: Backbone.Model.prototype.sync,
-    collectionFetch: Backbone.Collection.prototype.fetch
-  },
-  supportLocalStorage = (function() {
-    var supported = typeof window.localStorage !== 'undefined';
-    if (supported) {
-      try {
-        // impossible to write on some platforms when private browsing is on and
-        // throws an exception = local storage not supported.
-        localStorage.setItem("test_support", "test_support");
-        localStorage.removeItem("test_support");
-      } catch (e) {
-        supported = false;
-      }
-    }
-    return supported;
-  })();
-
-  Backbone.fetchCache = (Backbone.fetchCache || {});
-  Backbone.fetchCache._cache = (Backbone.fetchCache._cache || {});
-
-  Backbone.fetchCache.priorityFn = function(a, b) {
-    if (!a || !a.expires || !b || !b.expires) {
-      return a;
-    }
-
-    return a.expires - b.expires;
-  };
-
-  Backbone.fetchCache._prioritize = function() {
-    var sorted = _.values(this._cache).sort(this.priorityFn);
-    var index = _.indexOf(_.values(this._cache), sorted[0]);
-    return _.keys(this._cache)[index];
-  };
-
-  Backbone.fetchCache._deleteCacheWithPriority = function() {
-    Backbone.fetchCache._cache[this._prioritize()] = null;
-    delete Backbone.fetchCache._cache[this._prioritize()];
-    Backbone.fetchCache.setLocalStorage();
-  };
-
-  Backbone.fetchCache.getLocalStorageKey = function() {
-    return 'backboneCache';
-  };
-
-  if (typeof Backbone.fetchCache.localStorage === 'undefined') {
-    Backbone.fetchCache.localStorage = true;
-  }
-
-  // Shared methods
-  function getCacheKey(instance, opts) {
-    var url;
-
-    if(opts && opts.url) {
-      url = opts.url;
-    } else {
-      url = _.isFunction(instance.url) ? instance.url() : instance.url;
-    }
-
-    // Need url to use as cache key so return if we can't get it
-    if(!url) { return; }
-
-    if(opts && opts.data) {
-      return url + "?" + $.param(opts.data);
-    }
-    return url;
-  }
-
-  function setCache(instance, opts, attrs) {
-    opts = (opts || {});
-    var key = Backbone.fetchCache.getCacheKey(instance, opts),
-        expires = false;
-
-    // Need url to use as cache key so return if we can't get it
-    if (!key) { return; }
-
-    // Never set the cache if user has explicitly said not to
-    if (opts.cache === false) { return; }
-
-    // Don't set the cache unless cache: true or prefill: true option is passed
-    if (!(opts.cache || opts.prefill)) { return; }
-
-    if (opts.expires !== false) {
-      expires = (new Date()).getTime() + ((opts.expires || 5 * 60) * 1000);
-    }
-
-    Backbone.fetchCache._cache[key] = {
-      expires: expires,
-      value: attrs
-    };
-
-    Backbone.fetchCache.setLocalStorage();
-  }
-
-  function clearItem(key) {
-    if (_.isFunction(key)) { key = key(); }
-    delete Backbone.fetchCache._cache[key];
-    Backbone.fetchCache.setLocalStorage();
-  }
-
-  function setLocalStorage() {
-    if (!supportLocalStorage || !Backbone.fetchCache.localStorage) { return; }
-    try {
-      localStorage.setItem(Backbone.fetchCache.getLocalStorageKey(), JSON.stringify(Backbone.fetchCache._cache));
-    } catch (err) {
-      var code = err.code || err.number || err.message;
-      if (code === 22) {
-        this._deleteCacheWithPriority();
-      } else {
-        throw(err);
-      }
-    }
-  }
-
-  function getLocalStorage() {
-    if (!supportLocalStorage || !Backbone.fetchCache.localStorage) { return; }
-    var json = localStorage.getItem(Backbone.fetchCache.getLocalStorageKey()) || '{}';
-    Backbone.fetchCache._cache = JSON.parse(json);
-  }
-
-  function nextTick(fn) {
-    return window.setTimeout(fn, 0);
-  }
-
-  // Instance methods
-  Backbone.Model.prototype.fetch = function(opts) {
-    opts = _.defaults(opts || {}, { parse: true });
-    var key = Backbone.fetchCache.getCacheKey(this, opts),
-        data = Backbone.fetchCache._cache[key],
-        expired = false,
-        attributes = false,
-        deferred = new $.Deferred(),
-        self = this;
-
-    function setData() {
-      if (opts.parse) {
-        attributes = self.parse(attributes, opts);
-      }
-
-      self.set(attributes, opts);
-      if (_.isFunction(opts.prefillSuccess)) { opts.prefillSuccess(self, attributes, opts); }
-
-      // Trigger sync events
-      self.trigger('cachesync', self, attributes, opts);
-      self.trigger('sync', self, attributes, opts);
-
-      // Notify progress if we're still waiting for an AJAX call to happen...
-      if (opts.prefill) { deferred.notify(self); }
-      // ...finish and return if we're not
-      else {
-        if (_.isFunction(opts.success)) { opts.success(self, attributes, opts); }
-        deferred.resolve(self);
-      }
-    }
-
-    if (data) {
-      expired = data.expires;
-      expired = expired && data.expires < (new Date()).getTime();
-      attributes = data.value;
-    }
-
-    if (!expired && (opts.cache || opts.prefill) && attributes) {
-      // Ensure that cache resolution adhers to async option, defaults to true.
-      if (opts.async == null) { opts.async = true; }
-
-      if (opts.async) {
-        nextTick(setData);
-      } else {
-        setData();
-      }
-
-      if (!opts.prefill) {
-        return deferred;
-      }
-    }
-
-    // Delegate to the actual fetch method and store the attributes in the cache
-    superMethods.modelFetch.apply(this, arguments)
-      // resolve the returned promise when the AJAX call completes
-      .done( _.bind(deferred.resolve, this, this) )
-      // Set the new data in the cache
-      .done( _.bind(Backbone.fetchCache.setCache, null, this, opts) )
-      // Reject the promise on fail
-      .fail( _.bind(deferred.reject, this, this) );
-
-    // return a promise which provides the same methods as a jqXHR object
-    return deferred;
-  };
-
-  // Override Model.prototype.sync and try to clear cache items if it looks
-  // like they are being updated.
-  Backbone.Model.prototype.sync = function(method, model, options) {
-    // Only empty the cache if we're doing a create, update, patch or delete.
-    if (method === 'read') {
-      return superMethods.modelSync.apply(this, arguments);
-    }
-
-    var collection = model.collection,
-        keys = [],
-        i, len;
-
-    // Build up a list of keys to delete from the cache, starting with this
-    keys.push(Backbone.fetchCache.getCacheKey(model, options));
-
-    // If this model has a collection, also try to delete the cache for that
-    if (!!collection) {
-      keys.push(Backbone.fetchCache.getCacheKey(collection));
-    }
-
-    // Empty cache for all found keys
-    for (i = 0, len = keys.length; i < len; i++) { clearItem(keys[i]); }
-
-    return superMethods.modelSync.apply(this, arguments);
-  };
-
-  Backbone.Collection.prototype.fetch = function(opts) {
-    opts = _.defaults(opts || {}, { parse: true });
-    var key = Backbone.fetchCache.getCacheKey(this, opts),
-        data = Backbone.fetchCache._cache[key],
-        expired = false,
-        attributes = false,
-        deferred = new $.Deferred(),
-        self = this;
-
-    function setData() {
-      self[opts.reset ? 'reset' : 'set'](attributes, opts);
-      if (_.isFunction(opts.prefillSuccess)) { opts.prefillSuccess(self); }
-
-      // Trigger sync events
-      self.trigger('cachesync', self, attributes, opts);
-      self.trigger('sync', self, attributes, opts);
-
-      // Notify progress if we're still waiting for an AJAX call to happen...
-      if (opts.prefill) { deferred.notify(self); }
-      // ...finish and return if we're not
-      else {
-        if (_.isFunction(opts.success)) { opts.success(self, attributes, opts); }
-        deferred.resolve(self);
-      }
-    }
-
-    if (data) {
-      expired = data.expires;
-      expired = expired && data.expires < (new Date()).getTime();
-      attributes = data.value;
-    }
-
-    if (!expired && (opts.cache || opts.prefill) && attributes) {
-      // Ensure that cache resolution adhers to async option, defaults to true.
-      if (opts.async == null) { opts.async = true; }
-
-      if (opts.async) {
-        nextTick(setData);
-      } else {
-        setData();
-      }
-
-      if (!opts.prefill) {
-        return deferred;
-      }
-    }
-
-    // Delegate to the actual fetch method and store the attributes in the cache
-    superMethods.collectionFetch.apply(this, arguments)
-      // resolve the returned promise when the AJAX call completes
-      .done( _.bind(deferred.resolve, this, this) )
-      // Set the new data in the cache
-      .done( _.bind(Backbone.fetchCache.setCache, null, this, opts) )
-      // Reject the promise on fail
-      .fail( _.bind(deferred.reject, this, this) );
-
-    // return a promise which provides the same methods as a jqXHR object
-    return deferred;
-  };
-
-  // Prime the cache from localStorage on initialization
-  getLocalStorage();
-
-  // Exports
-
-  Backbone.fetchCache._superMethods = superMethods;
-  Backbone.fetchCache.setCache = setCache;
-  Backbone.fetchCache.getCacheKey = getCacheKey;
-  Backbone.fetchCache.clearItem = clearItem;
-  Backbone.fetchCache.setLocalStorage = setLocalStorage;
-  Backbone.fetchCache.getLocalStorage = getLocalStorage;
-
-  return Backbone;
-}));

http://git-wip-us.apache.org/repos/asf/couchdb/blob/13010ed2/src/fauxton/tasks/couchserver.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/couchserver.js b/src/fauxton/tasks/couchserver.js
index 21c2fcb..95b05e8 100644
--- a/src/fauxton/tasks/couchserver.js
+++ b/src/fauxton/tasks/couchserver.js
@@ -47,7 +47,9 @@ module.exports = function (grunt) {
           accept = req.headers.accept.split(','),
           filePath;
 
-      if (!!url.match(/assets/)) {
+      if (!!url.match(/^\/addons\/.*\/assets\/js/)) {
+        filePath = path.join(app_dir, url.replace('/_utils/fauxton/',''));
+      } else if (!!url.match(/assets/)) {
         // serve any javascript or css files from here assets dir
         filePath = path.join('./',url);
       } else if (!!url.match(/mocha|\/test\/core\/|test\.config/)) {


[05/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
encoded attachment name


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

Branch: refs/heads/2129-config-edit-name
Commit: 585ddafb509da20966ceea41102e940643de7586
Parents: 13010ed
Author: suelockwood <de...@apache.org>
Authored: Thu Mar 13 23:26:33 2014 -0400
Committer: suelockwood <de...@apache.org>
Committed: Mon Mar 17 08:27:32 2014 -0400

----------------------------------------------------------------------
 src/fauxton/app/addons/documents/views.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/585ddafb/src/fauxton/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js
index 56e9911..f29ebaa 100644
--- a/src/fauxton/app/addons/documents/views.js
+++ b/src/fauxton/app/addons/documents/views.js
@@ -940,7 +940,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
           fileName: key,
           size: att.length,
           contentType: att.content_type,
-          url: this.model.url() + '/' + key
+          url: this.model.url() + '/' + app.utils.safeURLName(key)
         };
       }, this);
     },


[07/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
Merge branch 'my-first-couch-plugin-readme-typos' of https://github.com/marianoguerra/couchdb

* 'my-first-couch-plugin-readme-typos' of https://github.com/marianoguerra/couchdb:
  spell checking my-first-couchdb-plugin's README

This closes #185


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

Branch: refs/heads/2129-config-edit-name
Commit: e07cc8291bf5338ea7a86094ad43b2878e72b265
Parents: 585ddaf 1db70b8
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Mar 17 13:48:10 2014 +0100
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Mar 17 13:48:10 2014 +0100

----------------------------------------------------------------------
 src/my-first-couchdb-plugin/README.md | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------



[11/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
Fauxton: fix navigating back to previous page

Fixes #COUCHDB-2169


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

Branch: refs/heads/2129-config-edit-name
Commit: 6f23ad403d8669abedc5f090284450793b2a77e5
Parents: 304c144
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Mon Mar 17 18:20:44 2014 +0100
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Mon Mar 17 18:20:44 2014 +0100

----------------------------------------------------------------------
 src/Makefile.am                              |  1 +
 src/fauxton/app/addons/auth/base.js          |  2 +-
 src/fauxton/app/addons/auth/test/baseSpec.js | 34 +++++++++++++++++++++++
 3 files changed, 36 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6f23ad40/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index f610a31..e1007f9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -59,6 +59,7 @@ FAUXTON_FILES = \
     fauxton/app/addons/auth/templates/nav_dropdown.html \
     fauxton/app/addons/auth/templates/nav_link_title.html \
     fauxton/app/addons/auth/templates/noAccess.html \
+    fauxton/app/addons/auth/test/baseSpec.js \
     fauxton/app/addons/compaction/assets/less/compaction.less \
     fauxton/app/addons/compaction/templates/compact_view.html \
     fauxton/app/addons/compaction/templates/layout.html \

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6f23ad40/src/fauxton/app/addons/auth/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/auth/base.js b/src/fauxton/app/addons/auth/base.js
index 7f69a7f..3354f53 100644
--- a/src/fauxton/app/addons/auth/base.js
+++ b/src/fauxton/app/addons/auth/base.js
@@ -50,7 +50,7 @@ function(app, FauxtonAPI, Auth) {
     };
 
     var authDenied = function () {
-      FauxtonAPI.navigate('/noAccess');
+      FauxtonAPI.navigate('/noAccess', {replace: true});
     };
 
     FauxtonAPI.auth.registerAuth(auth);

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6f23ad40/src/fauxton/app/addons/auth/test/baseSpec.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/auth/test/baseSpec.js b/src/fauxton/app/addons/auth/test/baseSpec.js
new file mode 100644
index 0000000..1525306
--- /dev/null
+++ b/src/fauxton/app/addons/auth/test/baseSpec.js
@@ -0,0 +1,34 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+define([
+      'api',
+      'addons/auth/base',
+      'core/auth',
+      'testUtils'
+], function (FauxtonAPI, Base, Auth, testUtils) {
+  var assert = testUtils.assert,
+      ViewSandbox = testUtils.ViewSandbox;
+
+  describe("Auth: Login", function () {
+
+    describe("failed login", function () {
+
+      it("redirects with replace: true set", function () {
+        var navigateSpy = sinon.spy(FauxtonAPI, 'navigate');
+        FauxtonAPI.auth = new Auth();
+        Base.initialize();
+        FauxtonAPI.auth.authDeniedCb();
+        assert.ok(navigateSpy.withArgs('/noAccess', {replace: true}).calledOnce);
+      });
+    });
+  });
+});


[10/12] couchdb commit: updated refs/heads/2129-config-edit-name to 673100c

Posted by de...@apache.org.
Merge branch 'my-first-couch-plugin-readme-typos'

'my-first-couch-plugin-readme-typos' of https://github.com/marianoguerra/couchdb

* update opening note 868e171
* update clone command to clone from github repo

This closes #186


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

Branch: refs/heads/2129-config-edit-name
Commit: 304c144606594d16b74bfac9e6d9c61fdfbc4264
Parents: e07cc82 266020f
Author: Andy Wenk <an...@apache.org>
Authored: Mon Mar 17 14:52:07 2014 +0100
Committer: Andy Wenk <an...@apache.org>
Committed: Mon Mar 17 14:54:47 2014 +0100

----------------------------------------------------------------------
 src/my-first-couchdb-plugin/README.md | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------