Last active
May 26, 2017 05:31
-
-
Save robsonvn/51eb0857a02a2460de52f0b5607e51b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/dev/run b/dev/run | |
index 781c715..f8bdbed 100755 | |
--- a/dev/run | |
+++ b/dev/run | |
@@ -188,6 +188,7 @@ def setup_configs(ctx): | |
"cluster_port": cluster_port, | |
"backend_port": backend_port, | |
"fauxton_root": fauxton_root, | |
+ "clouseau_name": "clouseau%[email protected]" % (idx+1), | |
"uuid": "fake_uuid_for_dev" | |
} | |
write_config(ctx, node, env) | |
diff --git a/rebar.config.script b/rebar.config.script | |
index 5cb137d..226f0bb 100644 | |
--- a/rebar.config.script | |
+++ b/rebar.config.script | |
@@ -65,6 +65,7 @@ DepDescs = [ | |
{jiffy, "jiffy", "d3c00e19d8fa20c21758402231247602190988d3"}, | |
{mochiweb, "mochiweb", "bd6ae7cbb371666a1f68115056f7b30d13765782"}, | |
{meck, "meck", {tag, "0.8.2"}}, | |
+{dreyfus, {url, "https://github.com/cloudant-labs/dreyfus"}, "5f113370a1273dd1bdc981ca3ea98767bca0382d"}, | |
%% Deprecated | |
{oauth, "oauth", "099057a98e41f3aff91e77e3cf496d6c6fd901df"} | |
diff --git a/rel/apps/couch_epi.config b/rel/apps/couch_epi.config | |
index a07ae2a..86ddfeb 100644 | |
--- a/rel/apps/couch_epi.config | |
+++ b/rel/apps/couch_epi.config | |
@@ -17,5 +17,6 @@ | |
global_changes_epi, | |
mango_epi, | |
mem3_epi, | |
- setup_epi | |
+ setup_epi, | |
+ dreyfus_epi | |
]}. | |
diff --git a/rel/overlay/etc/local.ini b/rel/overlay/etc/local.ini | |
index cd3080e..d45158f 100644 | |
--- a/rel/overlay/etc/local.ini | |
+++ b/rel/overlay/etc/local.ini | |
@@ -111,3 +111,5 @@ | |
; changing this. | |
[admins] | |
;admin = mysecretpassword | |
+[dreyfus] | |
+name = {{clouseau_name}} | |
diff --git a/rel/reltool.config b/rel/reltool.config | |
index 135d386..f771ba3 100644 | |
--- a/rel/reltool.config | |
+++ b/rel/reltool.config | |
@@ -56,7 +56,8 @@ | |
oauth, | |
rexi, | |
setup, | |
- snappy | |
+ snappy, | |
+ dreyfus | |
]}, | |
{rel, "start_clean", "", [kernel, stdlib]}, | |
{boot_rel, "couchdb"}, | |
@@ -110,7 +111,8 @@ | |
{app, oauth, [{incl_cond, include}]}, | |
{app, rexi, [{incl_cond, include}]}, | |
{app, setup, [{incl_cond, include}]}, | |
- {app, snappy, [{incl_cond, include}]} | |
+ {app, snappy, [{incl_cond, include}]}, | |
+ {app, dreyfus, [{incl_cond, include}]} | |
]}. | |
{overlay_vars, "couchdb.config"}. | |
diff --git a/share/server/loop.js b/share/server/loop.js | |
index f179839..9e4dc6d 100644 | |
--- a/share/server/loop.js | |
+++ b/share/server/loop.js | |
@@ -25,6 +25,7 @@ function create_sandbox() { | |
sandbox.send = Render.send; | |
sandbox.getRow = Render.getRow; | |
sandbox.isArray = isArray; | |
+ sandbox.index = Dreyfus.index; | |
} catch (e) { | |
var sandbox = {}; | |
} | |
@@ -115,7 +116,8 @@ var Loop = function() { | |
"add_lib" : State.addLib, | |
"map_doc" : Views.mapDoc, | |
"reduce" : Views.reduce, | |
- "rereduce" : Views.rereduce | |
+ "rereduce" : Views.rereduce, | |
+ "index_doc": Dreyfus.indexDoc | |
}; | |
function handleError(e) { | |
var type = e[0]; | |
diff --git a/support/build_js.escript b/support/build_js.escript | |
index 0b3a859..ddd6b4a 100644 | |
--- a/support/build_js.escript | |
+++ b/support/build_js.escript | |
@@ -26,7 +26,8 @@ main([]) -> | |
"share/server/state.js", | |
"share/server/util.js", | |
"share/server/validate.js", | |
- "share/server/views.js", | |
+ "share/server/dreyfus.js", | |
+ "share/server/views.js", | |
"share/server/loop.js"], | |
CoffeeFiles = ["share/server/json2.js", | |
@@ -36,6 +37,7 @@ main([]) -> | |
"share/server/state.js", | |
"share/server/util.js", | |
"share/server/validate.js", | |
+ "share/server/dreyfus.js", | |
"share/server/views.js", | |
"share/server/coffee-script.js", | |
"share/server/loop.js"], | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment