summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjosselin <josselin@serverpc.home>2016-01-25 22:12:25 +0100
committerjosselin <josselin@serverpc.home>2016-01-25 22:12:25 +0100
commit793a61475e0045383b23ddb2357a9e632bc8679c (patch)
treec641e37cd8ec87e6c6a61a8a27c90f1b21b518f8
parent5f34f504b08b34aad35d232d3ea35f2b4b70b070 (diff)
parent81d5c2a6464771c9a180d0214706a2f65f0b1d18 (diff)
Merge branch 'master' into Eole
-rw-r--r--.gitmodules3
-rw-r--r--client/css/style.css (renamed from client/images/empty)0
-rw-r--r--client/images/logo.gifbin0 -> 9683 bytes
-rw-r--r--client/index.php72
-rw-r--r--client/js/app.js18
-rw-r--r--client/js/controllers/empty0
-rw-r--r--client/js/controllers/home.js10
-rw-r--r--client/js/controllers/network.js10
-rw-r--r--client/js/controllers/status.js12
-rw-r--r--client/partials/empty0
-rw-r--r--client/partials/favicon.html3
-rw-r--r--client/partials/home.html9
-rw-r--r--client/partials/menu.html4
-rw-r--r--client/partials/nav.html40
-rw-r--r--client/partials/network.html9
-rw-r--r--client/vendors/angularjs/angular-route.js1008
-rw-r--r--server/composer.lock36
-rw-r--r--server/vendor/composer/autoload_psr4.php2
-rw-r--r--server/vendor/composer/installed.json268
-rw-r--r--server/vendor/guzzlehttp/psr7/CHANGELOG.md7
-rw-r--r--server/vendor/guzzlehttp/psr7/Makefile16
-rw-r--r--server/vendor/guzzlehttp/psr7/README.md5
-rw-r--r--server/vendor/guzzlehttp/psr7/src/MultipartStream.php4
-rw-r--r--server/vendor/guzzlehttp/psr7/src/Response.php1
-rw-r--r--server/vendor/guzzlehttp/psr7/src/Uri.php17
-rw-r--r--server/vendor/guzzlehttp/psr7/src/functions.php8
-rw-r--r--server/vendor/guzzlehttp/psr7/tests/FunctionsTest.php10
-rw-r--r--server/vendor/guzzlehttp/psr7/tests/UriTest.php34
-rw-r--r--server/vendor/justinrainbow/json-schema/composer.json4
-rw-r--r--server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php63
-rw-r--r--server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php8
m---------server/vendor/php-opencloud/openstack0
32 files changed, 1473 insertions, 208 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..8f4e3b2
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "server/vendor/php-opencloud/openstack"]
+ path = server/vendor/php-opencloud/openstack
+ url = https://github.com/php-opencloud/openstack.git
diff --git a/client/images/empty b/client/css/style.css
index e69de29..e69de29 100644
--- a/client/images/empty
+++ b/client/css/style.css
diff --git a/client/images/logo.gif b/client/images/logo.gif
new file mode 100644
index 0000000..4b2fbad
--- /dev/null
+++ b/client/images/logo.gif
Binary files differ
diff --git a/client/index.php b/client/index.php
index 5d8931d..0c02623 100644
--- a/client/index.php
+++ b/client/index.php
@@ -1,6 +1,6 @@
<!doctype html>
-<html lang="en">
+<html lang="en" ng-app="mainApp">
<head>
<meta charset="utf-8">
@@ -8,34 +8,66 @@
<meta name="description" content="Istic-Openstack project">
<meta name="author" content="IOTeam">
<link rel="stylesheet" href="./vendors/bootstrap/css/bootstrap.css">
+ <link rel="stylesheet" href="./css/style.css">
+
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
-
- <div class="container">
+
+
+ <body>
+ <!-- MAIN GRID -->
+ <div class="container-lg">
+ <!-- Status bar -->
+ <div class="row" ng-controller="statusCtrl">
+ <div class="col-lg-12">
+ <!-- Nav -->
+ <div ng-include="'./partials/nav.html'"></div>
+ </div>
+ </div>
+ <!-- Page content -->
<div class="row">
- <div class="col-sm-4">
- <div class="panel panel-info">
- <div class="panel-heading">
- <h2>Simple Boostrap Testing</h2>
+ <div class="col-lg-12">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-lg-2">
+ <!-- Logo -->
+ <div ng-include="'./partials/favicon.html'"></div>
- </div>
- <div class="panel-body">
- <p>Simple content</p>
-
- </div>
- </div>
+ <!-- Left Menu -->
+ <div ng-include="'./partials/menu.html'"></div>
+ </div>
+ <div class="col-lg-10">
+ <div class="container-lg" >
+ <div class="row">
+ <div class="col-lg-12">
+ <div ng-view></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
- </div>
+ </div>
</div>
-
-
+ </body>
- <body>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
- <script src="./vendors/bootstrap/js/bootstrap.min.js"></script>
- </body>
+ <!-- Include JQuery -->
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
+ <!-- Include Bootstrap -->
+ <script src="./vendors/bootstrap/js/bootstrap.min.js"></script>
+ <!-- Include AngularJS and dependencies-->
+ <script src="./vendors/angularjs/angular.min.js"></script>
+ <script src="./vendors/angularjs/angular-route.js"></script>
+ <script src="./js/app.js"></script>
+ <script src="./js/controllers/home.js"></script>
+ <script src="./js/controllers/network.js"></script>
+ <script src="./js/controllers/status.js"></script>
+
+
+
</html> \ No newline at end of file
diff --git a/client/js/app.js b/client/js/app.js
index e69de29..7fedb32 100644
--- a/client/js/app.js
+++ b/client/js/app.js
@@ -0,0 +1,18 @@
+
+// Declare main app
+var mainApp=angular.module("mainApp",['ngRoute']);
+
+
+mainApp.config(['$routeProvider', function($routeProvider){
+ $routeProvider.
+ when('/home',{
+ templateUrl: 'partials/home.html',
+ controller: 'homeCtrl'
+ }).
+ when('/network',{
+ templateUrl: 'partials/network.html',
+ controller: 'networkCtrl'
+ }).otherwise({
+ redirectTo: '/home'
+ });
+}]); \ No newline at end of file
diff --git a/client/js/controllers/empty b/client/js/controllers/empty
deleted file mode 100644
index e69de29..0000000
--- a/client/js/controllers/empty
+++ /dev/null
diff --git a/client/js/controllers/home.js b/client/js/controllers/home.js
new file mode 100644
index 0000000..d4e1b0e
--- /dev/null
+++ b/client/js/controllers/home.js
@@ -0,0 +1,10 @@
+/*
+ * home Controller
+ */
+
+
+
+mainApp.controller('homeCtrl', function ($scope)
+{
+ $scope.test="Home view";
+}); \ No newline at end of file
diff --git a/client/js/controllers/network.js b/client/js/controllers/network.js
new file mode 100644
index 0000000..c2a9794
--- /dev/null
+++ b/client/js/controllers/network.js
@@ -0,0 +1,10 @@
+/*
+ * network Controller
+ */
+
+
+
+mainApp.controller('networkCtrl', function ($scope)
+{
+ $scope.test="Network View";
+}); \ No newline at end of file
diff --git a/client/js/controllers/status.js b/client/js/controllers/status.js
new file mode 100644
index 0000000..3534912
--- /dev/null
+++ b/client/js/controllers/status.js
@@ -0,0 +1,12 @@
+/*
+ * mainApp Controller
+ */
+
+
+
+mainApp.controller('statusCtrl', function ($scope)
+{
+ $scope.username="User 1";
+ $scope.connection="Online";
+ $scope.lastconnection="1 Septembre";
+}); \ No newline at end of file
diff --git a/client/partials/empty b/client/partials/empty
deleted file mode 100644
index e69de29..0000000
--- a/client/partials/empty
+++ /dev/null
diff --git a/client/partials/favicon.html b/client/partials/favicon.html
new file mode 100644
index 0000000..d49c651
--- /dev/null
+++ b/client/partials/favicon.html
@@ -0,0 +1,3 @@
+<a href="#" class="thumbnail">
+ <img class="media-object" src='./images/logo.gif' />
+</a>
diff --git a/client/partials/home.html b/client/partials/home.html
new file mode 100644
index 0000000..b00113a
--- /dev/null
+++ b/client/partials/home.html
@@ -0,0 +1,9 @@
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{ test }}
+ </div>
+ <div class="panel-body">
+ Main Content
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/client/partials/menu.html b/client/partials/menu.html
new file mode 100644
index 0000000..dfd5842
--- /dev/null
+++ b/client/partials/menu.html
@@ -0,0 +1,4 @@
+<div class="list-group">
+ <a href="#/home" class="list-group-item">Home</a>
+ <a href="#/network" class="list-group-item">Network</a>
+</div> \ No newline at end of file
diff --git a/client/partials/nav.html b/client/partials/nav.html
new file mode 100644
index 0000000..a765daa
--- /dev/null
+++ b/client/partials/nav.html
@@ -0,0 +1,40 @@
+<nav class="navbar navbar-default">
+ <div class="container-fluid">
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="#"><b>Status</b></a>
+ </div>
+
+ <div class="navbar-"></div>
+
+ <!-- Collect the nav links, forms, and other content for toggling -->
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+
+ <ul class="nav navbar-nav">
+ <li class="nav-divider"></li>
+ <li><a href="#">User : {{ username }}</a></li>
+ <li><a href="#">Last Connection : {{ lastconnection }}</a></li>
+ <li><a href="#">Connection : {{ connection }}</a></li>
+
+ </ul>
+
+ <ul class="nav navbar-nav navbar-right">
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Account<span class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li><a href="#">Informations</a></li>
+ <li><a href="#">Settings</a></li>
+ <li role="separator" class="divider"></li>
+ <li><a href="#">Logout</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div><!-- /.navbar-collapse -->
+ </div><!-- /.container-fluid -->
+</nav> \ No newline at end of file
diff --git a/client/partials/network.html b/client/partials/network.html
new file mode 100644
index 0000000..a520a88
--- /dev/null
+++ b/client/partials/network.html
@@ -0,0 +1,9 @@
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{ test }}
+ </div>
+ <div class="panel-body">
+ Main Content
+ </div>
+</div>
+</div>
diff --git a/client/vendors/angularjs/angular-route.js b/client/vendors/angularjs/angular-route.js
new file mode 100644
index 0000000..c340d0f
--- /dev/null
+++ b/client/vendors/angularjs/angular-route.js
@@ -0,0 +1,1008 @@
+/**
+ * @license AngularJS v1.5.0-rc.1
+ * (c) 2010-2016 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+/**
+ * @ngdoc module
+ * @name ngRoute
+ * @description
+ *
+ * # ngRoute
+ *
+ * The `ngRoute` module provides routing and deeplinking services and directives for angular apps.
+ *
+ * ## Example
+ * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.
+ *
+ *
+ * <div doc-module-components="ngRoute"></div>
+ */
+ /* global -ngRouteModule */
+var ngRouteModule = angular.module('ngRoute', ['ng']).
+ provider('$route', $RouteProvider),
+ $routeMinErr = angular.$$minErr('ngRoute');
+
+/**
+ * @ngdoc provider
+ * @name $routeProvider
+ *
+ * @description
+ *
+ * Used for configuring routes.
+ *
+ * ## Example
+ * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.
+ *
+ * ## Dependencies
+ * Requires the {@link ngRoute `ngRoute`} module to be installed.
+ */
+function $RouteProvider() {
+ function inherit(parent, extra) {
+ return angular.extend(Object.create(parent), extra);
+ }
+
+ var routes = {};
+
+ /**
+ * @ngdoc method
+ * @name $routeProvider#when
+ *
+ * @param {string} path Route path (matched against `$location.path`). If `$location.path`
+ * contains redundant trailing slash or is missing one, the route will still match and the
+ * `$location.path` will be updated to add or drop the trailing slash to exactly match the
+ * route definition.
+ *
+ * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up
+ * to the next slash are matched and stored in `$routeParams` under the given `name`
+ * when the route matches.
+ * * `path` can contain named groups starting with a colon and ending with a star:
+ * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name`
+ * when the route matches.
+ * * `path` can contain optional named groups with a question mark: e.g.`:name?`.
+ *
+ * For example, routes like `/color/:color/largecode/:largecode*\/edit` will match
+ * `/color/brown/largecode/code/with/slashes/edit` and extract:
+ *
+ * * `color: brown`
+ * * `largecode: code/with/slashes`.
+ *
+ *
+ * @param {Object} route Mapping information to be assigned to `$route.current` on route
+ * match.
+ *
+ * Object properties:
+ *
+ * - `controller` – `{(string|function()=}` – Controller fn that should be associated with
+ * newly created scope or the name of a {@link angular.Module#controller registered
+ * controller} if passed as a string.
+ * - `controllerAs` – `{string=}` – An identifier name for a reference to the controller.
+ * If present, the controller will be published to scope under the `controllerAs` name.
+ * - `template` – `{string=|function()=}` – html template as a string or a function that
+ * returns an html template as a string which should be used by {@link
+ * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.
+ * This property takes precedence over `templateUrl`.
+ *
+ * If `template` is a function, it will be called with the following parameters:
+ *
+ * - `{Array.<Object>}` - route parameters extracted from the current
+ * `$location.path()` by applying the current route
+ *
+ * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
+ * template that should be used by {@link ngRoute.directive:ngView ngView}.
+ *
+ * If `templateUrl` is a function, it will be called with the following parameters:
+ *
+ * - `{Array.<Object>}` - route parameters extracted from the current
+ * `$location.path()` by applying the current route
+ *
+ * - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should
+ * be injected into the controller. If any of these dependencies are promises, the router
+ * will wait for them all to be resolved or one to be rejected before the controller is
+ * instantiated.
+ * If all the promises are resolved successfully, the values of the resolved promises are
+ * injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is
+ * fired. If any of the promises are rejected the
+ * {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired.
+ * For easier access to the resolved dependencies from the template, the `resolve` map will
+ * be available on the scope of the route, under `$resolve` (by default) or a custom name
+ * specified by the `resolveAs` property (see below). This can be particularly useful, when
+ * working with {@link angular.Module#component components} as route templates.<br />
+ * <div class="alert alert-warning">
+ * **Note:** If your scope already contains a property with this name, it will be hidden
+ * or overwritten. Make sure, you specify an appropriate name for this property, that
+ * does not collide with other properties on the scope.
+ * </div>
+ * The map object is:
+ *
+ * - `key` – `{string}`: a name of a dependency to be injected into the controller.
+ * - `factory` - `{string|function}`: If `string` then it is an alias for a service.
+ * Otherwise if function, then it is {@link auto.$injector#invoke injected}
+ * and the return value is treated as the dependency. If the result is a promise, it is
+ * resolved before its value is injected into the controller. Be aware that
+ * `ngRoute.$routeParams` will still refer to the previous route within these resolve
+ * functions. Use `$route.current.params` to access the new route parameters, instead.
+ *
+ * - `resolveAs` - `{string=}` - The name under which the `resolve` map will be available on
+ * the scope of the route. If omitted, defaults to `$resolve`.
+ *
+ * - `redirectTo` – `{(string|function())=}` – value to update
+ * {@link ng.$location $location} path with and trigger route redirection.
+ *
+ * If `redirectTo` is a function, it will be called with the following parameters:
+ *
+ * - `{Object.<string>}` - route parameters extracted from the current
+ * `$location.path()` by applying the current route templateUrl.
+ * - `{string}` - current `$location.path()`
+ * - `{Object}` - current `$location.search()`
+ *
+ * The custom `redirectTo` function is expected to return a string which will be used
+ * to update `$location.path()` and `$location.search()`.
+ *
+ * - `[reloadOnSearch=true]` - `{boolean=}` - reload route when only `$location.search()`
+ * or `$location.hash()` changes.
+ *
+ * If the option is set to `false` and url in the browser changes, then
+ * `$routeUpdate` event is broadcasted on the root scope.
+ *
+ * - `[caseInsensitiveMatch=false]` - `{boolean=}` - match routes without being case sensitive
+ *
+ * If the option is set to `true`, then the particular route can be matched without being
+ * case sensitive
+ *
+ * @returns {Object} self
+ *
+ * @description
+ * Adds a new route definition to the `$route` service.
+ */
+ this.when = function(path, route) {
+ //copy original route object to preserve params inherited from proto chain
+ var routeCopy = angular.copy(route);
+ if (angular.isUndefined(routeCopy.reloadOnSearch)) {
+ routeCopy.reloadOnSearch = true;
+ }
+ if (angular.isUndefined(routeCopy.caseInsensitiveMatch)) {
+ routeCopy.caseInsensitiveMatch = this.caseInsensitiveMatch;
+ }
+ routes[path] = angular.extend(
+ routeCopy,
+ path && pathRegExp(path, routeCopy)
+ );
+
+ // create redirection for trailing slashes
+ if (path) {
+ var redirectPath = (path[path.length - 1] == '/')
+ ? path.substr(0, path.length - 1)
+ : path + '/';
+
+ routes[redirectPath] = angular.extend(
+ {redirectTo: path},
+ pathRegExp(redirectPath, routeCopy)
+ );
+ }
+
+ return this;
+ };
+
+ /**
+ * @ngdoc property
+ * @name $routeProvider#caseInsensitiveMatch
+ * @description
+ *
+ * A boolean property indicating if routes defined
+ * using this provider should be matched using a case insensitive
+ * algorithm. Defaults to `false`.
+ */
+ this.caseInsensitiveMatch = false;
+
+ /**
+ * @param path {string} path
+ * @param opts {Object} options
+ * @return {?Object}
+ *
+ * @description
+ * Normalizes the given path, returning a regular expression
+ * and the original path.
+ *
+ * Inspired by pathRexp in visionmedia/express/lib/utils.js.
+ */
+ function pathRegExp(path, opts) {
+ var insensitive = opts.caseInsensitiveMatch,
+ ret = {
+ originalPath: path,
+ regexp: path
+ },
+ keys = ret.keys = [];
+
+ path = path
+ .replace(/([().])/g, '\\$1')
+ .replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option) {
+ var optional = option === '?' ? option : null;
+ var star = option === '*' ? option : null;
+ keys.push({ name: key, optional: !!optional });
+ slash = slash || '';
+ return ''
+ + (optional ? '' : slash)
+ + '(?:'
+ + (optional ? slash : '')
+ + (star && '(.+?)' || '([^/]+)')
+ + (optional || '')
+ + ')'
+ + (optional || '');
+ })
+ .replace(/([\/$\*])/g, '\\$1');
+
+ ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : '');
+ return ret;
+ }
+
+ /**
+ * @ngdoc method
+ * @name $routeProvider#otherwise
+ *
+ * @description
+ * Sets route definition that will be used on route change when no other route definition
+ * is matched.
+ *
+ * @param {Object|string} params Mapping information to be assigned to `$route.current`.
+ * If called with a string, the value maps to `redirectTo`.
+ * @returns {Object} self
+ */
+ this.otherwise = function(params) {
+ if (typeof params === 'string') {
+ params = {redirectTo: params};
+ }
+ this.when(null, params);
+ return this;
+ };
+
+
+ this.$get = ['$rootScope',
+ '$location',
+ '$routeParams',
+ '$q',
+ '$injector',
+ '$templateRequest',
+ '$sce',
+ function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce) {
+
+ /**
+ * @ngdoc service
+ * @name $route
+ * @requires $location
+ * @requires $routeParams
+ *
+ * @property {Object} current Reference to the current route definition.
+ * The route definition contains:
+ *
+ * - `controller`: The controller constructor as defined in the route definition.
+ * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for
+ * controller instantiation. The `locals` contain
+ * the resolved values of the `resolve` map. Additionally the `locals` also contain:
+ *
+ * - `$scope` - The current route scope.
+ * - `$template` - The current route template HTML.
+ *
+ * The `locals` will be assigned to the route scope's `$resolve` property. You can override
+ * the property name, using `resolveAs` in the route definition. See
+ * {@link ngRoute.$routeProvider $routeProvider} for more info.
+ *
+ * @property {Object} routes Object with all route configuration Objects as its properties.
+ *
+ * @description
+ * `$route` is used for deep-linking URLs to controllers and views (HTML partials).
+ * It watches `$location.url()` and tries to map the path to an existing route definition.
+ *
+ * Requires the {@link ngRoute `ngRoute`} module to be installed.
+ *
+ * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API.
+ *
+ * The `$route` service is typically used in conjunction with the
+ * {@link ngRoute.directive:ngView `ngView`} directive and the
+ * {@link ngRoute.$routeParams `$routeParams`} service.
+ *
+ * @example
+ * This example shows how changing the URL hash causes the `$route` to match a route against the
+ * URL, and the `ngView` pulls in the partial.
+ *
+ * <example name="$route-service" module="ngRouteExample"
+ * deps="angular-route.js" fixBase="true">
+ * <file name="index.html">
+ * <div ng-controller="MainController">
+ * Choose:
+ * <a href="Book/Moby">Moby</a> |
+ * <a href="Book/Moby/ch/1">Moby: Ch1</a> |
+ * <a href="Book/Gatsby">Gatsby</a> |
+ * <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
+ * <a href="Book/Scarlet">Scarlet Letter</a><br/>
+ *
+ * <div ng-view></div>
+ *
+ * <hr />
+ *
+ * <pre>$location.path() = {{$location.path()}}</pre>
+ * <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>
+ * <pre>$route.current.params = {{$route.current.params}}</pre>
+ * <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>
+ * <pre>$routeParams = {{$routeParams}}</pre>
+ * </div>
+ * </file>
+ *
+ * <file name="book.html">
+ * controller: {{name}}<br />
+ * Book Id: {{params.bookId}}<br />
+ * </file>
+ *
+ * <file name="chapter.html">
+ * controller: {{name}}<br />
+ * Book Id: {{params.bookId}}<br />
+ * Chapter Id: {{params.chapterId}}
+ * </file>
+ *
+ * <file name="script.js">
+ * angular.module('ngRouteExample', ['ngRoute'])
+ *
+ * .controller('MainController', function($scope, $route, $routeParams, $location) {
+ * $scope.$route = $route;
+ * $scope.$location = $location;
+ * $scope.$routeParams = $routeParams;
+ * })
+ *
+ * .controller('BookController', function($scope, $routeParams) {
+ * $scope.name = "BookController";
+ * $scope.params = $routeParams;
+ * })
+ *
+ * .controller('ChapterController', function($scope, $routeParams) {
+ * $scope.name = "ChapterController";
+ * $scope.params = $routeParams;
+ * })
+ *
+ * .config(function($routeProvider, $locationProvider) {
+ * $routeProvider
+ * .when('/Book/:bookId', {
+ * templateUrl: 'book.html',
+ * controller: 'BookController',
+ * resolve: {
+ * // I will cause a 1 second delay
+ * delay: function($q, $timeout) {
+ * var delay = $q.defer();
+ * $timeout(delay.resolve, 1000);
+ * return delay.promise;
+ * }
+ * }
+ * })
+ * .when('/Book/:bookId/ch/:chapterId', {
+ * templateUrl: 'chapter.html',
+ * controller: 'ChapterController'
+ * });
+ *
+ * // configure html5 to get links working on jsfiddle
+ * $locationProvider.html5Mode(true);
+ * });
+ *
+ * </file>
+ *
+ * <file name="protractor.js" type="protractor">
+ * it('should load and compile correct template', function() {
+ * element(by.linkText('Moby: Ch1')).click();
+ * var content = element(by.css('[ng-view]')).getText();
+ * expect(content).toMatch(/controller\: ChapterController/);
+ * expect(content).toMatch(/Book Id\: Moby/);
+ * expect(content).toMatch(/Chapter Id\: 1/);
+ *
+ * element(by.partialLinkText('Scarlet')).click();
+ *
+ * content = element(by.css('[ng-view]')).getText();
+ * expect(content).toMatch(/controller\: BookController/);
+ * expect(content).toMatch(/Book Id\: Scarlet/);
+ * });
+ * </file>
+ * </example>
+ */
+
+ /**
+ * @ngdoc event
+ * @name $route#$routeChangeStart
+ * @eventType broadcast on root scope
+ * @description
+ * Broadcasted before a route change. At this point the route services starts
+ * resolving all of the dependencies needed for the route change to occur.
+ * Typically this involves fetching the view template as well as any dependencies
+ * defined in `resolve` route property. Once all of the dependencies are resolved
+ * `$routeChangeSuccess` is fired.
+ *
+ * The route change (and the `$location` change that triggered it) can be prevented
+ * by calling `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on}
+ * for more details about event object.
+ *
+ * @param {Object} angularEvent Synthetic event object.
+ * @param {Route} next Future route information.
+ * @param {Route} current Current route information.
+ */
+
+ /**
+ * @ngdoc event
+ * @name $route#$routeChangeSuccess
+ * @eventType broadcast on root scope
+ * @description
+ * Broadcasted after a route change has happened successfully.
+ * The `resolve` dependencies are now available in the `current.locals` property.
+ *
+ * {@link ngRoute.directive:ngView ngView} listens for the directive
+ * to instantiate the controller and render the view.
+ *
+ * @param {Object} angularEvent Synthetic event object.
+ * @param {Route} current Current route information.
+ * @param {Route|Undefined} previous Previous route information, or undefined if current is
+ * first route entered.
+ */
+
+ /**
+ * @ngdoc event
+ * @name $route#$routeChangeError
+ * @eventType broadcast on root scope
+ * @description
+ * Broadcasted if any of the resolve promises are rejected.
+ *
+ * @param {Object} angularEvent Synthetic event object
+ * @param {Route} current Current route information.
+ * @param {Route} previous Previous route information.
+ * @param {Route} rejection Rejection of the promise. Usually the error of the failed promise.
+ */
+
+ /**
+ * @ngdoc event
+ * @name $route#$routeUpdate
+ * @eventType broadcast on root scope
+ * @description
+ * The `reloadOnSearch` property has been set to false, and we are reusing the same
+ * instance of the Controller.
+ *
+ * @param {Object} angularEvent Synthetic event object
+ * @param {Route} current Current/previous route information.
+ */
+
+ var forceReload = false,
+ preparedRoute,
+ preparedRouteIsUpdateOnly,
+ $route = {
+ routes: routes,
+
+ /**
+ * @ngdoc method
+ * @name $route#reload
+ *
+ * @description
+ * Causes `$route` service to reload the current route even if
+ * {@link ng.$location $location} hasn't changed.
+ *
+ * As a result of that, {@link ngRoute.directive:ngView ngView}
+ * creates new scope and reinstantiates the controller.
+ */
+ reload: function() {
+ forceReload = true;
+ $rootScope.$evalAsync(function() {
+ // Don't support cancellation of a reload for now...
+ prepareRoute();
+ commitRoute();
+ });
+ },
+
+ /**
+ * @ngdoc method
+ * @name $route#updateParams
+ *
+ * @description
+ * Causes `$route` service to update the current URL, replacing
+ * current route parameters with those specified in `newParams`.
+ * Provided property names that match the route's path segment
+ * definitions will be interpolated into the location's path, while
+ * remaining properties will be treated as query params.
+ *
+ * @param {!Object<string, string>} newParams mapping of URL parameter names to values
+ */
+ updateParams: function(newParams) {
+ if (this.current && this.current.$$route) {
+ newParams = angular.extend({}, this.current.params, newParams);
+ $location.path(interpolate(this.current.$$route.originalPath, newParams));
+ // interpolate modifies newParams, only query params are left
+ $location.search(newParams);
+ } else {
+ throw $routeMinErr('norout', 'Tried updating route when with no current route');
+ }
+ }
+ };
+
+ $rootScope.$on('$locationChangeStart', prepareRoute);
+ $rootScope.$on('$locationChangeSuccess', commitRoute);
+
+ return $route;
+
+ /////////////////////////////////////////////////////
+
+ /**
+ * @param on {string} current url
+ * @param route {Object} route regexp to match the url against
+ * @return {?Object}
+ *
+ * @description
+ * Check if the route matches the current url.
+ *
+ * Inspired by match in
+ * visionmedia/express/lib/router/router.js.
+ */
+ function switchRouteMatcher(on, route) {
+ var keys = route.keys,
+ params = {};
+
+ if (!route.regexp) return null;
+
+ var m = route.regexp.exec(on);
+ if (!m) return null;
+
+ for (var i = 1, len = m.length; i < len; ++i) {
+ var key = keys[i - 1];
+
+ var val = m[i];
+
+ if (key && val) {
+ params[key.name] = val;
+ }
+ }
+ return params;
+ }
+
+ function prepareRoute($locationEvent) {
+ var lastRoute = $route.current;
+
+ preparedRoute = parseRoute();
+ preparedRouteIsUpdateOnly = preparedRoute && lastRoute && preparedRoute.$$route === lastRoute.$$route
+ && angular.equals(preparedRoute.pathParams, lastRoute.pathParams)
+ && !preparedRoute.reloadOnSearch && !forceReload;
+
+ if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) {
+ if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) {
+ if ($locationEvent) {
+ $locationEvent.preventDefault();
+ }
+ }
+ }
+ }
+
+ function commitRoute() {
+ var lastRoute = $route.current;
+ var nextRoute = preparedRoute;
+
+ if (preparedRouteIsUpdateOnly) {
+ lastRoute.params = nextRoute.params;
+ angular.copy(lastRoute.params, $routeParams);
+ $rootScope.$broadcast('$routeUpdate', lastRoute);
+ } else if (nextRoute || lastRoute) {
+ forceReload = false;
+ $route.current = nextRoute;
+ if (nextRoute) {
+ if (nextRoute.redirectTo) {
+ if (angular.isString(nextRoute.redirectTo)) {
+ $location.path(interpolate(nextRoute.redirectTo, nextRoute.params)).search(nextRoute.params)
+ .replace();
+ } else {
+ $location.url(nextRoute.redirectTo(nextRoute.pathParams, $location.path(), $location.search()))
+ .replace();
+ }
+ }
+ }
+
+ $q.when(nextRoute).
+ then(function() {
+ if (nextRoute) {
+ var locals = angular.extend({}, nextRoute.resolve),
+ template, templateUrl;
+
+ angular.forEach(locals, function(value, key) {
+ locals[key] = angular.isString(value) ?
+ $injector.get(value) : $injector.invoke(value, null, null, key);
+ });
+
+ if (angular.isDefined(template = nextRoute.template)) {
+ if (angular.isFunction(template)) {
+ template = template(nextRoute.params);
+ }
+ } else if (angular.isDefined(templateUrl = nextRoute.templateUrl)) {
+ if (angular.isFunction(templateUrl)) {
+ templateUrl = templateUrl(nextRoute.params);
+ }
+ if (angular.isDefined(templateUrl)) {
+ nextRoute.loadedTemplateUrl = $sce.valueOf(templateUrl);
+ template = $templateRequest(templateUrl);
+ }
+ }
+ if (angular.isDefined(template)) {
+ locals['$template'] = template;
+ }
+ return $q.all(locals);
+ }
+ }).
+ then(function(locals) {
+ // after route change
+ if (nextRoute == $route.current) {
+ if (nextRoute) {
+ nextRoute.locals = locals;
+ angular.copy(nextRoute.params, $routeParams);
+ }
+ $rootScope.$broadcast('$routeChangeSuccess', nextRoute, lastRoute);
+ }
+ }, function(error) {
+ if (nextRoute == $route.current) {
+ $rootScope.$broadcast('$routeChangeError', nextRoute, lastRoute, error);
+ }
+ });
+ }
+ }
+
+
+ /**
+ * @returns {Object} the current active route, by matching it against the URL
+ */
+ function parseRoute() {
+ // Match a route
+ var params, match;
+ angular.forEach(routes, function(route, path) {
+ if (!match && (params = switchRouteMatcher($location.path(), route))) {
+ match = inherit(route, {
+ params: angular.extend({}, $location.search(), params),
+ pathParams: params});
+ match.$$route = route;
+ }
+ });
+ // No route matched; fallback to "otherwise" route
+ return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});
+ }
+
+ /**
+ * @returns {string} interpolation of the redirect path with the parameters
+ */
+ function interpolate(string, params) {
+ var result = [];
+ angular.forEach((string || '').split(':'), function(segment, i) {
+ if (i === 0) {
+ result.push(segment);
+ } else {
+ var segmentMatch = segment.match(/(\w+)(?:[?*])?(.*)/);
+ var key = segmentMatch[1];
+ result.push(params[key]);
+ result.push(segmentMatch[2] || '');
+ delete params[key];
+ }
+ });
+ return result.join('');
+ }
+ }];
+}
+
+ngRouteModule.provider('$routeParams', $RouteParamsProvider);
+
+
+/**
+ * @ngdoc service
+ * @name $routeParams
+ * @requires $route
+ *
+ * @description
+ * The `$routeParams` service allows you to retrieve the current set of route parameters.
+ *
+ * Requires the {@link ngRoute `ngRoute`} module to be installed.
+ *
+ * The route parameters are a combination of {@link ng.$location `$location`}'s
+ * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}.
+ * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched.
+ *
+ * In case of parameter name collision, `path` params take precedence over `search` params.
+ *
+ * The service guarantees that the identity of the `$routeParams` object will remain unchanged
+ * (but its properties will likely change) even when a route change occurs.
+ *
+ * Note that the `$routeParams` are only updated *after* a route change completes successfully.
+ * This means that you cannot rely on `$routeParams` being correct in route resolve functions.
+ * Instead you can use `$route.current.params` to access the new route's parameters.
+ *
+ * @example
+ * ```js
+ * // Given:
+ * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby
+ * // Route: /Chapter/:chapterId/Section/:sectionId
+ * //
+ * // Then
+ * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'}
+ * ```
+ */
+function $RouteParamsProvider() {
+ this.$get = function() { return {}; };
+}
+
+ngRouteModule.directive('ngView', ngViewFactory);
+ngRouteModule.directive('ngView', ngViewFillContentFactory);
+
+
+/**
+ * @ngdoc directive
+ * @name ngView
+ * @restrict ECA
+ *
+ * @description
+ * # Overview
+ * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by
+ * including the rendered template of the current route into the main layout (`index.html`) file.
+ * Every time the current route changes, the included view changes with it according to the
+ * configuration of the `$route` service.
+ *
+ * Requires the {@link ngRoute `ngRoute`} module to be installed.
+ *
+ * @animations
+ * enter - animation is used to bring new content into the browser.
+ * leave - animation is used to animate existing content away.
+ *
+ * The enter and leave animation occur concurrently.
+ *
+ * @scope
+ * @priority 400
+ * @param {string=} onload Expression to evaluate whenever the view updates.
+ *
+ * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll
+ * $anchorScroll} to scroll the viewport after the view is updated.
+ *
+ * - If the attribute is not set, disable scrolling.
+ * - If the attribute is set without value, enable scrolling.
+ * - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated
+ * as an expression yields a truthy value.
+ * @example
+ <example name="ngView-directive" module="ngViewExample"
+ deps="angular-route.js;angular-animate.js"
+ animations="true" fixBase="true">
+ <file name="index.html">
+ <div ng-controller="MainCtrl as main">
+ Choose:
+ <a href="Book/Moby">Moby</a> |
+ <a href="Book/Moby/ch/1">Moby: Ch1</a> |
+ <a href="Book/Gatsby">Gatsby</a> |
+ <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
+ <a href="Book/Scarlet">Scarlet Letter</a><br/>
+
+ <div class="view-animate-container">
+ <div ng-view class="view-animate"></div>
+ </div>
+ <hr />
+
+ <pre>$location.path() = {{main.$location.path()}}</pre>
+ <pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre>
+ <pre>$route.current.params = {{main.$route.current.params}}</pre>
+ <pre>$routeParams = {{main.$routeParams}}</pre>
+ </div>
+ </file>
+
+ <file name="book.html">
+ <div>
+ controller: {{book.name}}<br />
+ Book Id: {{book.params.bookId}}<br />
+ </div>
+ </file>
+
+ <file name="chapter.html">
+ <div>
+ controller: {{chapter.name}}<br />
+ Book Id: {{chapter.params.bookId}}<br />
+ Chapter Id: {{chapter.params.chapterId}}
+ </div>
+ </file>
+
+ <file name="animations.css">
+ .view-animate-container {
+ position:relative;
+ height:100px!important;
+ background:white;
+ border:1px solid black;
+ height:40px;
+ overflow:hidden;
+ }
+
+ .view-animate {
+ padding:10px;
+ }
+
+ .view-animate.ng-enter, .view-animate.ng-leave {
+ transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
+
+ display:block;
+ width:100%;
+ border-left:1px solid black;
+
+ position:absolute;
+ top:0;
+ left:0;
+ right:0;
+ bottom:0;
+ padding:10px;
+ }
+
+ .view-animate.ng-enter {
+ left:100%;
+ }
+ .view-animate.ng-enter.ng-enter-active {
+ left:0;
+ }
+ .view-animate.ng-leave.ng-leave-active {
+ left:-100%;
+ }
+ </file>
+
+ <file name="script.js">
+ angular.module('ngViewExample', ['ngRoute', 'ngAnimate'])
+ .config(['$routeProvider', '$locationProvider',
+ function($routeProvider, $locationProvider) {
+ $routeProvider
+ .when('/Book/:bookId', {
+ templateUrl: 'book.html',
+ controller: 'BookCtrl',
+ controllerAs: 'book'
+ })
+ .when('/Book/:bookId/ch/:chapterId', {
+ templateUrl: 'chapter.html',
+ controller: 'ChapterCtrl',
+ controllerAs: 'chapter'
+ });
+
+ $locationProvider.html5Mode(true);
+ }])
+ .controller('MainCtrl', ['$route', '$routeParams', '$location',
+ function($route, $routeParams, $location) {
+ this.$route = $route;
+ this.$location = $location;
+ this.$routeParams = $routeParams;
+ }])
+ .controller('BookCtrl', ['$routeParams', function($routeParams) {
+ this.name = "BookCtrl";
+ this.params = $routeParams;
+ }])
+ .controller('ChapterCtrl', ['$routeParams', function($routeParams) {
+ this.name = "ChapterCtrl";
+ this.params = $routeParams;
+ }]);
+
+ </file>
+
+ <file name="protractor.js" type="protractor">
+ it('should load and compile correct template', function() {
+ element(by.linkText('Moby: Ch1')).click();
+ var content = element(by.css('[ng-view]')).getText();
+ expect(content).toMatch(/controller\: ChapterCtrl/);
+ expect(content).toMatch(/Book Id\: Moby/);
+ expect(content).toMatch(/Chapter Id\: 1/);
+
+ element(by.partialLinkText('Scarlet')).click();
+
+ content = element(by.css('[ng-view]')).getText();
+ expect(content).toMatch(/controller\: BookCtrl/);
+ expect(content).toMatch(/Book Id\: Scarlet/);
+ });
+ </file>
+ </example>
+ */
+
+
+/**
+ * @ngdoc event
+ * @name ngView#$viewContentLoaded
+ * @eventType emit on the current ngView scope
+ * @description
+ * Emitted every time the ngView content is reloaded.
+ */
+ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate'];
+function ngViewFactory($route, $anchorScroll, $animate) {
+ return {
+ restrict: 'ECA',
+ terminal: true,
+ priority: 400,
+ transclude: 'element',
+ link: function(scope, $element, attr, ctrl, $transclude) {
+ var currentScope,
+ currentElement,
+ previousLeaveAnimation,
+ autoScrollExp = attr.autoscroll,
+ onloadExp = attr.onload || '';
+
+ scope.$on('$routeChangeSuccess', update);
+ update();
+
+ function cleanupLastView() {
+ if (previousLeaveAnimation) {
+ $animate.cancel(previousLeaveAnimation);
+ previousLeaveAnimation = null;
+ }
+
+ if (currentScope) {
+ currentScope.$destroy();
+ currentScope = null;
+ }
+ if (currentElement) {
+ previousLeaveAnimation = $animate.leave(currentElement);
+ previousLeaveAnimation.then(function() {
+ previousLeaveAnimation = null;
+ });
+ currentElement = null;
+ }
+ }
+
+ function update() {
+ var locals = $route.current && $route.current.locals,
+ template = locals && locals.$template;
+
+ if (angular.isDefined(template)) {
+ var newScope = scope.$new();
+ var current = $route.current;
+
+ // Note: This will also link all children of ng-view that were contained in the original
+ // html. If that content contains controllers, ... they could pollute/change the scope.
+ // However, using ng-view on an element with additional content does not make sense...
+ // Note: We can't remove them in the cloneAttchFn of $transclude as that
+ // function is called before linking the content, which would apply child
+ // directives to non existing elements.
+ var clone = $transclude(newScope, function(clone) {
+ $animate.enter(clone, null, currentElement || $element).then(function onNgViewEnter() {
+ if (angular.isDefined(autoScrollExp)
+ && (!autoScrollExp || scope.$eval(autoScrollExp))) {
+ $anchorScroll();
+ }
+ });
+ cleanupLastView();
+ });
+
+ currentElement = clone;
+ currentScope = current.scope = newScope;
+ currentScope.$emit('$viewContentLoaded');
+ currentScope.$eval(onloadExp);
+ } else {
+ cleanupLastView();
+ }
+ }
+ }
+ };
+}
+
+// This directive is called during the $transclude call of the first `ngView` directive.
+// It will replace and compile the content of the element with the loaded template.
+// We need this directive so that the element content is already filled when
+// the link function of another directive on the same element as ngView
+// is called.
+ngViewFillContentFactory.$inject = ['$compile', '$controller', '$route'];
+function ngViewFillContentFactory($compile, $controller, $route) {
+ return {
+ restrict: 'ECA',
+ priority: -400,
+ link: function(scope, $element) {
+ var current = $route.current,
+ locals = current.locals;
+
+ $element.html(locals.$template);
+
+ var link = $compile($element.contents());
+
+ if (current.controller) {
+ locals.$scope = scope;
+ var controller = $controller(current.controller, locals);
+ if (current.controllerAs) {
+ scope[current.controllerAs] = controller;
+ }
+ $element.data('$ngControllerController', controller);
+ $element.children().data('$ngControllerController', controller);
+ }
+ scope[current.resolveAs || '$resolve'] = locals;
+
+ link(scope);
+ }
+ };
+}
+
+
+})(window, window.angular);
diff --git a/server/composer.lock b/server/composer.lock
index e8976df..c6598db 100644
--- a/server/composer.lock
+++ b/server/composer.lock
@@ -122,16 +122,16 @@
},
{
"name": "guzzlehttp/psr7",
- "version": "1.2.1",
+ "version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "4d0bdbe1206df7440219ce14c972aa57cc5e4982"
+ "reference": "f5d04bdd2881ac89abde1fb78cc234bce24327bb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/4d0bdbe1206df7440219ce14c972aa57cc5e4982",
- "reference": "4d0bdbe1206df7440219ce14c972aa57cc5e4982",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5d04bdd2881ac89abde1fb78cc234bce24327bb",
+ "reference": "f5d04bdd2881ac89abde1fb78cc234bce24327bb",
"shasum": ""
},
"require": {
@@ -176,24 +176,24 @@
"stream",
"uri"
],
- "time": "2015-11-03 01:34:55"
+ "time": "2016-01-23 01:23:02"
},
{
"name": "justinrainbow/json-schema",
- "version": "v1.6.0",
+ "version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/justinrainbow/json-schema.git",
- "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d"
+ "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/f9e27c3e202faf14fd581ef41355d83bb4b7eb7d",
- "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d",
+ "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341",
+ "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341",
"shasum": ""
},
"require": {
- "php": ">=5.3.2"
+ "php": ">=5.3.29"
},
"require-dev": {
"json-schema/json-schema-test-suite": "1.1.0",
@@ -206,7 +206,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "1.6.x-dev"
}
},
"autoload": {
@@ -242,7 +242,7 @@
"json",
"schema"
],
- "time": "2016-01-06 14:37:04"
+ "time": "2016-01-25 15:43:01"
},
{
"name": "php-opencloud/openstack",
@@ -250,12 +250,12 @@
"source": {
"type": "git",
"url": "https://github.com/php-opencloud/openstack.git",
- "reference": "8a6ec703597f0440e558d8f1f21b2ff303117dbd"
+ "reference": "15aca73f423166c7ef8337ba08615c103c66e931"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/8a6ec703597f0440e558d8f1f21b2ff303117dbd",
- "reference": "8a6ec703597f0440e558d8f1f21b2ff303117dbd",
+ "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/15aca73f423166c7ef8337ba08615c103c66e931",
+ "reference": "15aca73f423166c7ef8337ba08615c103c66e931",
"shasum": ""
},
"require": {
@@ -275,7 +275,9 @@
"type": "library",
"autoload": {
"psr-4": {
- "OpenStack\\": "src/"
+ "OpenStack\\": "src/",
+ "OpenStack\\Test\\": "tests/unit/",
+ "OpenStack\\Integration\\": "tests/integration/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -286,7 +288,7 @@
"homepage": "https://github.com/jamiehannaford"
}
],
- "time": "2016-01-20 12:27:59"
+ "time": "2016-01-25 10:35:10"
},
{
"name": "psr/http-message",
diff --git a/server/vendor/composer/autoload_psr4.php b/server/vendor/composer/autoload_psr4.php
index 0ba35e5..6c2e482 100644
--- a/server/vendor/composer/autoload_psr4.php
+++ b/server/vendor/composer/autoload_psr4.php
@@ -7,6 +7,8 @@ $baseDir = dirname($vendorDir);
return array(
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
+ 'OpenStack\\Test\\' => array($vendorDir . '/php-opencloud/openstack/tests/unit'),
+ 'OpenStack\\Integration\\' => array($vendorDir . '/php-opencloud/openstack/tests/integration'),
'OpenStack\\' => array($vendorDir . '/php-opencloud/openstack/src'),
'JsonSchema\\' => array($vendorDir . '/justinrainbow/json-schema/src/JsonSchema'),
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
diff --git a/server/vendor/composer/installed.json b/server/vendor/composer/installed.json
index 8e3f2ec..1dfb8d2 100644
--- a/server/vendor/composer/installed.json
+++ b/server/vendor/composer/installed.json
@@ -1,73 +1,5 @@
[
{
- "name": "justinrainbow/json-schema",
- "version": "v1.6.0",
- "version_normalized": "1.6.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/justinrainbow/json-schema.git",
- "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/f9e27c3e202faf14fd581ef41355d83bb4b7eb7d",
- "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.2"
- },
- "require-dev": {
- "json-schema/json-schema-test-suite": "1.1.0",
- "phpdocumentor/phpdocumentor": "~2",
- "phpunit/phpunit": "~3.7"
- },
- "time": "2016-01-06 14:37:04",
- "bin": [
- "bin/validate-json"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.4.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "JsonSchema\\": "src/JsonSchema/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Bruno Prieto Reis",
- "email": "bruno.p.reis@gmail.com"
- },
- {
- "name": "Justin Rainbow",
- "email": "justin.rainbow@gmail.com"
- },
- {
- "name": "Igor Wiedler",
- "email": "igor@wiedler.ch"
- },
- {
- "name": "Robert Schönthal",
- "email": "seroscho@googlemail.com"
- }
- ],
- "description": "A library to validate a json schema.",
- "homepage": "https://github.com/justinrainbow/json-schema",
- "keywords": [
- "json",
- "schema"
- ]
- },
- {
"name": "guzzlehttp/promises",
"version": "1.0.3",
"version_normalized": "1.0.3.0",
@@ -172,66 +104,6 @@
]
},
{
- "name": "guzzlehttp/psr7",
- "version": "1.2.1",
- "version_normalized": "1.2.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/psr7.git",
- "reference": "4d0bdbe1206df7440219ce14c972aa57cc5e4982"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/4d0bdbe1206df7440219ce14c972aa57cc5e4982",
- "reference": "4d0bdbe1206df7440219ce14c972aa57cc5e4982",
- "shasum": ""
- },
- "require": {
- "php": ">=5.4.0",
- "psr/http-message": "~1.0"
- },
- "provide": {
- "psr/http-message-implementation": "1.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "time": "2015-11-03 01:34:55",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "GuzzleHttp\\Psr7\\": "src/"
- },
- "files": [
- "src/functions_include.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- }
- ],
- "description": "PSR-7 message implementation",
- "keywords": [
- "http",
- "message",
- "stream",
- "uri"
- ]
- },
- {
"name": "guzzlehttp/guzzle",
"version": "6.1.1",
"version_normalized": "6.1.1.0",
@@ -302,12 +174,12 @@
"source": {
"type": "git",
"url": "https://github.com/php-opencloud/openstack.git",
- "reference": "8a6ec703597f0440e558d8f1f21b2ff303117dbd"
+ "reference": "15aca73f423166c7ef8337ba08615c103c66e931"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/8a6ec703597f0440e558d8f1f21b2ff303117dbd",
- "reference": "8a6ec703597f0440e558d8f1f21b2ff303117dbd",
+ "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/15aca73f423166c7ef8337ba08615c103c66e931",
+ "reference": "15aca73f423166c7ef8337ba08615c103c66e931",
"shasum": ""
},
"require": {
@@ -324,12 +196,14 @@
"sami/sami": "dev-master",
"satooshi/php-coveralls": "~1.0"
},
- "time": "2016-01-20 12:27:59",
+ "time": "2016-01-25 10:35:10",
"type": "library",
"installation-source": "source",
"autoload": {
"psr-4": {
- "OpenStack\\": "src/"
+ "OpenStack\\": "src/",
+ "OpenStack\\Test\\": "tests/unit/",
+ "OpenStack\\Integration\\": "tests/integration/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -340,5 +214,133 @@
"homepage": "https://github.com/jamiehannaford"
}
]
+ },
+ {
+ "name": "justinrainbow/json-schema",
+ "version": "1.6.1",
+ "version_normalized": "1.6.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/justinrainbow/json-schema.git",
+ "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341",
+ "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.29"
+ },
+ "require-dev": {
+ "json-schema/json-schema-test-suite": "1.1.0",
+ "phpdocumentor/phpdocumentor": "~2",
+ "phpunit/phpunit": "~3.7"
+ },
+ "time": "2016-01-25 15:43:01",
+ "bin": [
+ "bin/validate-json"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.6.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "JsonSchema\\": "src/JsonSchema/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Bruno Prieto Reis",
+ "email": "bruno.p.reis@gmail.com"
+ },
+ {
+ "name": "Justin Rainbow",
+ "email": "justin.rainbow@gmail.com"
+ },
+ {
+ "name": "Igor Wiedler",
+ "email": "igor@wiedler.ch"
+ },
+ {
+ "name": "Robert Schönthal",
+ "email": "seroscho@googlemail.com"
+ }
+ ],
+ "description": "A library to validate a json schema.",
+ "homepage": "https://github.com/justinrainbow/json-schema",
+ "keywords": [
+ "json",
+ "schema"
+ ]
+ },
+ {
+ "name": "guzzlehttp/psr7",
+ "version": "1.2.2",
+ "version_normalized": "1.2.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "f5d04bdd2881ac89abde1fb78cc234bce24327bb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5d04bdd2881ac89abde1fb78cc234bce24327bb",
+ "reference": "f5d04bdd2881ac89abde1fb78cc234bce24327bb",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0",
+ "psr/http-message": "~1.0"
+ },
+ "provide": {
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "time": "2016-01-23 01:23:02",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "PSR-7 message implementation",
+ "keywords": [
+ "http",
+ "message",
+ "stream",
+ "uri"
+ ]
}
]
diff --git a/server/vendor/guzzlehttp/psr7/CHANGELOG.md b/server/vendor/guzzlehttp/psr7/CHANGELOG.md
index 6cdfb39..d875aa3 100644
--- a/server/vendor/guzzlehttp/psr7/CHANGELOG.md
+++ b/server/vendor/guzzlehttp/psr7/CHANGELOG.md
@@ -1,5 +1,12 @@
# CHANGELOG
+## 1.2.2 - 2016-01-22
+
+* Added support for URIs without any authority.
+* Added support for HTTP 451 'Unavailable For Legal Reasons.'
+* Added support for using '0' as a filename.
+* Added support for including non-standard ports in Host headers.
+
## 1.2.1 - 2015-11-02
* Now supporting negative offsets when seeking to SEEK_END.
diff --git a/server/vendor/guzzlehttp/psr7/Makefile b/server/vendor/guzzlehttp/psr7/Makefile
index 9c21096..8b00b43 100644
--- a/server/vendor/guzzlehttp/psr7/Makefile
+++ b/server/vendor/guzzlehttp/psr7/Makefile
@@ -9,5 +9,21 @@ coverage:
view-coverage:
open artifacts/coverage/index.html
+check-tag:
+ $(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))
+
+tag: check-tag
+ @echo Tagging $(TAG)
+ chag update $(TAG)
+ git commit -a -m '$(TAG) release'
+ chag tag
+ @echo "Release has been created. Push using 'make release'"
+ @echo "Changes made in the release commit"
+ git diff HEAD~1 HEAD
+
+release: check-tag
+ git push origin master
+ git push origin $(TAG)
+
clean:
rm -rf artifacts/*
diff --git a/server/vendor/guzzlehttp/psr7/README.md b/server/vendor/guzzlehttp/psr7/README.md
index 0b30d5a..0a4c341 100644
--- a/server/vendor/guzzlehttp/psr7/README.md
+++ b/server/vendor/guzzlehttp/psr7/README.md
@@ -6,6 +6,9 @@ functionality like query string parsing. Currently missing
ServerRequestInterface and UploadedFileInterface; a pull request for these features is welcome.
+[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7)
+
+
# Stream implementation
This package comes with a number of stream implementations and stream
@@ -25,7 +28,7 @@ $a = Psr7\stream_for('abc, ');
$b = Psr7\stream_for('123.');
$composed = new Psr7\AppendStream([$a, $b]);
-$composed->addStream(Psr7\stream_for(' Above all listen to me').
+$composed->addStream(Psr7\stream_for(' Above all listen to me'));
echo $composed(); // abc, 123. Above all listen to me.
```
diff --git a/server/vendor/guzzlehttp/psr7/src/MultipartStream.php b/server/vendor/guzzlehttp/psr7/src/MultipartStream.php
index fd006ec..2988fcb 100644
--- a/server/vendor/guzzlehttp/psr7/src/MultipartStream.php
+++ b/server/vendor/guzzlehttp/psr7/src/MultipartStream.php
@@ -113,7 +113,7 @@ class MultipartStream implements StreamInterface
// Set a default content-disposition header if one was no provided
$disposition = $this->getHeader($headers, 'content-disposition');
if (!$disposition) {
- $headers['Content-Disposition'] = $filename
+ $headers['Content-Disposition'] = ($filename === '0' || $filename)
? sprintf('form-data; name="%s"; filename="%s"',
$name,
basename($filename))
@@ -130,7 +130,7 @@ class MultipartStream implements StreamInterface
// Set a default Content-Type if one was not supplied
$type = $this->getHeader($headers, 'content-type');
- if (!$type && $filename) {
+ if (!$type && ($filename === '0' || $filename)) {
if ($type = mimetype_from_filename($filename)) {
$headers['Content-Type'] = $type;
}
diff --git a/server/vendor/guzzlehttp/psr7/src/Response.php b/server/vendor/guzzlehttp/psr7/src/Response.php
index c94bf8f..58c4c6a 100644
--- a/server/vendor/guzzlehttp/psr7/src/Response.php
+++ b/server/vendor/guzzlehttp/psr7/src/Response.php
@@ -59,6 +59,7 @@ class Response implements ResponseInterface
428 => 'Precondition Required',
429 => 'Too Many Requests',
431 => 'Request Header Fields Too Large',
+ 451 => 'Unavailable For Legal Reasons',
500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
diff --git a/server/vendor/guzzlehttp/psr7/src/Uri.php b/server/vendor/guzzlehttp/psr7/src/Uri.php
index d428f2e..23fa2a4 100644
--- a/server/vendor/guzzlehttp/psr7/src/Uri.php
+++ b/server/vendor/guzzlehttp/psr7/src/Uri.php
@@ -477,21 +477,28 @@ class Uri implements UriInterface
$uri = '';
if (!empty($scheme)) {
- $uri .= $scheme . '://';
+ $uri .= $scheme . ':';
}
+ $hierPart = '';
+
if (!empty($authority)) {
- $uri .= $authority;
+ if (!empty($scheme)) {
+ $hierPart .= '//';
+ }
+ $hierPart .= $authority;
}
if ($path != null) {
// Add a leading slash if necessary.
- if ($uri && substr($path, 0, 1) !== '/') {
- $uri .= '/';
+ if ($hierPart && substr($path, 0, 1) !== '/') {
+ $hierPart .= '/';
}
- $uri .= $path;
+ $hierPart .= $path;
}
+ $uri .= $hierPart;
+
if ($query != null) {
$uri .= '?' . $query;
}
diff --git a/server/vendor/guzzlehttp/psr7/src/functions.php b/server/vendor/guzzlehttp/psr7/src/functions.php
index fd3e7f5..921a5a8 100644
--- a/server/vendor/guzzlehttp/psr7/src/functions.php
+++ b/server/vendor/guzzlehttp/psr7/src/functions.php
@@ -209,6 +209,14 @@ function modify_request(RequestInterface $request, array $changes)
// Remove the host header if one is on the URI
if ($host = $changes['uri']->getHost()) {
$changes['set_headers']['Host'] = $host;
+
+ if ($port = $changes['uri']->getPort()) {
+ $standardPorts = ['http' => 80, 'https' => 443];
+ $scheme = $changes['uri']->getScheme();
+ if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
+ $changes['set_headers']['Host'] .= ':'.$port;
+ }
+ }
}
$uri = $changes['uri'];
}
diff --git a/server/vendor/guzzlehttp/psr7/tests/FunctionsTest.php b/server/vendor/guzzlehttp/psr7/tests/FunctionsTest.php
index de5b5cb..65cb954 100644
--- a/server/vendor/guzzlehttp/psr7/tests/FunctionsTest.php
+++ b/server/vendor/guzzlehttp/psr7/tests/FunctionsTest.php
@@ -546,6 +546,16 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('www.foo.com', (string) $r2->getHeaderLine('host'));
}
+ public function testCanModifyRequestWithUriAndPort()
+ {
+ $r1 = new Psr7\Request('GET', 'http://foo.com:8000');
+ $r2 = Psr7\modify_request($r1, [
+ 'uri' => new Psr7\Uri('http://www.foo.com:8000')
+ ]);
+ $this->assertEquals('http://www.foo.com:8000', (string) $r2->getUri());
+ $this->assertEquals('www.foo.com:8000', (string) $r2->getHeaderLine('host'));
+ }
+
public function testCanModifyRequestWithCaseInsensitiveHeader()
{
$r1 = new Psr7\Request('GET', 'http://foo.com', ['User-Agent' => 'foo']);
diff --git a/server/vendor/guzzlehttp/psr7/tests/UriTest.php b/server/vendor/guzzlehttp/psr7/tests/UriTest.php
index 2776920..a63293c 100644
--- a/server/vendor/guzzlehttp/psr7/tests/UriTest.php
+++ b/server/vendor/guzzlehttp/psr7/tests/UriTest.php
@@ -244,4 +244,38 @@ class UriTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('foo', $uri->getPath());
$this->assertEquals('bar.com/foo', (string) $uri);
}
+
+ /**
+ * @dataProvider pathTestNoAuthority
+ */
+ public function testNoAuthority($input)
+ {
+ $uri = new Uri($input);
+
+ $this->assertEquals($input, (string) $uri);
+ }
+
+ public function pathTestNoAuthority()
+ {
+ return [
+ // path-rootless
+ ['urn:example:animal:ferret:nose'],
+ // path-absolute
+ ['urn:/example:animal:ferret:nose'],
+ ['urn:/'],
+ // path-empty
+ ['urn:'],
+ ['urn'],
+ ];
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ * @expectedExceptionMessage Unable to parse URI
+ */
+ public function testNoAuthorityWithInvalidPath()
+ {
+ $input = 'urn://example:animal:ferret:nose';
+ $uri = new Uri($input);
+ }
}
diff --git a/server/vendor/justinrainbow/json-schema/composer.json b/server/vendor/justinrainbow/json-schema/composer.json
index c45891a..68b3933 100644
--- a/server/vendor/justinrainbow/json-schema/composer.json
+++ b/server/vendor/justinrainbow/json-schema/composer.json
@@ -36,7 +36,7 @@
}
}],
"require": {
- "php": ">=5.3.2"
+ "php": ">=5.3.29"
},
"require-dev": {
"json-schema/JSON-Schema-Test-Suite": "1.1.0",
@@ -52,7 +52,7 @@
"bin": ["bin/validate-json"],
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "1.6.x-dev"
}
}
}
diff --git a/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php b/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php
index a4570f6..8cd25c1 100644
--- a/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php
+++ b/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php
@@ -19,11 +19,28 @@ use JsonSchema\Validator;
class Factory
{
/**
- * @var UriRetriever
+ * @var UriRetriever $uriRetriever
*/
protected $uriRetriever;
/**
+ * @var array $constraintMap
+ */
+ protected $constraintMap = array(
+ 'array' => 'JsonSchema\Constraints\CollectionConstraint',
+ 'collection' => 'JsonSchema\Constraints\CollectionConstraint',
+ 'object' => 'JsonSchema\Constraints\ObjectConstraint',
+ 'type' => 'JsonSchema\Constraints\TypeConstraint',
+ 'undefined' => 'JsonSchema\Constraints\UndefinedConstraint',
+ 'string' => 'JsonSchema\Constraints\StringConstraint',
+ 'number' => 'JsonSchema\Constraints\NumberConstraint',
+ 'enum' => 'JsonSchema\Constraints\EnumConstraint',
+ 'format' => 'JsonSchema\Constraints\FormatConstraint',
+ 'schema' => 'JsonSchema\Constraints\SchemaConstraint',
+ 'validator' => 'JsonSchema\Validator',
+ );
+
+ /**
* @param UriRetriever $uriRetriever
*/
public function __construct(UriRetriever $uriRetriever = null)
@@ -44,6 +61,25 @@ class Factory
}
/**
+ * @param string $name
+ * @param string $class
+ * @return Factory
+ */
+ public function setConstraintClass($name, $class)
+ {
+ // Ensure class exists
+ if (!class_exists($class)) {
+ throw new InvalidArgumentException('Unknown constraint ' . $name);
+ }
+ // Ensure class is appropriate
+ if (!in_array('JsonSchema\Constraints\ConstraintInterface', class_implements($class))) {
+ throw new InvalidArgumentException('Invalid class ' . $name);
+ }
+ $this->constraintMap[$name] = $class;
+ return $this;
+ }
+
+ /**
* Create a constraint instance for the given constraint name.
*
* @param string $constraintName
@@ -52,30 +88,9 @@ class Factory
*/
public function createInstanceFor($constraintName)
{
- switch ($constraintName) {
- case 'array':
- case 'collection':
- return new CollectionConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'object':
- return new ObjectConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'type':
- return new TypeConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'undefined':
- return new UndefinedConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'string':
- return new StringConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'number':
- return new NumberConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'enum':
- return new EnumConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'format':
- return new FormatConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'schema':
- return new SchemaConstraint(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
- case 'validator':
- return new Validator(Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
+ if (array_key_exists($constraintName, $this->constraintMap)) {
+ return new $this->constraintMap[$constraintName](Constraint::CHECK_MODE_NORMAL, $this->uriRetriever, $this);
}
-
throw new InvalidArgumentException('Unknown constraint ' . $constraintName);
}
}
diff --git a/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php b/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php
index 0a34bdc..c5aaf6a 100644
--- a/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php
+++ b/server/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php
@@ -25,8 +25,8 @@ class NumberConstraint extends Constraint
// Verify minimum
if (isset($schema->exclusiveMinimum)) {
if (isset($schema->minimum)) {
- if ($schema->exclusiveMinimum && $element === $schema->minimum) {
- $this->addError($path, "Must have a minimum value greater than boundary value of " . $schema->minimum, 'exclusiveMinimum', array('minimum' => $schema->minimum,));
+ if ($schema->exclusiveMinimum && $element <= $schema->minimum) {
+ $this->addError($path, "Must have a minimum value of " . $schema->minimum, 'exclusiveMinimum', array('minimum' => $schema->minimum,));
} else if ($element < $schema->minimum) {
$this->addError($path, "Must have a minimum value of " . $schema->minimum, 'minimum', array('minimum' => $schema->minimum,));
}
@@ -40,8 +40,8 @@ class NumberConstraint extends Constraint
// Verify maximum
if (isset($schema->exclusiveMaximum)) {
if (isset($schema->maximum)) {
- if ($schema->exclusiveMaximum && $element === $schema->maximum) {
- $this->addError($path, "Must have a maximum value less than boundary value of " . $schema->maximum, 'exclusiveMaximum', array('maximum' => $schema->maximum,));
+ if ($schema->exclusiveMaximum && $element >= $schema->maximum) {
+ $this->addError($path, "Must have a maximum value of " . $schema->maximum, 'exclusiveMaximum', array('maximum' => $schema->maximum,));
} else if ($element > $schema->maximum) {
$this->addError($path, "Must have a maximum value of " . $schema->maximum, 'maximum', array('maximum' => $schema->maximum,));
}
diff --git a/server/vendor/php-opencloud/openstack b/server/vendor/php-opencloud/openstack
-Subproject 8a6ec703597f0440e558d8f1f21b2ff303117db
+Subproject 15aca73f423166c7ef8337ba08615c103c66e93