Skip to content

Commit

Permalink
Merge pull request #1 from pkp/master
Browse files Browse the repository at this point in the history
Update of 17/10/2018
  • Loading branch information
Zeno Tajoli authored Oct 17, 2018
2 parents 5a7a466 + 5e84418 commit 60bc4c3
Show file tree
Hide file tree
Showing 2,567 changed files with 47,388 additions and 61,677 deletions.
7 changes: 5 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"presets": [
["es2015", { "modules": false }]
]
["env", { "modules": false }],
"stage-2"
],
"plugins": ["transform-runtime"],
"comments": false,
}
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
charset = utf-8
indent_style = tab
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lib/ui-library/build/*.js
lib/ui-library/config/*.js
node_modules
43 changes: 43 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// http://eslint.org/docs/user-guide/configuring

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
},
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
extends: 'standard',
// required to lint *.vue files
plugins: [
'html'
],
globals: {
'_': false,
'$': false,
'pkp': false,
},
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
// use tab indentation
'no-tabs': 0,
'indent': ['error', 'tab', {SwitchCase: 1}],
// enforce trailing commas on multi-line arrays/obbjects
'comma-dangle': ['error', 'always-multiline'],
// require semi-colons at the end of statements
'semi': ['error', 'always'],
// don't enforce block padding rules
'padded-blocks': 0,
// don't require === for comparisons
'eqeqeq': 0,
}
};
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
./build
temp
/files
/plugins/paymethod/paypal/vendor/
.htaccess
.project
.buildpath
.settings
.DS_Store
node_modules
js/build.js
js/build.js.map
styles/build.css
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[submodule "lib/pkp"]
path = lib/pkp
url = https://github.com/pkp/pkp-lib.git
[submodule "plugins/generic/usageStats"]
path = plugins/generic/usageStats
url = https://github.com/pkp/usageStats.git
[submodule "plugins/generic/customBlockManager"]
path = plugins/generic/customBlockManager
url = https://github.com/pkp/customBlockManager.git
Expand Down Expand Up @@ -35,3 +38,12 @@
[submodule "plugins/reports/reviewReport"]
path = plugins/reports/reviewReport
url = https://github.com/pkp/reviewReport
[submodule "lib/ui-library"]
path = lib/ui-library
url = https://github.com/pkp/ui-library
[submodule "plugins/generic/citationStyleLanguage"]
path = plugins/generic/citationStyleLanguage
url = https://github.com/pkp/citationStyleLanguage.git
[submodule "plugins/reports/counter/classes/COUNTER"]
path = plugins/reports/counter/classes/COUNTER
url = https://github.com/ulsdevteam/COUNTER.git
33 changes: 0 additions & 33 deletions .openshift/action_hooks/deploy

This file was deleted.

8 changes: 8 additions & 0 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// https://github.com/michael-ciniawsky/postcss-load-config

module.exports = {
"plugins": {
// to edit target browsers: use "browserlist" field in package.json
"autoprefixer": {}
}
};
80 changes: 38 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,61 @@
# Configure the build matrix
env:
matrix:
- TEST=validation
- TEST=pgsql
- TEST=mysql
- TEST=validation # Validation tests: lint the XML, minify the Javascript, etc
- TEST=pgsql # Integration tests using PostgreSQL
- TEST=mysql # Integration tests using MySQL/MariaDB
global:
- secure: "nxosaZUBRaYhk8+LHaDnVgMIveiK4zewiXW5Fw5TtB/D6V67oASufil1uhcayyzIBwnrZZmrFPLhXm0Lm1RiQHrsftffcMB5JlWK9R9EyWpyd87ewqWy3kXBAvsXXTU6ihGiaFpklhVCKt7XcDSR8bWEb2NVWrM7JS7dHDKMwaA="
language: php
php:
- 5.6
- 7.1
# group: deprecated-2017Q1
- 7.2
dist: trusty
python:
- 3.3
addons:
postgresql: "9.1"
- 3.3 # Required by Javascript linter/builder
git:
# We have to init submodules ourselves to make it recursive
# Inhibit automatic submodule checkout (see below)
submodules: false
addons:
firefox: "45.9.0esr"
firefox: "45.9.0esr" # Required by Selenium tests
apt:
update: true
before_install:

# Start submodules
# Check out submodules (this script checks out developer forks if necessary)
- ./tools/startSubmodulesTRAVIS.sh

# Install composer dependencies
- cd lib/pkp && composer update && cd ../..
- cd plugins/paymethod/paypal && composer update && cd ../..

# Install node depenencies
- . $HOME/.nvm/nvm.sh
- nvm install stable
- nvm use stable
- npm install && npm run build
- |
if [[ "$TEST" != "validation" ]]; then
# Prepare for unit and integration tests.
# Configure the webserver
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/prepare-webserver.sh; fi
# Prepare the server environment
./lib/pkp/tools/travis/prepare-webserver.sh
source ./lib/pkp/tools/travis/start-xvfb.sh
./lib/pkp/tools/travis/start-selenium.sh
# Start xvfb
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/start-xvfb.sh; fi
# Prepare the local codebase
./lib/pkp/tools/travis/install-composer-dependencies.sh
npm install && npm run build
else
# Prepare for validation tests.
./lib/pkp/tools/travis/install-linter.sh
fi
# Start Selenium
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/start-selenium.sh; fi

# Prepare code coverage
# The code coverage test is only performed in the MySQL test round.
- if [[ "$TEST" == "mysql" ]]; then ./lib/pkp/tools/travis/prepare-code-coverage.sh; fi

# Install the JS linter
- if [[ "$TEST" == "validation" ]]; then ./lib/pkp/tools/travis/install-linter.sh; fi

# Sleep and output our logs, to avoid hanging build with no access to
# logs. This is useful for debugging but too verbose to leave enabled.
# - (sleep 590; cat access.log; cat error.log; cat xvfb-output; cat selenium-output; cat ./lib/pkp/tests/results/error.log) &

script:
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/run-tests.sh; fi
- if [[ "$TEST" == "validation" ]]; then ./lib/pkp/tools/travis/validate-xml.sh && ./lib/pkp/tools/buildjs.sh -n; fi
- |
if [[ "$TEST" != "validation" ]]; then
# Run the unit and integration tests.
source ./lib/pkp/tools/travis/prepare-tests.sh
./lib/pkp/tools/travis/run-tests.sh
else
# Run the validation tests.
./lib/pkp/tools/travis/validate-xml.sh
./lib/pkp/tools/buildjs.sh -n
./lib/pkp/tools/checkHelp.sh
fi
after_script:
# Merge the coverage reports into one HTML report and upload to http://pkp.sfu.ca/test-coverage
Expand All @@ -67,9 +65,7 @@ after_script:
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/post-data-build.sh; fi

# Print logs and outputs for debugging.
# - cat access.log
- tail -c 1048576 error.log
# - cat xvfb-output
# - cat selenium-output
- cat ./lib/pkp/tests/results/error.log
- for f in lib/pkp/tests/results/*.png; do echo ============== START ${f} ================== ; cat $f | base64 ; echo ============== END ${f} ================== ; done
- sudo apt-get install sharutils
- test "$(ls -A lib/pkp/tests/results | grep .png)" && (tar cz lib/pkp/tests/results/*.png | uuencode /dev/stdout)
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,11 @@ Checkout submodules and copy default configuration :
git submodule update --init --recursive
cp config.TEMPLATE.inc.php config.inc.php

Install or update dependencies via Composer:
Install or update dependencies via Composer (https://getcomposer.org/):

# if you don't already have Composer installed:
curl -sS https://getcomposer.org/installer | php
cd lib/pkp
php ../../composer.phar update
cd ../..
cd plugins/paymethod/paypal
php ../../../composer.phar update
cd ../../..
composer --working-dir=lib/pkp update
composer --working-dir=plugins/paymethod/paypal update
composer --working-dir=plugins/generic/citationStyleLanguage update

Install or update dependencies via [NPM](https://www.npmjs.com/):

Expand All @@ -41,12 +36,12 @@ See [Wiki][wiki-dev] for more complete development guide.
## Running Tests

We recommend using [Travis](https://travis-ci.org/) for continuous-integration
based testing. Review the Travis configuration file (.travis.yml) as a
based testing. Review the Travis configuration file (`.travis.yml`) as a
reference for running the test locally, should you choose to do so.

The tests include an integration test suite that builds a data environment from
scratch, including the installation process. (This is the "-b" flag to the test
script lib/pkp/tools/runAllTests.sh; this is also executed in the Travis
scratch, including the installation process. (This is the `-b` flag to the test
script `lib/pkp/tools/runAllTests.sh`; this is also executed in the Travis
environment.)

## Bugs / Issues
Expand All @@ -65,7 +60,7 @@ according to the terms of this license. PKP also welcomes patches for
improvements or bug fixes to the software.

[pkp]: http://pkp.sfu.ca/
[readme]: docs/README
[readme]: docs/README.md
[wiki-dev]: http://pkp.sfu.ca/wiki/index.php/HOW-TO_check_out_PKP_applications_from_git
[php-unit]: http://phpunit.de/
[gpl-licence]: docs/COPYING
4 changes: 2 additions & 2 deletions api/v1/_submissions/BackendSubmissionsHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/**
* @file api/v1/_submissions/BackendSubmissionsHandler.inc.php
*
* Copyright (c) 2014-2017 Simon Fraser University
* Copyright (c) 2003-2017 John Willinsky
* Copyright (c) 2014-2018 Simon Fraser University
* Copyright (c) 2003-2018 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class BackendSubmissionsHandler
Expand Down
4 changes: 2 additions & 2 deletions api/v1/_submissions/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
/**
* @file api/v1/_submissions/index.php
*
* Copyright (c) 2014-2017 Simon Fraser University
* Copyright (c) 2003-2017 John Willinsky
* Copyright (c) 2014-2018 Simon Fraser University
* Copyright (c) 2003-2018 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @ingroup api_v1_backend
Expand Down
20 changes: 0 additions & 20 deletions api/v1/_submissions/index.php~HEAD

This file was deleted.

Loading

0 comments on commit 60bc4c3

Please sign in to comment.