1
0
Fork 0

Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel

This commit is contained in:
Heiko Kernbach 2014-02-12 10:24:59 +01:00
commit 421d0c8e93
11 changed files with 69 additions and 23 deletions

View File

@ -3,6 +3,9 @@ v1.5.0 (XXXX-XX-XX)
* made module loader more node compatible
* the startup option `--javascript.package-path` for arangosh is now deprecated and does
nothing. Using it will not cause an error, but the option is ignored.
* added coffee script support
* Several UI improvements.

View File

@ -40,7 +40,7 @@ its response if it is specified. Otherwise, the server will not send a
Content-Id "header" back. The server will not validate the uniqueness
of the Content-Id. After the mandatory `Content-Type` and the
optional `Content-Id` header, two Windows linebreaks
(i.e. `\\r\\n\\r\\n`) must follow. Any deviation of this structure
(i.e. `\r\n\r\n`) must follow. Any deviation of this structure
might lead to the part being rejected or incorrectly interpreted. The
part request payload, formatted as a regular HTTP request, must follow
the two Windows linebreaks literal directly.
@ -51,7 +51,7 @@ technically is the header of the MIME part, and the HTTP request
An actual part request should start with the HTTP method, the called
URL, and the HTTP protocol version as usual, followed by arbitrary
HTTP headers. Its body should follow after the usual `\\r\\n\\r\\n`
HTTP headers. Its body should follow after the usual `\r\n\r\n`
literal. Part requests are therefore regular HTTP requests, only
embedded inside a multipart message.
@ -96,4 +96,10 @@ header of the overall response is `1`:
@verbinclude api-batch-fail-response
Please note that the database used for all part operations of a batch
request is determined by scanning the original URL (the URL that contains
`/_api/batch`). It is not possible to override the database name in
part operations of a batch. When doing so, any other database name used
in a batch part will be ignored.
@BNAVIGATE_HttpBatch

View File

@ -93,9 +93,6 @@ The following <a href="https://npmjs.org/">node packages</a> are preinstalled.
you would expect in Prototype.js (or Ruby), but without extending any of the
built-in JavaScript objects.
You can use the command-line option @CO{startup.package-path} to specify the
location of the node packages.
require{#JSModulesRequire}
--------------------------

View File

@ -77,6 +77,12 @@ using namespace triagens::arango;
////////////////////////////////////////////////////////////////////////////////
static std::string DeprecatedPath;
////////////////////////////////////////////////////////////////////////////////
/// @brief we'll store deprecated config option values in here
////////////////////////////////////////////////////////////////////////////////
static string DeprecatedPackages;
////////////////////////////////////////////////////////////////////////////////
/// @brief command prompt
@ -434,6 +440,7 @@ static vector<string> ParseProgramOptions (int argc, char* argv[]) {
("jslint", &JsLint, "do not start as shell, run jslint instead")
// deprecated options
("javascript.modules-path", &DeprecatedPath, "one or more directories separated by semi-colons (deprecated)")
("javascript.package-path", &DeprecatedPackages, "one or more directories separated by semi-colons (deprecated)")
;
#ifdef _WIN32

View File

@ -255,7 +255,9 @@ function post_graph_graph (req, res) {
var edges = json.edges;
var waitForSync = false;
if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) {
if (req.parameters.waitForSync &&
(req.parameters.waitForSync === "true" ||
req.parameters.waitForSync === true)) {
waitForSync = true;
}
var g = new graph.Graph(name, vertices, edges, waitForSync);
@ -480,7 +482,9 @@ function delete_graph_graph (req, res) {
}
var waitForSync = g._gdb.properties().waitForSync;
if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) {
if (req.parameters.waitForSync &&
(req.parameters.waitForSync === "true" ||
req.parameters.waitForSync === true)) {
waitForSync = true;
}
@ -568,7 +572,9 @@ function post_graph_vertex (req, res, g) {
}
var waitForSync = g._vertices.properties().waitForSync;
if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) {
if (req.parameters.waitForSync &&
(req.parameters.waitForSync === "true" ||
req.parameters.waitForSync === true)) {
waitForSync = true;
}
@ -766,7 +772,9 @@ function delete_graph_vertex (req, res, g) {
}
var waitForSync = g._vertices.properties().waitForSync;
if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) {
if (req.parameters.waitForSync &&
(req.parameters.waitForSync === "true" ||
req.parameters.waitForSync === true)) {
waitForSync = true;
}
@ -808,7 +816,9 @@ function update_graph_vertex (req, res, g, isPatch) {
}
var waitForSync = g._vertices.properties().waitForSync;
if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) {
if (req.parameters.waitForSync &&
(req.parameters.waitForSync === "true" ||
req.parameters.waitForSync === true)) {
waitForSync = true;
}
@ -1451,7 +1461,9 @@ function post_graph_edge (req, res, g) {
}
var waitForSync = g._edges.properties().waitForSync;
if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) {
if (req.parameters.waitForSync &&
(req.parameters.waitForSync === "true" ||
req.parameters.waitForSync === true)) {
waitForSync = true;
}
@ -1655,7 +1667,9 @@ function delete_graph_edge (req, res, g) {
}
var waitForSync = g._edges.properties().waitForSync;
if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) {
if (req.parameters.waitForSync &&
(req.parameters.waitForSync === "true" ||
req.parameters.waitForSync === true)) {
waitForSync = true;
}
@ -1697,7 +1711,9 @@ function update_graph_edge (req, res, g, isPatch) {
}
var waitForSync = g._edges.properties().waitForSync;
if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) {
if (req.parameters.waitForSync &&
(req.parameters.waitForSync === "true" ||
req.parameters.waitForSync === true)) {
waitForSync = true;
}

View File

@ -192,7 +192,10 @@ exports.save = function (username, passwd, active, extra) {
data.extra = extra;
}
return users.save(data);
var doc = users.save(data);
// not exports.reload() as this is an abstract method...
require("org/arangodb/users").reload();
return doc;
}
var err = new ArangoError();
@ -270,8 +273,12 @@ exports.replace = function (username, passwd, active, extra) {
if (extra !== undefined) {
data.extra = extra;
}
return users.replace(user, data);
var doc = users.replace(user, data);
// not exports.reload() as this is an abstract method...
require("org/arangodb/users").reload();
return doc;
};
////////////////////////////////////////////////////////////////////////////////
@ -339,8 +346,13 @@ exports.update = function (username, passwd, active, extra) {
if (extra !== undefined) {
data.extra = extra;
}
var doc = users.update(user, data);
// not exports.reload() as this is an abstract method...
require("org/arangodb/users").reload();
return users.update(user, data);
return doc;
};
////////////////////////////////////////////////////////////////////////////////
@ -384,7 +396,12 @@ exports.remove = function (username) {
throw err;
}
return users.remove(user._id);
var doc = users.remove(user._id);
// not exports.reload() as this is an abstract method...
require("org/arangodb/users").reload();
return doc;
};
////////////////////////////////////////////////////////////////////////////////

View File

@ -1,5 +1,5 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global require, exports */
/*global require, exports, module */
////////////////////////////////////////////////////////////////////////////////
/// @brief JavaScript base module

View File

@ -1,5 +1,5 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global require, exports */
/*global require, exports, module */
////////////////////////////////////////////////////////////////////////////////
/// @brief ArangoCollection

View File

@ -1,5 +1,5 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global require, exports, TRANSACTION */
/*global require, exports, module, TRANSACTION */
////////////////////////////////////////////////////////////////////////////////
/// @brief ArangoDatabase

View File

@ -1,5 +1,5 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global require, exports */
/*global require, exports, module */
////////////////////////////////////////////////////////////////////////////////
/// @brief ArangoStatement

View File

@ -1,5 +1,5 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global require, exports */
/*global require, exports, module */
////////////////////////////////////////////////////////////////////////////////
/// @brief ShapedJson