Skip to content

Commit

Permalink
Bumped version to 4.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
João Vieira committed Apr 3, 2017
1 parent 420e71c commit d0c0df4
Show file tree
Hide file tree
Showing 9 changed files with 181 additions and 23 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v4.4.0 (03-04-2017)

## Features

-**Roles**: Add Role resource in Operator and User scope.

# v4.3.0 (30-01-2017)

## Features
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ See [Usage](#usage) below for more details.

Add the script tag into your HTML page:

<script src="//cdn.evrythng.com/toolkit/evrythng-js-sdk/evrythng-4.3.0.min.js"></script>
<script src="//cdn.evrythng.com/toolkit/evrythng-js-sdk/evrythng-4.4.0.min.js"></script>

Or always get the latest release (warning, new releases might break your code!):

Expand All @@ -43,7 +43,7 @@ Or always get the latest release (warning, new releases might break your code!):

For HTTPS you need to use:

<script src="//d10ka0m22z5ju5.cloudfront.net/toolkit/evrythng-js-sdk/evrythng-4.3.0.min.js"></script>
<script src="//d10ka0m22z5ju5.cloudfront.net/toolkit/evrythng-js-sdk/evrythng-4.4.0.min.js"></script>
<script src="//d10ka0m22z5ju5.cloudfront.net/toolkit/evrythng-js-sdk/evrythng.js"></script>
<script src="//d10ka0m22z5ju5.cloudfront.net/toolkit/evrythng-js-sdk/evrythng.min.js"></script>

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "evrythng",
"version": "4.3.0",
"version": "4.4.0",
"main": "dist/evrythng.js",
"ignore": [
"**/.*",
Expand Down
88 changes: 82 additions & 6 deletions dist/evrythng.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// EVRYTHNG JS SDK v4.3.0
// EVRYTHNG JS SDK v4.4.0
// (c) 2012-2017 EVRYTHNG Ltd. London / New York / San Francisco.
// Released under the Apache Software License, Version 2.0.
// For all details and usage:
Expand Down Expand Up @@ -41,9 +41,8 @@
runtime = global.regeneratorRuntime = inModule ? module.exports : {};

function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
// If outerFn provided, then outerFn.prototype instanceof Generator.
var generator = Object.create((outerFn || Generator).prototype);
var context = new Context(tryLocsList || []);

// The ._invoke method unifies the implementations of the .next,
Expand Down Expand Up @@ -1734,7 +1733,7 @@ define('core',[
'use strict';

// Version is updated from package.json using `grunt-version` on build.
var version = '4.3.0';
var version = '4.4.0';


// Setup default settings:
Expand Down Expand Up @@ -4546,6 +4545,79 @@ define('entity/collection',[
};
});

// ## TASK.JS

// Task is a nested resource for Batch.
define('entity/task',[
'core',
'./entity',
'resource',
'utils'
], function (EVT, Entity, Resource, Utils) {
'use strict';

// Setup Task inheritance from Entity.
var Task = function () {
Entity.apply(this, arguments);
};

Task.prototype = Object.create(Entity.prototype);
Task.prototype.constructor = Task;

// Attach class to EVT module.
EVT.Entity.Task = Task;

return {

'class': Task,

resourceConstructor: function (id) {

if (!this.resource) {
throw new Error('This Entity does not have a Resource.');
}

var path = this.resource.path + '/tasks',
scope = this.resource.scope,
resource;

resource = Resource.constructorFactory(path, EVT.Entity.Task).call(scope, id);

return resource;
}
};
});

// ## ROLE.JS

// **Role defines a set of API access permissions, containing a nested
// Permission resource.**

define('entity/role',[
'core',
'./entity',
'./task',
'resource'
], function (EVT, Entity, Task, Resource) {
'use strict';

// Setup Role inheritance from Entity.
var Role = function () {
Entity.apply(this, arguments);
};

Role.prototype = Object.create(Entity.prototype);
Role.prototype.constructor = Role;

// Attach class to EVT module.
EVT.Entity.Role = Role;

return {
'class': Role,
resourceConstructor: Resource.constructorFactory('/roles', EVT.Entity.Role)
};
});

// ## USER.JS

// **Here it is defined the UserScope or `EVT.User`. EVT.User
Expand All @@ -4561,6 +4633,7 @@ define('entity/collection',[
// - Collection resource (`C`, `R`, `U`)
// - Logout
// - Update itself (the user information)
// - Role resource (`R`)
// - (`C`, `R`, `U` actions via products/thngs)

define('scope/user',[
Expand All @@ -4573,11 +4646,12 @@ define('scope/user',[
'entity/action',
'entity/collection',
'entity/place',
'entity/role',
'authentication',
'utils',
'logger'
], function (EVT, Scope, Product, Thng, User, ActionType, Action, Collection,
Place, Authentication, Utils, Logger) {
Place, Role, Authentication, Utils, Logger) {
'use strict';

// User Scope constructor. It can be called with the parameters:
Expand Down Expand Up @@ -4662,6 +4736,8 @@ define('scope/user',[

place: Place.resourceConstructor,

role: Role.resourceConstructor,

logout: Authentication.logout,

update: update
Expand Down
6 changes: 3 additions & 3 deletions dist/evrythng.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/evrythng.min.js.map

Large diffs are not rendered by default.

88 changes: 82 additions & 6 deletions lib/evrythng.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// EVRYTHNG JS SDK v4.3.0
// EVRYTHNG JS SDK v4.4.0
// (c) 2012-2017 EVRYTHNG Ltd. London / New York / San Francisco.
// Released under the Apache Software License, Version 2.0.
// For all details and usage:
Expand Down Expand Up @@ -41,9 +41,8 @@
runtime = global.regeneratorRuntime = inModule ? module.exports : {};

function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
// If outerFn provided, then outerFn.prototype instanceof Generator.
var generator = Object.create((outerFn || Generator).prototype);
var context = new Context(tryLocsList || []);

// The ._invoke method unifies the implementations of the .next,
Expand Down Expand Up @@ -1728,7 +1727,7 @@ define('core',[
'use strict';

// Version is updated from package.json using `grunt-version` on build.
var version = '4.3.0';
var version = '4.4.0';


// Setup default settings:
Expand Down Expand Up @@ -4307,6 +4306,79 @@ define('entity/collection',[
};
});

// ## TASK.JS

// Task is a nested resource for Batch.
define('entity/task',[
'core',
'./entity',
'resource',
'utils'
], function (EVT, Entity, Resource, Utils) {
'use strict';

// Setup Task inheritance from Entity.
var Task = function () {
Entity.apply(this, arguments);
};

Task.prototype = Object.create(Entity.prototype);
Task.prototype.constructor = Task;

// Attach class to EVT module.
EVT.Entity.Task = Task;

return {

'class': Task,

resourceConstructor: function (id) {

if (!this.resource) {
throw new Error('This Entity does not have a Resource.');
}

var path = this.resource.path + '/tasks',
scope = this.resource.scope,
resource;

resource = Resource.constructorFactory(path, EVT.Entity.Task).call(scope, id);

return resource;
}
};
});

// ## ROLE.JS

// **Role defines a set of API access permissions, containing a nested
// Permission resource.**

define('entity/role',[
'core',
'./entity',
'./task',
'resource'
], function (EVT, Entity, Task, Resource) {
'use strict';

// Setup Role inheritance from Entity.
var Role = function () {
Entity.apply(this, arguments);
};

Role.prototype = Object.create(Entity.prototype);
Role.prototype.constructor = Role;

// Attach class to EVT module.
EVT.Entity.Role = Role;

return {
'class': Role,
resourceConstructor: Resource.constructorFactory('/roles', EVT.Entity.Role)
};
});

// ## USER.JS

// **Here it is defined the UserScope or `EVT.User`. EVT.User
Expand All @@ -4322,6 +4394,7 @@ define('entity/collection',[
// - Collection resource (`C`, `R`, `U`)
// - Logout
// - Update itself (the user information)
// - Role resource (`R`)
// - (`C`, `R`, `U` actions via products/thngs)

define('scope/user',[
Expand All @@ -4334,11 +4407,12 @@ define('scope/user',[
'entity/action',
'entity/collection',
'entity/place',
'entity/role',
'authentication',
'utils',
'logger'
], function (EVT, Scope, Product, Thng, User, ActionType, Action, Collection,
Place, Authentication, Utils, Logger) {
Place, Role, Authentication, Utils, Logger) {
'use strict';

// User Scope constructor. It can be called with the parameters:
Expand Down Expand Up @@ -4423,6 +4497,8 @@ define('scope/user',[

place: Place.resourceConstructor,

role: Role.resourceConstructor,

logout: Authentication.logout,

update: update
Expand Down
6 changes: 3 additions & 3 deletions lib/evrythng.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/evrythng.min.js.map

Large diffs are not rendered by default.

0 comments on commit d0c0df4

Please sign in to comment.