1
0
Fork 0

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

This commit is contained in:
Jan Steemann 2015-08-05 09:57:24 +02:00
commit b7faf3aac0
6 changed files with 31 additions and 215 deletions

View File

@ -39,7 +39,6 @@ ArangoDB and shouldn't be used if possible.
* Foxx: the Foxx sessions option `jwt` has been removed entirely. Please use the `sesssions-jwt` app from the Foxx app store or use the `crypto` module's JWT functions directly.
* Foxx: the Foxx sessions option `type` has been removed entirely. Please use the options `cookie` and `header` instead.
* Foxx: the Foxx sessions option `sessionStorageApp` has been removed entirely. Please use the option `sessionStorage` instead.
* The module `org/arangodb/extend` is deprecated. Please use the module `extendible` instead.
* AQL: the AQL function `SKIPLIST` has been removed.
* Simple queries: the following simple query functions are now deprecated: collection.near(), collection.within(), collection.geo(), collection.fulltext(), collection.range(), collection.closedRange(). It is recommended to replace calls to these functions with equivalent AQL queries, which are more flexible.
* Simple queries: using negative values for SimpleQuery.skip() is not supported any longer.
@ -48,5 +47,4 @@ ArangoDB and shouldn't be used if possible.
## 2.8
* Foxx: the property `assets` in manifests has been removed entirely. Please use the `files` property and an external build tool instead.
* Foxx: properties `setup` and `teardown` in manifests have been removed entirely. Please use the `scripts` property instead.
* The module `org/arangodb/extend` has been removed entirely. Please use the module `extendible` instead.
* Simple queries: the following simple query functions will be removed: collection.near(), collection.within(), collection.geo(), collection.fulltext(), collection.range(), collection.closedRange(). It is recommended to replace calls to these functions with equivalent AQL queries, which are more flexible.

View File

@ -16,6 +16,8 @@
width: 160px;
img.icon {
border: 1px solid $c-content-border;
border-radius: 3px;
height: auto;
max-height: 160px;
max-width: 160px;
@ -28,18 +30,27 @@
left: 170px;
position: absolute;
width: 120px;
padding-top: 1px;
input.delete,
input.upgrade,
input.switch-mode {
margin-top: (160px - 4 * 30px) / 3;
}
input {
width: 90px;
}
}
.header_right {
margin-left: 300px;
padding: 5px;
input {
margin-left: 0;
}
.header_line {
h3 {
float: left;
@ -48,12 +59,13 @@
.license,
.version {
@include border-radius(6px);
@include border-radius(3px);
background-color: $c-white;
border: 1px solid $c-editor-toolbar;
color: $c-editor-toolbar;
font-size: .6em;
padding: 0 8px;
padding: 0 8px 2px;
position: relative;
top: -2px;
}
@ -85,7 +97,8 @@
.swagger {
iframe {
border: 1px solid black;
border: 1px solid $c-content-border;
border-radius: 3px;
height: 600px;
width: 100%;
}
@ -99,9 +112,18 @@
}
aside.meta {
background-color: #fff;
border: 1px solid $c-content-border;
border-radius: 3px;
clear: right;
float: left;
width: 200px;
width: 198px;
dl {
padding-left: 7px;
padding-top: 5px;
margin-top: 0;
}
}
}

View File

@ -53,6 +53,7 @@ $c-dark-grey: #999;
$c-darker-grey: #666;
$c-new-grey: #8c8a89;
$c-content-border: rgba(104, 103, 102, 0.1);
$c-transp: transparent;
$c-low-transp: rgba(0, 0, 0, .7);

View File

@ -78,7 +78,7 @@ exports.ArangoQueryCursor = ArangoQueryCursor;
////////////////////////////////////////////////////////////////////////////////
ArangoQueryCursor.prototype.toString = function () {
var isCaptureModeActive = internal.isCaptureMode()
var isCaptureModeActive = internal.isCaptureMode();
var rows = [ ], i = 0;
while (++i <= 10 && this.hasNext()) {
rows.push(this.next());
@ -99,7 +99,7 @@ ArangoQueryCursor.prototype.toString = function () {
result += "]";
if (!isCaptureModeActive) {
print(result);
internal.print(result);
result = "";
}
if (rows.length > 0) {
@ -119,7 +119,7 @@ ArangoQueryCursor.prototype.toString = function () {
}
if (!isCaptureModeActive) {
print(result);
internal.print(result);
result = "";
}
return result;

View File

@ -29,7 +29,6 @@
const joi = require('joi');
const Foxx = require('org/arangodb/foxx');
const deprecated = require('org/arangodb/deprecated');
const paramSchema = joi.string().optional().description('Foxx session ID');
// -----------------------------------------------------------------------------
@ -162,22 +161,6 @@ class Sessions {
opts = {};
}
if (opts.type) {
deprecated('2.8', (
'The Foxx session option "type" is deprecated and will be removed.'
+ ' Use the options "cookie" and/or "header" instead.'
));
if (opts.type === 'cookie') {
delete opts.header;
opts.cookie = opts.cookie || true;
} else if (opts.type === 'header') {
delete opts.cookie;
opts.header = opts.header || true;
} else {
throw new Error('Only the following session types are supported at this time: ' + sessionTypes.join(', '));
}
}
if (opts.cookie) {
if (opts.cookie === true) {
opts.cookie = {};

View File

@ -362,7 +362,6 @@ function SetRoutesFoxxControllerSpec () {
app.activateSessions({
sessionStorage: 'sessions',
type: 'cookie',
cookie: {
name: 'sid',
secret: 'secret'
@ -1481,193 +1480,6 @@ function SetupSessions () {
}
assertUndefined(err);
},
testWorksWithJwt: function () {
var err;
app = new FoxxController(fakeContext);
try {
app.activateSessions({
sessionStorage: 'sessions',
type: 'header',
header: 'X-Session-Token',
jwt: {
secret: 'secret'
}
});
} catch (e) {
err = e;
}
assertUndefined(err);
},
testWorksWithJwtHS256: function () {
var err;
app = new FoxxController(fakeContext);
try {
app.activateSessions({
sessionStorage: 'sessions',
type: 'header',
header: 'X-Session-Token',
jwt: {
secret: 'secret',
algorithm: 'HS256'
}
});
} catch (e) {
err = e;
}
assertUndefined(err);
},
testWorksWithJwtNone: function () {
var err;
app = new FoxxController(fakeContext);
try {
app.activateSessions({
sessionStorage: 'sessions',
type: 'header',
header: 'X-Session-Token',
jwt: {
algorithm: 'none'
}
});
} catch (e) {
err = e;
}
assertUndefined(err);
},
testWorksWithJwtNoneWithSecret: function () {
var err;
app = new FoxxController(fakeContext);
try {
app.activateSessions({
sessionStorage: 'sessions',
type: 'header',
header: 'X-Session-Token',
jwt: {
algorithm: 'none',
secret: 'secret'
}
});
} catch (e) {
err = e;
}
assertUndefined(err);
},
testWorksWithJwtUnverified: function () {
var err;
app = new FoxxController(fakeContext);
try {
app.activateSessions({
sessionStorage: 'sessions',
type: 'header',
header: 'X-Session-Token',
jwt: {
verify: false
}
});
} catch (e) {
err = e;
}
assertUndefined(err);
},
testWorksWithJwtShorthand: function () {
var err;
app = new FoxxController(fakeContext);
try {
app.activateSessions({
sessionStorage: 'sessions',
type: 'header',
header: 'X-Session-Token',
jwt: 'secret'
});
} catch (e) {
err = e;
}
assertUndefined(err);
},
testWorksWithJwtNoneShorthand: function () {
var err;
app = new FoxxController(fakeContext);
try {
app.activateSessions({
sessionStorage: 'sessions',
type: 'header',
header: 'X-Session-Token',
jwt: true
});
} catch (e) {
err = e;
}
assertUndefined(err);
},
testRefusesJwtAlgorithmWithSecret: function () {
var err;
app = new FoxxController(fakeContext);
try {
app.activateSessions({
sessionStorage: 'sessions',
type: 'header',
header: 'X-Session-Token',
jwt: {
algorithm: 'HS256'
}
});
} catch (e) {
err = e;
}
assertTrue(err instanceof Error);
},
testRefusesUnknownSessionsTypes: function () {
var err;
app = new FoxxController(fakeContext);
try {
app.activateSessions({
sessionStorage: 'sessions',
type: 'magic',
cookie: {
name: 'sid',
secret: 'secret'
}
});
} catch (e) {
err = e;
}
assertTrue(err instanceof Error);
}
};
}