aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2018-07-06 21:47:04 +0200
committerNoah Loomans <noahloomans@gmail.com>2018-07-06 21:47:04 +0200
commit55a6e891c8d7f19dc9841bf097e66df2f00d0d5f (patch)
tree5e49f777be5a2164010b2087e90477652f34242c
parentd49b651d0d894f58e0ebbcd4cf5f0777ec66ee21 (diff)
Add license notice to all missing files
-rw-r--r--.eslintrc6
-rw-r--r--.licence-template20
-rw-r--r--package-lock.json20
-rw-r--r--package.json1
-rw-r--r--src/client/react/App.js20
-rw-r--r--src/client/react/AppRouter.js20
-rw-r--r--src/client/react/components/presentational/WeekDisplay.js20
-rw-r--r--src/client/react/lib/getSearchResults.js20
-rw-r--r--src/client/react/lib/rejectIfBadStatus.js20
-rw-r--r--src/client/react/lib/withinRange.js20
-rw-r--r--src/client/react/lib/withinRange.test.js20
-rw-r--r--src/client/react/store/actions.js20
-rw-r--r--src/client/react/store/selectors.js20
-rw-r--r--src/server/lib/schools/hetmml/parseSchedule.js20
-rw-r--r--webpack.config.js20
15 files changed, 266 insertions, 1 deletions
diff --git a/.eslintrc b/.eslintrc
index dab636c..36ded27 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -6,12 +6,16 @@
"node": true,
"jest": true
},
+ "plugins":["notice"],
"rules": {
"react/jsx-filename-extension": "off",
"no-underscore-dangle": ["error", { "allow": ["_test", "__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"] }],
"no-prototype-builtins": "off",
"react/forbid-prop-types": "off",
"react/prefer-stateless-function": "off",
- "import/prefer-default-export": "off"
+ "import/prefer-default-export": "off",
+ "notice/notice":["error", {
+ "templateFile": ".licence-template"
+ }]
}
}
diff --git a/.licence-template b/.licence-template
new file mode 100644
index 0000000..f8e8582
--- /dev/null
+++ b/.licence-template
@@ -0,0 +1,20 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
diff --git a/package-lock.json b/package-lock.json
index 06c9573..471a426 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3879,6 +3879,16 @@
"jsx-ast-utils": "2.0.1"
}
},
+ "eslint-plugin-notice": {
+ "version": "0.7.7",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-notice/-/eslint-plugin-notice-0.7.7.tgz",
+ "integrity": "sha512-kHVNObyW2QPEqunQyZiV9loKRV04IuDv096rtYJSziyDASOSPcjl2eLibQdw8BFNbb/DNZj3obN8iMAeydL2hg==",
+ "requires": {
+ "find-root": "1.1.0",
+ "lodash": "4.17.10",
+ "metric-lcs": "0.1.2"
+ }
+ },
"eslint-plugin-react": {
"version": "7.10.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz",
@@ -4510,6 +4520,11 @@
"pkg-dir": "2.0.0"
}
},
+ "find-root": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",
+ "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng=="
+ },
"find-up": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
@@ -7218,6 +7233,11 @@
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
},
+ "metric-lcs": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/metric-lcs/-/metric-lcs-0.1.2.tgz",
+ "integrity": "sha512-+TZ5dUDPKPJaU/rscTzxyN8ZkX7eAVLAiQU/e+YINleXPv03SCmJShaMT1If1liTH8OcmWXZs0CmzCBRBLcMpA=="
+ },
"micromatch": {
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
diff --git a/package.json b/package.json
index d46178f..5b751f4 100644
--- a/package.json
+++ b/package.json
@@ -27,6 +27,7 @@
"compression": "^1.6.2",
"connected-react-router": "^4.3.0",
"dompurify": "^1.0.3",
+ "eslint-plugin-notice": "^0.7.7",
"express": "^4.16.3",
"express-handlebars": "^3.0.0",
"fuzzy-search": "^2.0.1",
diff --git a/src/client/react/App.js b/src/client/react/App.js
index f4cb848..d79b653 100644
--- a/src/client/react/App.js
+++ b/src/client/react/App.js
@@ -1,3 +1,23 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
import React from 'react';
import PropTypes from 'prop-types';
diff --git a/src/client/react/AppRouter.js b/src/client/react/AppRouter.js
index 0384555..276c5d3 100644
--- a/src/client/react/AppRouter.js
+++ b/src/client/react/AppRouter.js
@@ -1,3 +1,23 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
import React from 'react';
import {
diff --git a/src/client/react/components/presentational/WeekDisplay.js b/src/client/react/components/presentational/WeekDisplay.js
index 38125b2..f459284 100644
--- a/src/client/react/components/presentational/WeekDisplay.js
+++ b/src/client/react/components/presentational/WeekDisplay.js
@@ -1,3 +1,23 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
import React from 'react';
import PropTypes from 'prop-types';
diff --git a/src/client/react/lib/getSearchResults.js b/src/client/react/lib/getSearchResults.js
index fafbd0b..6b7fd9d 100644
--- a/src/client/react/lib/getSearchResults.js
+++ b/src/client/react/lib/getSearchResults.js
@@ -1,3 +1,23 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
import FuzzySearch from 'fuzzy-search';
import uniqBy from 'lodash/uniqBy';
import users from '../users';
diff --git a/src/client/react/lib/rejectIfBadStatus.js b/src/client/react/lib/rejectIfBadStatus.js
index 29bf3b2..c44e824 100644
--- a/src/client/react/lib/rejectIfBadStatus.js
+++ b/src/client/react/lib/rejectIfBadStatus.js
@@ -1 +1,21 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
export default response => (response.ok ? response : Promise.reject(response.status));
diff --git a/src/client/react/lib/withinRange.js b/src/client/react/lib/withinRange.js
index d3d4f24..c973d74 100644
--- a/src/client/react/lib/withinRange.js
+++ b/src/client/react/lib/withinRange.js
@@ -1,3 +1,23 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
export default function withinRange(number, rangeMax) {
if (number < 0) {
return withinRange(number + (rangeMax + 1), rangeMax);
diff --git a/src/client/react/lib/withinRange.test.js b/src/client/react/lib/withinRange.test.js
index baec122..aca85d2 100644
--- a/src/client/react/lib/withinRange.test.js
+++ b/src/client/react/lib/withinRange.test.js
@@ -1,3 +1,23 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
import withinRange from './withinRange';
describe('withinRange', () => {
diff --git a/src/client/react/store/actions.js b/src/client/react/store/actions.js
index 131bcaa..7e49f46 100644
--- a/src/client/react/store/actions.js
+++ b/src/client/react/store/actions.js
@@ -1,3 +1,23 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
import { push } from 'connected-react-router';
import queryString from 'query-string';
import users from '../users';
diff --git a/src/client/react/store/selectors.js b/src/client/react/store/selectors.js
index 2567107..d52539b 100644
--- a/src/client/react/store/selectors.js
+++ b/src/client/react/store/selectors.js
@@ -1,3 +1,23 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
import moment from 'moment';
import queryString from 'query-string';
import isNaN from 'lodash/isNaN';
diff --git a/src/server/lib/schools/hetmml/parseSchedule.js b/src/server/lib/schools/hetmml/parseSchedule.js
index 14e861e..066d637 100644
--- a/src/server/lib/schools/hetmml/parseSchedule.js
+++ b/src/server/lib/schools/hetmml/parseSchedule.js
@@ -1,3 +1,23 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
const { JSDOM } = require('jsdom');
function fixFirstLargeScheduleItem(trNodeList) {
diff --git a/webpack.config.js b/webpack.config.js
index 2549124..1291180 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,3 +1,23 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
const webpack = require('webpack');
const path = require('path');