Skip to content

Commit

Permalink
Merge branch 'master' into feature/text-lint
Browse files Browse the repository at this point in the history
* Relax ThereIs rule to align with AGPL Disclaimer.
  • Loading branch information
jason-fox committed Feb 20, 2019
2 parents 76f4d2c + 2303f02 commit efe523e
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 64 deletions.
1 change: 0 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"maxlen": 120,
"node": true,
"expr": true,
"unused": "vars",
"esversion": 6,
"globals": {
"describe":true,
Expand Down
3 changes: 2 additions & 1 deletion .textlintrc
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@
"passive": false,
"tooWordy": false,
"weasel": false,
"so": false
"so": false,
"thereIs": false
},
"no-dead-link": {
"ignoreRedirects": true,
Expand Down
18 changes: 0 additions & 18 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
- Set Nodejs 8.12.0 as minimum version in packages.json
- Add: use NodeJS 8 in Dockerfile
- Add: use PM2 in Dockerfile
- Upgrade depedency logops from 1.0.0-alpha.7 to 2.1.0
- Upgrade dev dependency istanbul from ~0.1.34 to ~0.4.5
- Upgrade dev dependency mocha from 2.4.5 to to 5.2.0
- Remove: old unused development dependencies
* grunt and grunt related module
* closure-linter-wrapper
- Add 'ruleName' as variable automatically in rule text field (EPL) on rule creation time (#307)
- Change on the PERSEO_ORION_URL env var behaviour. Now it represents Context Broker base URL instead of the
updateContext endpoint
- Add: new ngsijs ~1.2.0 dependency
- Add: new rewire ~4.0.1 dev dependency
- Add: NGSIv2 support in both notification reception and CB update action
- Upgrade dev dependency chai from ~1.8.0 to ~4.1.2
- Upgrade dev dependency sinon from ~1.7.3 to ~6.1.0
- Upgrade dev dependency sinon-chai from 2.4.0 to ~3.2.0
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,19 @@ CEP implementation for IoT platform

## License

Perseo FE is licensed under Affero General Public License (GPL) version 3.
Perseo FE is licensed under [Affero General Public License (GPL) version 3](./LICENSE).

### Are there any legal issues with AGPL 3.0? Is it safe for me to use?

There is absolutely no problem in using a product licensed under AGPL 3.0. Issues with GPL (or AGPL) licenses are mostly
related with the fact that different people assign different interpretations on the meaning of the term “derivate work”
used in these licenses. Due to this, some people believe that there is a risk in just _using_ software under GPL or AGPL
licenses (even without _modifying_ it).

For the avoidance of doubt, the owners of this software licensed under an AGPL 3.0 license
wish to make a clarifying public statement as follows:

> Please note that software derived as a result of modifying the source code of this software in order to fix a bug or
> incorporate enhancements is considered a derivative work of the product. Software that merely uses or aggregates (i.e.
> links to) an otherwise unmodified version of existing software is not considered a derivative work, and therefore it
> does not need to be released as under the same license, or even released as open source.
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ config.smpp = {
* Orion (Context Broker) endpoint options
*/
config.orion = {
URL: 'http://orion-endpoint:1026/NGSI10/updateContext'
URL: 'http://orion-endpoint:1026'
};

/**
Expand Down
4 changes: 2 additions & 2 deletions config.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ config.sms = {
* Orion (Context Broker) endpoint options
*/
config.orion = {
URL : 'http://<%= @cb_host %>:<%= @cb_port %>/NGSI10/updateContext'
URL : 'http://<%= @cb_host %>:<%= @cb_port %>'
};

/**
Expand All @@ -145,4 +145,4 @@ config.collections = {
config.DEFAULT_SERVICE= '/';
config.DEFAULT_TENANT= 'unknownt';

module.exports = config;
module.exports = config;
13 changes: 3 additions & 10 deletions lib/models/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ function conditionalExec(task, lastTime, callbackW) {
}
function slaveExec(task, alreadyExecuted, callback) {
if (!alreadyExecuted) {
async.waterfall([executionsStore.LastTime.bind(null, task), conditionalExec.bind(null, task)], function(
err,
tasks
) {
async.waterfall([executionsStore.LastTime.bind(null, task), conditionalExec.bind(null, task)], function(err) {
callback(err);
});
} else {
Expand All @@ -161,16 +158,12 @@ function execAxn(task, cbCe) {
logger.debug('executing axn task %j', task);
if (config.isMaster) {
async.waterfall([executionsStore.LastTime.bind(null, task), conditionalExec.bind(null, task)], function(
err,
results
err
) {
cbCe(err);
});
} else {
async.waterfall([executionsStore.AlreadyDone.bind(null, task), slaveExec.bind(null, task)], function(
err,
results
) {
async.waterfall([executionsStore.AlreadyDone.bind(null, task), slaveExec.bind(null, task)], function(err) {
cbCe(err);
});
}
Expand Down
4 changes: 2 additions & 2 deletions lib/models/noSignal.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function alertFunc(nsLineRule, entity) {
function checkNoSignal(period) {
var list = nsRulesByInterval[period] || [];
logger.debug(context, 'Executing no-signal handler for period of %d (%d rules)', period, list.length);
list.forEach(function(nsrule, i) {
list.forEach(function(nsrule) {
entitiesStore.FindSilentEntities(
nsrule[SERVICE],
nsrule[SUBSERVICE],
Expand Down Expand Up @@ -265,7 +265,7 @@ function refreshAllRules(rules) {
if (rule.nosignal) {
//check if any checkInterval has been modified, and delete if so.
oldRuleArr = getNSRule(rule.service, rule.subservice, rule.name);
deleteNSRuleIf(function(srv, subsrv, name) {
deleteNSRuleIf(function() {
return oldRuleArr && oldRuleArr[CHECK_INTERVAL] !== rule.nosignal.checkInterval;
});
if (addNSRule(rule.service, rule.subservice, rule.name, rule.nosignal) > 0) {
Expand Down
2 changes: 1 addition & 1 deletion lib/models/twitterAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function doIt(action, event, callback) {
client = new Twitter(options);

text = buildTwitterOptions(action, event).text;
client.post('statuses/update', { status: text }, function(err, params, response) {
client.post('statuses/update', { status: text }, function(err, params) {
if (err) {
metrics.IncMetrics(event.service, event.subservice, metrics.failedActionTwitter);
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/myutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function respond(resp, err, data, withCount, raw) {
return respondAux(resp, err, data, withCount, raw, true);
}

function respondWOMetrics(resp, err, data, withCount, raw, withMetrics) {
function respondWOMetrics(resp, err, data, withCount, raw) {
return respondAux(resp, err, data, withCount, raw, false);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/perseo.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function start(callbackStart) {
app.use(domainMiddleware);
app.use(
bodyParser.json({
verify: function(req, res, buf, encoding) {
verify: function(req, res, buf) {
// actions are internal, not to be included
if (
req.url !== config.endpoint.actionsPath &&
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "perseo",
"description": "IOT CEP front End",
"license": "AGPL-3.0-only",
"version": "1.7.0-next",
"version": "1.8.0-next",
"homepage": "",
"author": {
"name": "crbrox",
Expand Down
20 changes: 20 additions & 0 deletions rpm/SPECS/cep.spec
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,26 @@ rm -rf $RPM_BUILD_ROOT
%{_install_dir}

%changelog
* Fri Feb 08 2019 Fermin Galan <[email protected]> 1.8.0
- Add: NGSIv2 support in both notification reception and CB update action
- Change on the PERSEO_ORION_URL env var behaviour. Now it represents Context Broker base URL instead of the
updateContext endpoint
- Add: 'ruleName' as variable automatically in rule text field (EPL) on rule creation time (#307)
- Set Nodejs 8.12.0 as minimum version in packages.json (effectively removing Nodev4 and Nodev6 as supported versions)
- Add: use NodeJS 8 in Dockerfile
- Add: use PM2 in Dockerfile
- Add: new ngsijs ~1.2.0 dependency
- Add: new rewire ~4.0.1 dev dependency
- Upgrade depedency logops from 1.0.0-alpha.7 to 2.1.0
- Upgrade dev dependency istanbul from ~0.1.34 to ~0.4.5
- Upgrade dev dependency mocha from 2.4.5 to to 5.2.0
- Upgrade dev dependency chai from ~1.8.0 to ~4.1.2
- Upgrade dev dependency sinon from ~1.7.3 to ~6.1.0
- Upgrade dev dependency sinon-chai from 2.4.0 to ~3.2.0
- Remove: old unused development dependencies
* grunt and grunt related module
* closure-linter-wrapper

* Thu Sep 20 2018 Fermin Galan <[email protected]> 1.7.0
- Add: new parameter to updateAction card: actionType: APPEND (default) or UPDATE (#278)
- Using precise dependencies (~=) in packages.json
Expand Down
25 changes: 1 addition & 24 deletions test/utils/utilsT.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ var fs = require('fs'),
fakeServerPort = 9753,
fakeServerCode = 200,
fakeServerMessage = 'All right',
fakeServerCallback,
URL = require('url').URL;
fakeServerCallback;

function loadExample(fileName) {
var f = fs.readFileSync(fileName);
Expand Down Expand Up @@ -79,28 +78,6 @@ function dropRules(callback) {
function dropExecutions(callback) {
remove(config.collections.executions, callback);
}
function dropEntities(callback) {
MongoClient.connect(
new URL('v1/updateContext', config.orion.URL),
function(err, db) {
if (err) {
return callback(err);
}
db.collection(config.orionDb.collection, {}, function(err, coll) {
if (err) {
return callback(err);
}
coll.remove({}, function(err, result) {
if (err) {
return callback(err);
}
db.close();
return callback(null, result);
});
});
}
);
}

function dropCollection(collection, callback) {
MongoClient.connect(
Expand Down

0 comments on commit efe523e

Please sign in to comment.